diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index 6b8930218..6627258e5 100644 --- a/package/lean/luci-app-ssr-plus/Makefile +++ b/package/lean/luci-app-ssr-plus/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-ssr-plus PKG_VERSION:=173 -PKG_RELEASE:=3 +PKG_RELEASE:=5 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) 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 2ae4d603e..07e7d69b3 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua @@ -47,7 +47,7 @@ function act_ping() socket:setopt("socket", "sndtimeo", 3) e.socket = socket:connect(domain, port) socket:close() - e.ping = luci.sys.exec(string.format("echo -n $(tcpping -c 1 -i 1 -p %s %s 2>&1 | grep -o 'time=[0-9]*.[0-9]' | awk -F '=' '{print$2}') 2>/dev/null",port, domain)) + 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)) if (e.ping == "") then 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) end diff --git a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua index 7d984cc12..50415ee60 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua @@ -46,11 +46,12 @@ o:depends("enable_switch", "1") o.default = 3 o = s:option(Value, "chnroute_url", translate("Chnroute Update url")) -o:value("https://ispip.clang.cn/all_cn.txt", translate("https://ispip.clang.cn/all_cn.txt")) +o:value("https://ispip.clang.cn/all_cn.txt", translate("Clang.CN")) o.default = "https://ispip.clang.cn/all_cn.txt" o = s:option(Value, "nfip_url", translate("nfip_url")) -o:value("https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/NF_only.txt", translate("https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/NF_only.txt")) +o:value("https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/NF_only.txt", translate("Netflix IP Only")) +o:value("https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/getflix.txt", translate("Netflix and AWS")) o.default = "https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/NF_only.txt" o.description = translate("Customize Netflix IP Url") @@ -58,7 +59,7 @@ o = s:option(Flag, "adblock", translate("Enable adblock")) o.rmempty = false o = s:option(Value, "adblock_url", translate("adblock_url")) -o:value("https://gitee.com/privacy-protection-tools/anti-ad/raw/master/anti-ad-for-dnsmasq.conf", translate("https://gitee.com/privacy-protection-tools/anti-ad/raw/master/anti-ad-for-dnsmasq.conf")) +o:value("https://gitee.com/privacy-protection-tools/anti-ad/raw/master/anti-ad-for-dnsmasq.conf", translate("anti-AD")) o.default = "https://gitee.com/privacy-protection-tools/anti-ad/raw/master/anti-ad-for-dnsmasq.conf" o:depends("adblock", "1") o.description = translate("Support AdGuardHome and DNSMASQ format list") 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 5b8d85482..0ae5219ee 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 @@ -67,7 +67,7 @@ if luci.sys.call("busybox ps -w | grep ssr-retcp | grep -v grep >/dev/null") == redir_run=1 end -if luci.sys.call("busybox ps -w | grep ssr-local | grep -v grep >/dev/null") == 0 then +if luci.sys.call("busybox ps -w | grep ssr-local | grep -v ssr-socksdns |grep -v grep >/dev/null") == 0 then sock5_run=1 end diff --git a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index b18203f32..494d1cc2a 100755 --- a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -656,7 +656,17 @@ start() { ipset add netflix $nip 2>/dev/null done else - rm -f /tmp/dnsmasq.ssr/netflix_forward.conf + cat /etc/config/netflix.list | while read line || [ -n "$line" ]; + do + sed -i "/$line/d" /tmp/dnsmasq.ssr/gfw_list.conf + done + awk '!/^$/&&!/^#/{printf("ipset=/.%s/'"netflix"'\n",$0)}' /etc/config/netflix.list > /tmp/dnsmasq.ssr/netflix_forward.conf + awk '!/^$/&&!/^#/{printf("server=/.%s/'"127.0.0.1#5335"'\n",$0)}' /etc/config/netflix.list >> /tmp/dnsmasq.ssr/netflix_forward.conf + ipset -N netflix hash:net 2>/dev/null + cat /etc/config/netflixip.list | while read nip || [ -n "$nip" ]; + do + ipset add netflix $nip 2>/dev/null + done fi /etc/init.d/dnsmasq restart >/dev/null 2>&1 diff --git a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules index d8f31cd84..58e95df2a 100755 --- a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules +++ b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules @@ -127,6 +127,8 @@ ipset_r() { else ipset -! add whitelist $NETFLIX_IP fi + else + $IPT -I SS_SPEC_WAN_AC -p tcp -m set --match-set netflix dst -j REDIRECT --to-ports $local_port fi return $?