From e5a225503e79a7bdddd4766758a3bc17436d7c6a Mon Sep 17 00:00:00 2001 From: shenyunet Date: Fri, 1 Mar 2024 19:51:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=B0=8F=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luci-app-ssr-plus/root/etc/init.d/shadowsocksr | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index 1ebd7235c..6cfad51f6 100755 --- a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -947,13 +947,16 @@ start_rules() { esac } if [ "$(uci_get_by_type global dports)" == "3" ]; then - local custom_ports=$(uci_get_by_name $GLOBAL_SERVER custom_ports) #custom_ports 存储了用户自定义的端口 - if [ -n "$custom_ports" ]; then - local proxyport="-m multiport --dports $custom_ports" - fi - if [ "$(uci_get_by_type global dports 1)" == "2" ]; then - local proxyport="-m multiport --dports 22,53,587,465,995,993,143,80,443,853,9418" + local custom_ports=$(uci_get_by_name $GLOBAL_SERVER custom_ports) # custom_ports 存储了用户自定义的端口 + if [ -n "$custom_ports" ]; then + local proxyport="-m multiport --dports $custom_ports" + fi + else + if [ "$(uci_get_by_type global dports 1)" == "2" ]; then + local proxyport="-m multiport --dports 22,53,587,465,995,993,143,80,443,853,9418" + fi fi + get_arg_out() { case "$(uci_get_by_type access_control router_proxy 1)" in 1) echo "-o" ;;