mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
luci-app-ssr-plus: add Netflix IP update button in status page
This commit is contained in:
parent
1db3f00f56
commit
17ddcd37a6
@ -116,6 +116,22 @@ elseif set == "ip_data" then
|
||||
retstring ="-1"
|
||||
end
|
||||
luci.sys.exec("rm -f /tmp/china_ssr.txt ")
|
||||
elseif set == "nfip_data" then
|
||||
refresh_cmd="wget-ssl --no-check-certificate https://cdn.jsdelivr.net/gh/QiuSimons/Netflix_IP/NF_only.txt -O /tmp/netflixip.list"
|
||||
sret=luci.sys.call(refresh_cmd)
|
||||
icount = luci.sys.exec("cat /tmp/netflixip.list | wc -l")
|
||||
if sret== 0 and tonumber(icount)>1000 then
|
||||
oldcount=luci.sys.exec("cat /etc/config/netflixip.list | wc -l")
|
||||
if tonumber(icount) ~= tonumber(oldcount) then
|
||||
luci.sys.exec("cp -f /tmp/netflixip.list /etc/config/netflixip.list")
|
||||
retstring=tostring(tonumber(icount))
|
||||
else
|
||||
retstring ="0"
|
||||
end
|
||||
else
|
||||
retstring ="-1"
|
||||
end
|
||||
luci.sys.exec("rm -f /tmp/netflixip.list ")
|
||||
else
|
||||
if nixio.fs.access("/usr/bin/wget-ssl") then
|
||||
refresh_cmd="wget-ssl --no-check-certificate -O - ".. luci.model.uci.cursor():get_first('shadowsocksr', 'global', 'adblock_url','https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt') .." > /tmp/adnew.conf"
|
||||
|
@ -14,6 +14,7 @@ local udpspeeder_run=0
|
||||
local gfw_count=0
|
||||
local ad_count=0
|
||||
local ip_count=0
|
||||
local nfip_count=0
|
||||
local ucic = luci.model.uci.cursor()
|
||||
local shadowsocksr = "shadowsocksr"
|
||||
-- html constants
|
||||
@ -51,6 +52,10 @@ if nixio.fs.access("/etc/china_ssr.txt") then
|
||||
ip_count = sys.exec("cat /etc/china_ssr.txt | wc -l")
|
||||
end
|
||||
|
||||
if nixio.fs.access("/etc/config/netflixip.list") then
|
||||
ip_count = sys.exec("cat /etc/config/netflixip.list | wc -l")
|
||||
end
|
||||
|
||||
local icount=sys.exec("busybox ps -w | grep ssr-reudp |grep -v grep| wc -l")
|
||||
if tonumber(icount)>0 then
|
||||
reudp_run=1
|
||||
@ -169,6 +174,11 @@ s.rawhtml = true
|
||||
s.template = "shadowsocksr/refresh"
|
||||
s.value =ip_count .. " " .. translate("Records")
|
||||
|
||||
s=m:field(DummyValue,"nfip_data",translate("Netflix IP Data"))
|
||||
s.rawhtml = true
|
||||
s.template = "shadowsocksr/refresh"
|
||||
s.value =nfip_count .. " " .. translate("Records")
|
||||
|
||||
if ucic:get_first(shadowsocksr, 'global', 'adblock', '0') == '1' then
|
||||
s=m:field(DummyValue,"ad_data",translate("Advertising Data"))
|
||||
s.rawhtml = true
|
||||
|
@ -280,6 +280,9 @@ msgstr "【GFW列表】数据库"
|
||||
msgid "China IP Data"
|
||||
msgstr "【国内IP段】数据库"
|
||||
|
||||
msgid "Netflix IP Data"
|
||||
msgstr "【Netflix IP段】数据库"
|
||||
|
||||
msgid "Records"
|
||||
msgstr "条记录"
|
||||
|
||||
|
@ -9,3 +9,4 @@ huluim.com
|
||||
hbonow.com
|
||||
hbogo.com
|
||||
hbo.com
|
||||
fast.com
|
||||
|
Loading…
Reference in New Issue
Block a user