diff --git a/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua b/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua index 6d050bf43..a5eff34d9 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua @@ -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" diff --git a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua index e276bb5a9..7128bbc9c 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua @@ -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 diff --git a/package/lean/luci-app-ssr-plus/po/zh-cn/ssr-plus.po b/package/lean/luci-app-ssr-plus/po/zh-cn/ssr-plus.po index 17a1587db..9f376fed9 100644 --- a/package/lean/luci-app-ssr-plus/po/zh-cn/ssr-plus.po +++ b/package/lean/luci-app-ssr-plus/po/zh-cn/ssr-plus.po @@ -280,6 +280,9 @@ msgstr "【GFW列表】数据库" msgid "China IP Data" msgstr "【国内IP段】数据库" +msgid "Netflix IP Data" +msgstr "【Netflix IP段】数据库" + msgid "Records" msgstr "条记录" diff --git a/package/lean/luci-app-ssr-plus/root/etc/config/netflix.list b/package/lean/luci-app-ssr-plus/root/etc/config/netflix.list index 134d715a0..c78153747 100644 --- a/package/lean/luci-app-ssr-plus/root/etc/config/netflix.list +++ b/package/lean/luci-app-ssr-plus/root/etc/config/netflix.list @@ -9,3 +9,4 @@ huluim.com hbonow.com hbogo.com hbo.com +fast.com