提交 87ebf166 编写于 作者: L lean

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

上级 a59b4009
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册