luci-app-ssr-plus:Fix update.lua log output and file checking (#4085)

This commit is contained in:
Mattraks 2020-03-30 12:17:19 +08:00 committed by CN_SZTL
parent a85fc55415
commit 0e4007eacd
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
5 changed files with 8598 additions and 8560 deletions

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ssr-plus
PKG_VERSION:=175
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

View File

@ -50,7 +50,7 @@ function act_ping()
e.ping = luci.sys.exec("ping -c 1 -W 1 %q 2>&1 | grep -o 'time=[0-9]*.[0-9]' | awk -F '=' '{print$2}'" % domain)
if (e.ping == "") then
e.ping = luci.sys.exec(string.format("echo -n $(tcpping -c 1 -i 1 -p %s %s 2>&1 | grep -o 'ttl=[0-9]* time=[0-9]*.[0-9]' | awk -F '=' '{print$3}') 2>/dev/null",port, domain))
end
end
if (iret == 0) then
luci.sys.call(" ipset del ss_spec_wan_ac " .. domain)
end
@ -81,7 +81,11 @@ function refresh_data()
luci.sys.call("/usr/bin/ssr-gfw")
icount = luci.sys.exec("cat /tmp/gfwnew.txt | wc -l")
if tonumber(icount) > 1000 then
oldcount = luci.sys.exec("cat /etc/dnsmasq.ssr/gfw_list.conf | wc -l")
if nixio.fs.access("/etc/dnsmasq.ssr/gfw_list.conf") then
oldcount = luci.sys.exec("cat /etc/dnsmasq.ssr/gfw_list.conf | wc -l")
else
oldcount = "0"
end
if tonumber(icount) ~= tonumber(oldcount) then
luci.sys.exec("cp -f /tmp/gfwnew.txt /etc/dnsmasq.ssr/gfw_list.conf")
luci.sys.exec("cp -f /tmp/gfwnew.txt /tmp/dnsmasq.ssr/gfw_list.conf")
@ -99,11 +103,15 @@ function refresh_data()
end
end
if set == "ip_data" then
refresh_cmd = "wget-ssl --no-check-certificate -O- " .. uci:get_first('shadowsocksr', 'global', 'chnroute_url', 'https://ispip.clang.cn/all_cn.txt') .. ' > /tmp/china_ssr.txt'
refresh_cmd = "wget-ssl --no-check-certificate -O- " .. uci:get_first('shadowsocksr', 'global', 'chnroute_url', 'https://ispip.clang.cn/all_cn.txt') .. " > /tmp/china_ssr.txt"
sret = luci.sys.call(refresh_cmd .. " 2>/dev/null")
icount = luci.sys.exec("cat /tmp/china_ssr.txt | wc -l")
if sret == 0 and tonumber(icount) > 1000 then
oldcount = luci.sys.exec("cat /etc/china_ssr.txt | wc -l")
if nixio.fs.access("/etc/china_ssr.txt") then
oldcount = luci.sys.exec("cat /etc/china_ssr.txt | wc -l")
else
oldcount = "0"
end
if tonumber(icount) ~= tonumber(oldcount) then
luci.sys.exec("cp -f /tmp/china_ssr.txt /etc/china_ssr.txt")
luci.sys.exec("/etc/init.d/shadowsocksr restart &")
@ -117,11 +125,15 @@ function refresh_data()
luci.sys.exec("rm -f /tmp/china_ssr.txt")
end
if set == "nfip_data" then
refresh_cmd = "wget-ssl --no-check-certificate -O- ".. uci:get_first('shadowsocksr', 'global', 'nfip_url','https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/NF_only.txt') .." > /tmp/netflixip.list"
refresh_cmd = "wget-ssl --no-check-certificate -O- " .. uci:get_first('shadowsocksr', 'global', 'nfip_url','https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/NF_only.txt') .." > /tmp/netflixip.list"
sret = luci.sys.call(refresh_cmd .. " 2>/dev/null")
icount = luci.sys.exec("cat /tmp/netflixip.list | wc -l")
if sret == 0 and tonumber(icount) > 5 then
oldcount = luci.sys.exec("cat /etc/config/netflixip.list | wc -l")
if nixio.fs.access("/etc/config/netflixip.list") then
oldcount = luci.sys.exec("cat /etc/config/netflixip.list | wc -l")
else
oldcount = "0"
end
if tonumber(icount) ~= tonumber(oldcount) then
luci.sys.exec("cp -f /tmp/netflixip.list /etc/config/netflixip.list")
luci.sys.exec("/etc/init.d/shadowsocksr restart &")
@ -135,7 +147,7 @@ function refresh_data()
luci.sys.exec("rm -f /tmp/netflixip.list")
end
if set == "ad_data" then
refresh_cmd = "wget-ssl --no-check-certificate -O- ".. uci:get_first('shadowsocksr', 'global', 'adblock_url','https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt') .." > /tmp/adnew.conf"
refresh_cmd = "wget-ssl --no-check-certificate -O- " .. uci:get_first('shadowsocksr', 'global', 'adblock_url','https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt') .." > /tmp/adnew.conf"
sret = luci.sys.call(refresh_cmd .. " 2>/dev/null")
if sret == 0 then
luci.sys.call("/usr/bin/ssr-ad")

File diff suppressed because it is too large Load Diff

View File

@ -22,6 +22,8 @@ server=/.12vpn.net/127.0.0.1#5335
ipset=/.12vpn.net/gfwlist
server=/.138.com/127.0.0.1#5335
ipset=/.138.com/gfwlist
server=/.141hongkong.com/127.0.0.1#5335
ipset=/.141hongkong.com/gfwlist
server=/.141jj.com/127.0.0.1#5335
ipset=/.141jj.com/gfwlist
server=/.141tube.com/127.0.0.1#5335
@ -176,6 +178,8 @@ server=/.666kb.com/127.0.0.1#5335
ipset=/.666kb.com/gfwlist
server=/.6park.com/127.0.0.1#5335
ipset=/.6park.com/gfwlist
server=/.6parkbbs.com/127.0.0.1#5335
ipset=/.6parkbbs.com/gfwlist
server=/.6parker.com/127.0.0.1#5335
ipset=/.6parker.com/gfwlist
server=/.6parknews.com/127.0.0.1#5335
@ -308,8 +312,6 @@ server=/.advanscene.com/127.0.0.1#5335
ipset=/.advanscene.com/gfwlist
server=/.advertfan.com/127.0.0.1#5335
ipset=/.advertfan.com/gfwlist
server=/.ae.hao123.com/127.0.0.1#5335
ipset=/.ae.hao123.com/gfwlist
server=/.ae.org/127.0.0.1#5335
ipset=/.ae.org/gfwlist
server=/.aenhancers.com/127.0.0.1#5335
@ -318,8 +320,6 @@ server=/.aex.com/127.0.0.1#5335
ipset=/.aex.com/gfwlist
server=/.af.mil/127.0.0.1#5335
ipset=/.af.mil/gfwlist
server=/.afantibbs.com/127.0.0.1#5335
ipset=/.afantibbs.com/gfwlist
server=/.agnesb.fr/127.0.0.1#5335
ipset=/.agnesb.fr/gfwlist
server=/.agoogleaday.com/127.0.0.1#5335
@ -450,8 +450,6 @@ server=/.amnyemachen.org/127.0.0.1#5335
ipset=/.amnyemachen.org/gfwlist
server=/.amoiist.com/127.0.0.1#5335
ipset=/.amoiist.com/gfwlist
server=/.ampproject.org/127.0.0.1#5335
ipset=/.ampproject.org/gfwlist
server=/.amtb-taipei.org/127.0.0.1#5335
ipset=/.amtb-taipei.org/gfwlist
server=/.anchorfree.com/127.0.0.1#5335
@ -550,6 +548,8 @@ server=/.apigee.com/127.0.0.1#5335
ipset=/.apigee.com/gfwlist
server=/.apk-dl.com/127.0.0.1#5335
ipset=/.apk-dl.com/gfwlist
server=/.apk.tw/127.0.0.1#5335
ipset=/.apk.tw/gfwlist
server=/.apkmirror.com/127.0.0.1#5335
ipset=/.apkmirror.com/gfwlist
server=/.apkplz.com/127.0.0.1#5335
@ -578,8 +578,6 @@ server=/.appsto.re/127.0.0.1#5335
ipset=/.appsto.re/gfwlist
server=/.aptoide.com/127.0.0.1#5335
ipset=/.aptoide.com/gfwlist
server=/.ar.hao123.com/127.0.0.1#5335
ipset=/.ar.hao123.com/gfwlist
server=/.archive.fo/127.0.0.1#5335
ipset=/.archive.fo/gfwlist
server=/.archive.is/127.0.0.1#5335
@ -588,8 +586,12 @@ server=/.archive.li/127.0.0.1#5335
ipset=/.archive.li/gfwlist
server=/.archive.org/127.0.0.1#5335
ipset=/.archive.org/gfwlist
server=/.archive.ph/127.0.0.1#5335
ipset=/.archive.ph/gfwlist
server=/.archive.today/127.0.0.1#5335
ipset=/.archive.today/gfwlist
server=/.archiveofourown.org/127.0.0.1#5335
ipset=/.archiveofourown.org/gfwlist
server=/.archives.gov/127.0.0.1#5335
ipset=/.archives.gov/gfwlist
server=/.arctosia.com/127.0.0.1#5335
@ -846,6 +848,8 @@ server=/.bcex.ca/127.0.0.1#5335
ipset=/.bcex.ca/gfwlist
server=/.bcmorning.com/127.0.0.1#5335
ipset=/.bcmorning.com/gfwlist
server=/.bcrncdn.com/127.0.0.1#5335
ipset=/.bcrncdn.com/gfwlist
server=/.bdsmvideos.net/127.0.0.1#5335
ipset=/.bdsmvideos.net/gfwlist
server=/.beaconevents.com/127.0.0.1#5335
@ -1162,8 +1166,6 @@ server=/.boysfood.com/127.0.0.1#5335
ipset=/.boysfood.com/gfwlist
server=/.boysmaster.com/127.0.0.1#5335
ipset=/.boysmaster.com/gfwlist
server=/.br.hao123.com/127.0.0.1#5335
ipset=/.br.hao123.com/gfwlist
server=/.br.st/127.0.0.1#5335
ipset=/.br.st/gfwlist
server=/.brandonhutchinson.com/127.0.0.1#5335
@ -1890,6 +1892,8 @@ server=/.convio.net/127.0.0.1#5335
ipset=/.convio.net/gfwlist
server=/.coobay.com/127.0.0.1#5335
ipset=/.coobay.com/gfwlist
server=/.cool18.com/127.0.0.1#5335
ipset=/.cool18.com/gfwlist
server=/.coolaler.com/127.0.0.1#5335
ipset=/.coolaler.com/gfwlist
server=/.coolder.com/127.0.0.1#5335
@ -1954,6 +1958,8 @@ server=/.crrev.com/127.0.0.1#5335
ipset=/.crrev.com/gfwlist
server=/.crucial.com/127.0.0.1#5335
ipset=/.crucial.com/gfwlist
server=/.crwdcntrl.net/127.0.0.1#5335
ipset=/.crwdcntrl.net/gfwlist
server=/.csdparty.com/127.0.0.1#5335
ipset=/.csdparty.com/gfwlist
server=/.css.pixnet.in/127.0.0.1#5335
@ -2352,8 +2358,6 @@ server=/.doujincafe.com/127.0.0.1#5335
ipset=/.doujincafe.com/gfwlist
server=/.dowei.org/127.0.0.1#5335
ipset=/.dowei.org/gfwlist
server=/.download.aircrack-ng.org/127.0.0.1#5335
ipset=/.download.aircrack-ng.org/gfwlist
server=/.download.cnet.com/127.0.0.1#5335
ipset=/.download.cnet.com/gfwlist
server=/.download.ithome.com.tw/127.0.0.1#5335
@ -2594,8 +2598,6 @@ server=/.emuparadise.me/127.0.0.1#5335
ipset=/.emuparadise.me/gfwlist
server=/.en.favotter.net/127.0.0.1#5335
ipset=/.en.favotter.net/gfwlist
server=/.en.hao123.com/127.0.0.1#5335
ipset=/.en.hao123.com/gfwlist
server=/.enanyang.my/127.0.0.1#5335
ipset=/.enanyang.my/gfwlist
server=/.encyclopedia.com/127.0.0.1#5335
@ -2880,6 +2882,8 @@ server=/.fangongheike.com/127.0.0.1#5335
ipset=/.fangongheike.com/gfwlist
server=/.fanhaodang.com/127.0.0.1#5335
ipset=/.fanhaodang.com/gfwlist
server=/.fanqiang.network/127.0.0.1#5335
ipset=/.fanqiang.network/gfwlist
server=/.fanqiang.tk/127.0.0.1#5335
ipset=/.fanqiang.tk/gfwlist
server=/.fanqiangdang.com/127.0.0.1#5335
@ -3162,6 +3166,8 @@ server=/.freeddns.com/127.0.0.1#5335
ipset=/.freeddns.com/gfwlist
server=/.freeddns.org/127.0.0.1#5335
ipset=/.freeddns.org/gfwlist
server=/.freedl.org/127.0.0.1#5335
ipset=/.freedl.org/gfwlist
server=/.freedomchina.info/127.0.0.1#5335
ipset=/.freedomchina.info/gfwlist
server=/.freedomhouse.org/127.0.0.1#5335
@ -3596,6 +3602,8 @@ server=/.goldstep.net/127.0.0.1#5335
ipset=/.goldstep.net/gfwlist
server=/.goldwave.com/127.0.0.1#5335
ipset=/.goldwave.com/gfwlist
server=/.goliathguitartutorials.com/127.0.0.1#5335
ipset=/.goliathguitartutorials.com/gfwlist
server=/.gongm.in/127.0.0.1#5335
ipset=/.gongm.in/gfwlist
server=/.gongmeng.info/127.0.0.1#5335
@ -3754,6 +3762,8 @@ server=/.googledrive.com/127.0.0.1#5335
ipset=/.googledrive.com/gfwlist
server=/.googleearth.com/127.0.0.1#5335
ipset=/.googleearth.com/gfwlist
server=/.googlefiber.net/127.0.0.1#5335
ipset=/.googlefiber.net/gfwlist
server=/.googlegroups.com/127.0.0.1#5335
ipset=/.googlegroups.com/gfwlist
server=/.googlehosted.com/127.0.0.1#5335
@ -3860,8 +3870,6 @@ server=/.greenvpn.org/127.0.0.1#5335
ipset=/.greenvpn.org/gfwlist
server=/.grotty-monday.com/127.0.0.1#5335
ipset=/.grotty-monday.com/gfwlist
server=/.groups.google.cn/127.0.0.1#5335
ipset=/.groups.google.cn/gfwlist
server=/.grow.google/127.0.0.1#5335
ipset=/.grow.google/gfwlist
server=/.gs-discuss.com/127.0.0.1#5335
@ -4112,8 +4120,6 @@ server=/.hk-pub.com/127.0.0.1#5335
ipset=/.hk-pub.com/gfwlist
server=/.hk.geocities.com/127.0.0.1#5335
ipset=/.hk.geocities.com/gfwlist
server=/.hk.hao123img.com/127.0.0.1#5335
ipset=/.hk.hao123img.com/gfwlist
server=/.hk.jiepang.com/127.0.0.1#5335
ipset=/.hk.jiepang.com/gfwlist
server=/.hk.knowledge.yahoo.com/127.0.0.1#5335
@ -4216,6 +4222,8 @@ server=/.hnjhj.com/127.0.0.1#5335
ipset=/.hnjhj.com/gfwlist
server=/.hnntube.com/127.0.0.1#5335
ipset=/.hnntube.com/gfwlist
server=/.hojemacau.com.mo/127.0.0.1#5335
ipset=/.hojemacau.com.mo/gfwlist
server=/.hola.com/127.0.0.1#5335
ipset=/.hola.com/gfwlist
server=/.hola.org/127.0.0.1#5335
@ -4380,8 +4388,6 @@ server=/.hurgokbayrak.com/127.0.0.1#5335
ipset=/.hurgokbayrak.com/gfwlist
server=/.hurriyet.com.tr/127.0.0.1#5335
ipset=/.hurriyet.com.tr/gfwlist
server=/.hustlercash.com/127.0.0.1#5335
ipset=/.hustlercash.com/gfwlist
server=/.hut2.ru/127.0.0.1#5335
ipset=/.hut2.ru/gfwlist
server=/.hutianyi.net/127.0.0.1#5335
@ -4440,6 +4446,8 @@ server=/.icams.com/127.0.0.1#5335
ipset=/.icams.com/gfwlist
server=/.ice.audionow.com/127.0.0.1#5335
ipset=/.ice.audionow.com/gfwlist
server=/.icfcdn.com/127.0.0.1#5335
ipset=/.icfcdn.com/gfwlist
server=/.icij.org/127.0.0.1#5335
ipset=/.icij.org/gfwlist
server=/.icl-fi.org/127.0.0.1#5335
@ -4450,8 +4458,6 @@ server=/.iconpaper.org/127.0.0.1#5335
ipset=/.iconpaper.org/gfwlist
server=/.icu-project.org/127.0.0.1#5335
ipset=/.icu-project.org/gfwlist
server=/.id.hao123.com/127.0.0.1#5335
ipset=/.id.hao123.com/gfwlist
server=/.id.heroku.com/127.0.0.1#5335
ipset=/.id.heroku.com/gfwlist
server=/.iddddg.com/127.0.0.1#5335
@ -4742,8 +4748,6 @@ server=/.izlesem.org/127.0.0.1#5335
ipset=/.izlesem.org/gfwlist
server=/.j.mp/127.0.0.1#5335
ipset=/.j.mp/gfwlist
server=/.ja.wikipedia.org/127.0.0.1#5335
ipset=/.ja.wikipedia.org/gfwlist
server=/.jamaat.org/127.0.0.1#5335
ipset=/.jamaat.org/gfwlist
server=/.jamyangnorbu.com/127.0.0.1#5335
@ -4792,6 +4796,8 @@ server=/.javtag.com/127.0.0.1#5335
ipset=/.javtag.com/gfwlist
server=/.javzoo.com/127.0.0.1#5335
ipset=/.javzoo.com/gfwlist
server=/.javzz.com/127.0.0.1#5335
ipset=/.javzz.com/gfwlist
server=/.jbtalks.cc/127.0.0.1#5335
ipset=/.jbtalks.cc/gfwlist
server=/.jbtalks.com/127.0.0.1#5335
@ -4880,8 +4886,6 @@ server=/.joymiihub.com/127.0.0.1#5335
ipset=/.joymiihub.com/gfwlist
server=/.joyourself.com/127.0.0.1#5335
ipset=/.joyourself.com/gfwlist
server=/.jp.hao123.com/127.0.0.1#5335
ipset=/.jp.hao123.com/gfwlist
server=/.jpl.nasa.gov/127.0.0.1#5335
ipset=/.jpl.nasa.gov/gfwlist
server=/.jpopforum.net/127.0.0.1#5335
@ -5058,6 +5062,8 @@ server=/.koornk.com/127.0.0.1#5335
ipset=/.koornk.com/gfwlist
server=/.koranmandarin.com/127.0.0.1#5335
ipset=/.koranmandarin.com/gfwlist
server=/.korea.net/127.0.0.1#5335
ipset=/.korea.net/gfwlist
server=/.korenan2.com/127.0.0.1#5335
ipset=/.korenan2.com/gfwlist
server=/.ksdl.org/127.0.0.1#5335
@ -5140,8 +5146,6 @@ server=/.latibet.org/127.0.0.1#5335
ipset=/.latibet.org/gfwlist
server=/.lbank.info/127.0.0.1#5335
ipset=/.lbank.info/gfwlist
server=/.ld.hao123img.com/127.0.0.1#5335
ipset=/.ld.hao123img.com/gfwlist
server=/.le-vpn.com/127.0.0.1#5335
ipset=/.le-vpn.com/gfwlist
server=/.leafyvpn.net/127.0.0.1#5335
@ -5372,8 +5376,6 @@ server=/.m.plixi.com/127.0.0.1#5335
ipset=/.m.plixi.com/gfwlist
server=/.m.slandr.net/127.0.0.1#5335
ipset=/.m.slandr.net/gfwlist
server=/.ma.hao123.com/127.0.0.1#5335
ipset=/.ma.hao123.com/gfwlist
server=/.macgamestore.com/127.0.0.1#5335
ipset=/.macgamestore.com/gfwlist
server=/.macrovpn.com/127.0.0.1#5335
@ -5736,6 +5738,8 @@ server=/.moneyhome.biz/127.0.0.1#5335
ipset=/.moneyhome.biz/gfwlist
server=/.monitorchina.org/127.0.0.1#5335
ipset=/.monitorchina.org/gfwlist
server=/.monocloud.me/127.0.0.1#5335
ipset=/.monocloud.me/gfwlist
server=/.monster.com/127.0.0.1#5335
ipset=/.monster.com/gfwlist
server=/.moodyz.com/127.0.0.1#5335
@ -5826,8 +5830,6 @@ server=/.mvdis.gov.tw/127.0.0.1#5335
ipset=/.mvdis.gov.tw/gfwlist
server=/.mvg.jp/127.0.0.1#5335
ipset=/.mvg.jp/gfwlist
server=/.mx.hao123.com/127.0.0.1#5335
ipset=/.mx.hao123.com/gfwlist
server=/.mx981.com/127.0.0.1#5335
ipset=/.mx981.com/gfwlist
server=/.my-formosa.com/127.0.0.1#5335
@ -5936,6 +5938,8 @@ server=/.myz.info/127.0.0.1#5335
ipset=/.myz.info/gfwlist
server=/.naacoalition.org/127.0.0.1#5335
ipset=/.naacoalition.org/gfwlist
server=/.naiadsystems.com/127.0.0.1#5335
ipset=/.naiadsystems.com/gfwlist
server=/.naitik.net/127.0.0.1#5335
ipset=/.naitik.net/gfwlist
server=/.nakido.com/127.0.0.1#5335
@ -6656,6 +6660,8 @@ server=/.photodharma.net/127.0.0.1#5335
ipset=/.photodharma.net/gfwlist
server=/.photofocus.com/127.0.0.1#5335
ipset=/.photofocus.com/gfwlist
server=/.phprcdn.com/127.0.0.1#5335
ipset=/.phprcdn.com/gfwlist
server=/.phuquocservices.com/127.0.0.1#5335
ipset=/.phuquocservices.com/gfwlist
server=/.picacomic.com/127.0.0.1#5335
@ -6794,6 +6800,8 @@ server=/.porn5.com/127.0.0.1#5335
ipset=/.porn5.com/gfwlist
server=/.pornbase.org/127.0.0.1#5335
ipset=/.pornbase.org/gfwlist
server=/.pornbest.org/127.0.0.1#5335
ipset=/.pornbest.org/gfwlist
server=/.pornerbros.com/127.0.0.1#5335
ipset=/.pornerbros.com/gfwlist
server=/.pornhd.com/127.0.0.1#5335
@ -6898,6 +6906,8 @@ server=/.proxomitron.info/127.0.0.1#5335
ipset=/.proxomitron.info/gfwlist
server=/.proxpn.com/127.0.0.1#5335
ipset=/.proxpn.com/gfwlist
server=/.proxy1.xyz/127.0.0.1#5335
ipset=/.proxy1.xyz/gfwlist
server=/.proxyanonimo.es/127.0.0.1#5335
ipset=/.proxyanonimo.es/gfwlist
server=/.proxydns.com/127.0.0.1#5335
@ -6932,6 +6942,8 @@ server=/.pts.org.tw/127.0.0.1#5335
ipset=/.pts.org.tw/gfwlist
server=/.ptt.cc/127.0.0.1#5335
ipset=/.ptt.cc/gfwlist
server=/.pttgame.com/127.0.0.1#5335
ipset=/.pttgame.com/gfwlist
server=/.pttvan.org/127.0.0.1#5335
ipset=/.pttvan.org/gfwlist
server=/.pubu.com.tw/127.0.0.1#5335
@ -7040,8 +7052,6 @@ server=/.ra.gg/127.0.0.1#5335
ipset=/.ra.gg/gfwlist
server=/.radicalparty.org/127.0.0.1#5335
ipset=/.radicalparty.org/gfwlist
server=/.radiko.jp/127.0.0.1#5335
ipset=/.radiko.jp/gfwlist
server=/.radioaustralia.net.au/127.0.0.1#5335
ipset=/.radioaustralia.net.au/gfwlist
server=/.radiohilight.net/127.0.0.1#5335
@ -7170,6 +7180,8 @@ server=/.renminbao.com/127.0.0.1#5335
ipset=/.renminbao.com/gfwlist
server=/.renyurenquan.org/127.0.0.1#5335
ipset=/.renyurenquan.org/gfwlist
server=/.research.google/127.0.0.1#5335
ipset=/.research.google/gfwlist
server=/.resilio.com/127.0.0.1#5335
ipset=/.resilio.com/gfwlist
server=/.retweeteffect.com/127.0.0.1#5335
@ -7298,8 +7310,6 @@ server=/.s3-ap-southeast-2.amazonaws.com/127.0.0.1#5335
ipset=/.s3-ap-southeast-2.amazonaws.com/gfwlist
server=/.s8forum.com/127.0.0.1#5335
ipset=/.s8forum.com/gfwlist
server=/.sa.hao123.com/127.0.0.1#5335
ipset=/.sa.hao123.com/gfwlist
server=/.sacks.com/127.0.0.1#5335
ipset=/.sacks.com/gfwlist
server=/.sacom.hk/127.0.0.1#5335
@ -7394,8 +7404,6 @@ server=/.secretgarden.no/127.0.0.1#5335
ipset=/.secretgarden.no/gfwlist
server=/.secretsline.biz/127.0.0.1#5335
ipset=/.secretsline.biz/gfwlist
server=/.secure.hustler.com/127.0.0.1#5335
ipset=/.secure.hustler.com/gfwlist
server=/.secure.logmein.com/127.0.0.1#5335
ipset=/.secure.logmein.com/gfwlist
server=/.secure.raxcdn.com/127.0.0.1#5335
@ -7406,6 +7414,8 @@ server=/.securityinabox.org/127.0.0.1#5335
ipset=/.securityinabox.org/gfwlist
server=/.securitykiss.com/127.0.0.1#5335
ipset=/.securitykiss.com/gfwlist
server=/.see.xxx/127.0.0.1#5335
ipset=/.see.xxx/gfwlist
server=/.seed4.me/127.0.0.1#5335
ipset=/.seed4.me/gfwlist
server=/.seesmic.com/127.0.0.1#5335
@ -7472,6 +7482,10 @@ server=/.sftindia.org/127.0.0.1#5335
ipset=/.sftindia.org/gfwlist
server=/.sftuk.org/127.0.0.1#5335
ipset=/.sftuk.org/gfwlist
server=/.sgwritings.com/127.0.0.1#5335
ipset=/.sgwritings.com/gfwlist
server=/.sgzhan.com/127.0.0.1#5335
ipset=/.sgzhan.com/gfwlist
server=/.shadeyouvpn.com/127.0.0.1#5335
ipset=/.shadeyouvpn.com/gfwlist
server=/.shadow.ma/127.0.0.1#5335
@ -7840,8 +7854,6 @@ server=/.spring4u.info/127.0.0.1#5335
ipset=/.spring4u.info/gfwlist
server=/.springboardplatform.com/127.0.0.1#5335
ipset=/.springboardplatform.com/gfwlist
server=/.sprite.org/127.0.0.1#5335
ipset=/.sprite.org/gfwlist
server=/.sproutcore.com/127.0.0.1#5335
ipset=/.sproutcore.com/gfwlist
server=/.sproxy.info/127.0.0.1#5335
@ -8232,6 +8244,8 @@ server=/.teensinasia.com/127.0.0.1#5335
ipset=/.teensinasia.com/gfwlist
server=/.telecomspace.com/127.0.0.1#5335
ipset=/.telecomspace.com/gfwlist
server=/.telegra.ph/127.0.0.1#5335
ipset=/.telegra.ph/gfwlist
server=/.telegram.dog/127.0.0.1#5335
ipset=/.telegram.dog/gfwlist
server=/.telegram.me/127.0.0.1#5335
@ -8260,8 +8274,6 @@ server=/.textnow.me/127.0.0.1#5335
ipset=/.textnow.me/gfwlist
server=/.tfhub.dev/127.0.0.1#5335
ipset=/.tfhub.dev/gfwlist
server=/.th.hao123.com/127.0.0.1#5335
ipset=/.th.hao123.com/gfwlist
server=/.thaicn.com/127.0.0.1#5335
ipset=/.thaicn.com/gfwlist
server=/.thb.gov.tw/127.0.0.1#5335
@ -8288,6 +8300,8 @@ server=/.thefacebook.com/127.0.0.1#5335
ipset=/.thefacebook.com/gfwlist
server=/.thegly.com/127.0.0.1#5335
ipset=/.thegly.com/gfwlist
server=/.theguardian.com/127.0.0.1#5335
ipset=/.theguardian.com/gfwlist
server=/.thehots.info/127.0.0.1#5335
ipset=/.thehots.info/gfwlist
server=/.thehousenews.com/127.0.0.1#5335
@ -8296,6 +8310,8 @@ server=/.thehun.net/127.0.0.1#5335
ipset=/.thehun.net/gfwlist
server=/.theinitium.com/127.0.0.1#5335
ipset=/.theinitium.com/gfwlist
server=/.themoviedb.org/127.0.0.1#5335
ipset=/.themoviedb.org/gfwlist
server=/.thenewslens.com/127.0.0.1#5335
ipset=/.thenewslens.com/gfwlist
server=/.thepiratebay.org/127.0.0.1#5335
@ -8324,6 +8340,8 @@ server=/.thetinhat.com/127.0.0.1#5335
ipset=/.thetinhat.com/gfwlist
server=/.thetrotskymovie.com/127.0.0.1#5335
ipset=/.thetrotskymovie.com/gfwlist
server=/.thetvdb.com/127.0.0.1#5335
ipset=/.thetvdb.com/gfwlist
server=/.thevivekspot.com/127.0.0.1#5335
ipset=/.thevivekspot.com/gfwlist
server=/.thewgo.org/127.0.0.1#5335
@ -8536,6 +8554,8 @@ server=/.ticket.com.tw/127.0.0.1#5335
ipset=/.ticket.com.tw/gfwlist
server=/.tigervpn.com/127.0.0.1#5335
ipset=/.tigervpn.com/gfwlist
server=/.tiktok.com/127.0.0.1#5335
ipset=/.tiktok.com/gfwlist
server=/.tiltbrush.com/127.0.0.1#5335
ipset=/.tiltbrush.com/gfwlist
server=/.timdir.com/127.0.0.1#5335
@ -8568,6 +8588,8 @@ server=/.tma.co.jp/127.0.0.1#5335
ipset=/.tma.co.jp/gfwlist
server=/.tmagazine.com/127.0.0.1#5335
ipset=/.tmagazine.com/gfwlist
server=/.tmdb.org/127.0.0.1#5335
ipset=/.tmdb.org/gfwlist
server=/.tmdfish.com/127.0.0.1#5335
ipset=/.tmdfish.com/gfwlist
server=/.tmi.me/127.0.0.1#5335
@ -8834,8 +8856,6 @@ server=/.tw.bid.yahoo.com/127.0.0.1#5335
ipset=/.tw.bid.yahoo.com/gfwlist
server=/.tw.gigacircle.com/127.0.0.1#5335
ipset=/.tw.gigacircle.com/gfwlist
server=/.tw.hao123.com/127.0.0.1#5335
ipset=/.tw.hao123.com/gfwlist
server=/.tw.iqiyi.com/127.0.0.1#5335
ipset=/.tw.iqiyi.com/gfwlist
server=/.tw.jiepang.com/127.0.0.1#5335
@ -9162,6 +9182,8 @@ server=/.upornia.com/127.0.0.1#5335
ipset=/.upornia.com/gfwlist
server=/.uproxy.org/127.0.0.1#5335
ipset=/.uproxy.org/gfwlist
server=/.uptodown.com/127.0.0.1#5335
ipset=/.uptodown.com/gfwlist
server=/.upwill.org/127.0.0.1#5335
ipset=/.upwill.org/gfwlist
server=/.ur7s.com/127.0.0.1#5335
@ -9236,8 +9258,6 @@ server=/.uyghurstudies.org/127.0.0.1#5335
ipset=/.uyghurstudies.org/gfwlist
server=/.uygur.org/127.0.0.1#5335
ipset=/.uygur.org/gfwlist
server=/.v2ex.com/127.0.0.1#5335
ipset=/.v2ex.com/gfwlist
server=/.v2ray.com/127.0.0.1#5335
ipset=/.v2ray.com/gfwlist
server=/.van001.com/127.0.0.1#5335
@ -9364,8 +9384,6 @@ server=/.vmixcore.com/127.0.0.1#5335
ipset=/.vmixcore.com/gfwlist
server=/.vmpsoft.com/127.0.0.1#5335
ipset=/.vmpsoft.com/gfwlist
server=/.vn.hao123.com/127.0.0.1#5335
ipset=/.vn.hao123.com/gfwlist
server=/.vnet.link/127.0.0.1#5335
ipset=/.vnet.link/gfwlist
server=/.voa-11.akacast.akamaistream.net/127.0.0.1#5335
@ -9674,6 +9692,8 @@ server=/.whereiswerner.com/127.0.0.1#5335
ipset=/.whereiswerner.com/gfwlist
server=/.wheretowatch.com/127.0.0.1#5335
ipset=/.wheretowatch.com/gfwlist
server=/.whichav.com/127.0.0.1#5335
ipset=/.whichav.com/gfwlist
server=/.whippedass.com/127.0.0.1#5335
ipset=/.whippedass.com/gfwlist
server=/.whitebear.freebearblog.org/127.0.0.1#5335
@ -9890,8 +9910,6 @@ server=/.www.gmiddle.com/127.0.0.1#5335
ipset=/.www.gmiddle.com/gfwlist
server=/.www.gmiddle.net/127.0.0.1#5335
ipset=/.www.gmiddle.net/gfwlist
server=/.www.hustlercash.com/127.0.0.1#5335
ipset=/.www.hustlercash.com/gfwlist
server=/.www.idlcoyote.com/127.0.0.1#5335
ipset=/.www.idlcoyote.com/gfwlist
server=/.www.kindleren.com/127.0.0.1#5335
@ -9902,8 +9920,6 @@ server=/.www.lamenhu.com/127.0.0.1#5335
ipset=/.www.lamenhu.com/gfwlist
server=/.www.linksalpha.com/127.0.0.1#5335
ipset=/.www.linksalpha.com/gfwlist
server=/.www.m-sport.co.uk/127.0.0.1#5335
ipset=/.www.m-sport.co.uk/gfwlist
server=/.www.monlamit.org/127.0.0.1#5335
ipset=/.www.monlamit.org/gfwlist
server=/.www.moztw.org/127.0.0.1#5335
@ -10070,6 +10086,8 @@ server=/.xuzhiyong.net/127.0.0.1#5335
ipset=/.xuzhiyong.net/gfwlist
server=/.xvideo.cc/127.0.0.1#5335
ipset=/.xvideo.cc/gfwlist
server=/.xvideos-cdn.com/127.0.0.1#5335
ipset=/.xvideos-cdn.com/gfwlist
server=/.xvideos.com/127.0.0.1#5335
ipset=/.xvideos.com/gfwlist
server=/.xvideos.es/127.0.0.1#5335
@ -10302,8 +10320,6 @@ server=/.zh.uncyclopedia.wikia.com/127.0.0.1#5335
ipset=/.zh.uncyclopedia.wikia.com/gfwlist
server=/.zh.wikinews.org/127.0.0.1#5335
ipset=/.zh.wikinews.org/gfwlist
server=/.zh.wikisource.org/127.0.0.1#5335
ipset=/.zh.wikisource.org/gfwlist
server=/.zhanbin.net/127.0.0.1#5335
ipset=/.zhanbin.net/gfwlist
server=/.zhangboli.net/127.0.0.1#5335

View File

@ -15,17 +15,21 @@ local log = function(...)
end
log('正在更新【GFW列表】数据库')
refresh_cmd = "wget-ssl --no-check-certificate -O - " .. uci:get_first('shadowsocksr', 'global', 'gfwlist_url', 'https://cdn.jsdelivr.net/gh/gfwlist/gfwlist/gfwlist.txt') .. " > /tmp/gfw.b64"
refresh_cmd = "wget-ssl --no-check-certificate -O- " .. uci:get_first('shadowsocksr', 'global', 'gfwlist_url', 'https://cdn.jsdelivr.net/gh/gfwlist/gfwlist/gfwlist.txt') .. " > /tmp/gfw.b64"
sret = luci.sys.call(refresh_cmd .. " 2>/dev/null")
if sret == 0 then
luci.sys.call("/usr/bin/ssr-gfw")
icount = luci.sys.exec("cat /tmp/gfwnew.txt | wc -l")
if tonumber(icount) > 1000 then
oldcount = luci.sys.exec("cat /etc/dnsmasq.ssr/gfw_list.conf | wc -l")
if nixio.fs.access("/etc/dnsmasq.ssr/gfw_list.conf") then
oldcount = luci.sys.exec("cat /etc/dnsmasq.ssr/gfw_list.conf | wc -l")
else
oldcount = "0"
end
if tonumber(icount) ~= tonumber(oldcount) then
luci.sys.exec("cp -f /tmp/gfwnew.txt /etc/dnsmasq.ssr/gfw_list.conf")
luci.sys.exec("cp -f /tmp/gfwnew.txt /tmp/dnsmasq.ssr/gfw_list.conf")
log('更新成功! 新的总纪录数:'.. tostring(tonumber(icount)/2))
log('更新成功! 新的总纪录数:' .. tostring(tonumber(icount)/2))
else
log('你已经是最新数据,无需更新!')
end
@ -38,16 +42,20 @@ else
end
log('正在更新【国内IP段】数据库')
refresh_cmd = "wget-ssl --no-check-certificate -O - ".. uci:get_first('shadowsocksr', 'global', 'chnroute_url','https://ispip.clang.cn/all_cn.txt') .." > /tmp/china_ssr.txt"
refresh_cmd = "wget-ssl --no-check-certificate -O- " .. uci:get_first('shadowsocksr', 'global', 'chnroute_url','https://ispip.clang.cn/all_cn.txt') .. " > /tmp/china_ssr.txt"
sret = luci.sys.call(refresh_cmd .. " 2>/dev/null")
icount = luci.sys.exec("cat /tmp/china_ssr.txt | wc -l")
if sret == 0 then
icount = luci.sys.exec("cat /tmp/china_ssr.txt | wc -l")
if tonumber(icount) > 1000 then
oldcount = luci.sys.exec("cat /etc/china_ssr.txt | wc -l")
if nixio.fs.access("/etc/china_ssr.txt") then
oldcount = luci.sys.exec("cat /etc/china_ssr.txt | wc -l")
else
oldcount = "0"
end
if tonumber(icount) ~= tonumber(oldcount) then
luci.sys.exec("cp -f /tmp/china_ssr.txt /etc/china_ssr.txt")
log('更新成功! 新的总纪录数:'.. icount)
log('更新成功! 新的总纪录数:' .. tostring(tonumber(icount)))
else
log('你已经是最新数据,无需更新!')
end
@ -61,7 +69,7 @@ end
if uci:get_first('shadowsocksr', 'global', 'adblock','0') == "1" then
log('正在更新【广告屏蔽】数据库')
refresh_cmd = "wget-ssl --no-check-certificate -O - ".. uci:get_first('shadowsocksr', 'global', 'adblock_url','https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt') .." > /tmp/adnew.conf"
refresh_cmd = "wget-ssl --no-check-certificate -O- " .. uci:get_first('shadowsocksr', 'global', 'adblock_url','https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt') .. " > /tmp/adnew.conf"
sret = luci.sys.call(refresh_cmd .. " 2>/dev/null")
if sret == 0 then
luci.sys.call("/usr/bin/ssr-ad")
@ -75,7 +83,7 @@ if uci:get_first('shadowsocksr', 'global', 'adblock','0') == "1" then
if tonumber(icount) ~= tonumber(oldcount) then
luci.sys.exec("cp -f /tmp/ad.conf /etc/dnsmasq.ssr/ad.conf")
luci.sys.exec("cp -f /tmp/ad.conf /tmp/dnsmasq.ssr/ad.conf")
log('更新成功! 新的总纪录数:'.. icount)
log('更新成功! 新的总纪录数:' .. tostring(tonumber(icount)))
else
log('你已经是最新数据,无需更新!')
end
@ -90,16 +98,20 @@ end
--[[
log('正在更新【Netflix IP段】数据库')
refresh_cmd = "wget-ssl --no-check-certificate -O - ".. uci:get_first('shadowsocksr', 'global', 'nfip_url','https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/NF_only.txt') .." > /tmp/netflixip.list"
refresh_cmd = "wget-ssl --no-check-certificate -O- " .. uci:get_first('shadowsocksr', 'global', 'nfip_url','https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/NF_only.txt') .. " > /tmp/netflixip.list"
sret = luci.sys.call(refresh_cmd .. " 2>/dev/null")
if sret == 0 then
luci.sys.call("/usr/bin/ssr-gfw")
icount = luci.sys.exec("cat /tmp/netflixip.list | wc -l")
if tonumber(icount) > 5 then
oldcount = luci.sys.exec("cat /etc/config/netflixip.list | wc -l")
if nixio.fs.access("/etc/config/netflixip.list") then
oldcount = luci.sys.exec("cat /etc/config/netflixip.list | wc -l")
else
oldcount = "0"
end
if tonumber(icount) ~= tonumber(oldcount) then
luci.sys.exec("cp -f /tmp/netflixip.list /etc/config/netflixip.list")
log('更新成功! 新的总纪录数:'.. icount)
log('更新成功! 新的总纪录数:' .. tostring(tonumber(icount)))
else
log('你已经是最新数据,无需更新!')
end
@ -111,5 +123,3 @@ else
log('更新失败!')
end
--]]
luci.sys.call("/etc/init.d/dnsmasq reload")