From e53b8cf2309ccc1ef9123e85edcc115d8363027a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 2 Aug 2020 21:06:33 +0000 Subject: [PATCH] [bot] luci-app-ssr-plus: update latest commit: 9028c41284e1b6e63409ec07c6d7b80b9d488a77 --- .../luasrc/model/cbi/shadowsocksr/advanced.lua | 4 ++-- .../luci-app-ssr-plus/root/etc/init.d/shadowsocksr | 13 ++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) 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 1d409a87ffa56d..71c57c66ef6e13 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 @@ -49,8 +49,8 @@ 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("anti-AD")) -o.default = "https://gitee.com/privacy-protection-tools/anti-ad/raw/master/anti-ad-for-dnsmasq.conf" +o:value("https://anti-ad.net/anti-ad-for-dnsmasq.conf", translate("anti-AD")) +o.default = "https://anti-ad.net/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/root/etc/init.d/shadowsocksr b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index aa6f6cf9d729bf..658a493b4a34fb 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 @@ -306,7 +306,8 @@ start_dns() { start_redir_tcp() { local type=$(uci_get_by_name $GLOBAL_SERVER type) local bin=$(find_bin $type) - [ ! -f "$bin" ] && echo "$(date "+%Y-%m-%d %H:%M:%S") Main node:Can't find $bin program, can't start!" >>/tmp/ssrplus.log && return 1 + redir_tcp=1 + [ ! -f "$bin" ] && echo "$(date "+%Y-%m-%d %H:%M:%S") Main node:Can't find $bin program, can't start!" >>/tmp/ssrplus.log && redir_tcp=0 && return 1 case "$(uci_get_by_name $GLOBAL_SERVER auth_enable)" in 1 | on | true | yes | enabled) ARG_OTA="-A" ;; *) ARG_OTA="" ;; @@ -374,9 +375,10 @@ start_redir_tcp() { start_redir_udp() { if [ -n "$UDP_RELAY_SERVER" ]; then + redir_udp=1 local type=$(uci_get_by_name $UDP_RELAY_SERVER type) local bin=$(find_bin $type) - [ ! -f "$bin" ] && echo "$(date "+%Y-%m-%d %H:%M:%S") UDP TPROXY Relay:Can't find $bin program, can't start!" >>/tmp/ssrplus.log && return 1 + [ ! -f "$bin" ] && echo "$(date "+%Y-%m-%d %H:%M:%S") UDP TPROXY Relay:Can't find $bin program, can't start!" >>/tmp/ssrplus.log && redir_udp=0 && return 1 case "$type" in ss | ssr) case "$(uci_get_by_name $UDP_RELAY_SERVER auth_enable)" in @@ -480,12 +482,12 @@ start_local() { [ "$local_server" == "same" ] && local_server=$GLOBAL_SERVER local type=$(uci_get_by_name $local_server type) local bin=$(find_bin $type) - [ ! -f "$bin" ] && echo "$(date "+%Y-%m-%d %H:%M:%S") Global_Socks5:Can't find $bin program, can't start!" >>/tmp/ssrplus.log && return 1 + [ ! -f "$bin" ] && echo "$(date "+%Y-%m-%d %H:%M:%S") Global_Socks5:Can't find $bin program, can't start!" >>/tmp/ssrplus.log && local_enable=0 && return 1 case "$type" in ss | ssr) local name="Shadowsocks" local bin=$(find_bin $type-local) - [ ! -f "$bin" ] && echo "$(date "+%Y-%m-%d %H:%M:%S") Global_Socks5:Can't find $bin program, can't start!" >>/tmp/ssrplus.log && return 1 + [ ! -f "$bin" ] && echo "$(date "+%Y-%m-%d %H:%M:%S") Global_Socks5:Can't find $bin program, can't start!" >>/tmp/ssrplus.log && local_enable=0 && return 1 [ "$type" == "ssr" ] && name="ShadowsocksR" gen_config_file $local_server 3 $(uci_get_by_type socks5_proxy local_port 1080) $bin -c $CONFIG_SOCK5_FILE -u -f /var/run/ssr-local.pid >/dev/null 2>&1 @@ -668,14 +670,11 @@ start_rules() { rules() { if [ "$GLOBAL_SERVER" == "nil" ]; then return 1 - else - redir_tcp=1 fi mkdir -p /var/run /var/etc run_mode=$(uci_get_by_type global run_mode) UDP_RELAY_SERVER=$(uci_get_by_type global udp_relay_server) [ "$UDP_RELAY_SERVER" == "same" ] && UDP_RELAY_SERVER=$GLOBAL_SERVER - [ -n "$UDP_RELAY_SERVER" ] && redir_udp=1 if start_rules; then return 0 else