diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index 1d30ecf41..4b1b7d8ef 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:=174 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) 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 665fe3410..4ee3c28f0 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 @@ -8,7 +8,7 @@ # See /LICENSE for more information. # -START=70 +START=95 STOP=15 SERVICE_DAEMONIZE=1 @@ -373,7 +373,7 @@ start_redir() { else threads=$(uci_get_by_type global threads) fi - redir_tcp=1 + if [ "$stype" == "ss" -o "$stype" == "ssr" ]; then local last_config_file=$CONFIG_FILE local pid_file="/var/run/ssr-retcp.pid" @@ -440,7 +440,6 @@ start_redir() { fi if [ -n "$UDP_RELAY_SERVER" ]; then - redir_udp=1 if [ "$utype" == "ss" -o "$utype" == "ssr" ]; then case "$(uci_get_by_name $UDP_RELAY_SERVER auth_enable)" in 1 | on | true | yes | enabled) ARG_OTA="-A" ;; @@ -604,10 +603,15 @@ start_local() { } rules() { - [ "$GLOBAL_SERVER" == "nil" ] && return 1 + if [ "$GLOBAL_SERVER" == "nil" ]; then + return 1 + else + redir_tcp=1 + fi mkdir -p /var/run /var/etc 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