luci-app-ssr-plus: force ssr-monitor to enable ssr-redir

This commit is contained in:
lean 2020-03-25 10:58:04 +08:00
parent a59b400913
commit 87ebf166cf
2 changed files with 9 additions and 5 deletions

View File

@ -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)

View File

@ -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