luci-app-ssr-plus: fix netflix mode

This commit is contained in:
lean 2020-03-17 17:30:15 +08:00
parent 4c938e80e6
commit 927f42be71
2 changed files with 21 additions and 21 deletions

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ssr-plus
PKG_VERSION:=169
PKG_RELEASE:=3
PKG_RELEASE:=5
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

View File

@ -310,26 +310,23 @@ start_redir() {
elif [ "$stype" == "tun" ]; then
sscmd="/usr/sbin/redsocks2"
fi
if [ "$NETFLIX_SERVER" != "same" ]; then
NETFLIX_SERVER=$GLOBAL_SERVER
local ntype=$(uci_get_by_name $NETFLIX_SERVER type)
if [ "$ntype" == "ss" ]; then
ncmd="/usr/bin/ss-redir"
sssock="/usr/bin/ss-local"
elif [ "$ntype" == "ssr" ]; then
ncmd="/usr/bin/ssr-redir"
sssock="/usr/bin/ssr-local"
elif [ "$ntype" == "v2ray" ]; then
ncmd="/usr/bin/v2ray/v2ray"
[ ! -f "$ncmd" ] && ncmd="/usr/bin/v2ray"
elif [ "$ntype" == "trojan" ]; then
ncmd="/usr/sbin/trojan"
elif [ "$ntype" == "socks5" ]; then
ncmd="/usr/sbin/redsocks2"
elif [ "$ntype" == "tun" ]; then
ncmd="/usr/sbin/redsocks2"
fi
local ntype=$(uci_get_by_name $NETFLIX_SERVER type)
if [ "$ntype" == "ss" ]; then
ncmd="/usr/bin/ss-redir"
sssock="/usr/bin/ss-local"
elif [ "$ntype" == "ssr" ]; then
ncmd="/usr/bin/ssr-redir"
sssock="/usr/bin/ssr-local"
elif [ "$ntype" == "v2ray" ]; then
ncmd="/usr/bin/v2ray/v2ray"
[ ! -f "$ncmd" ] && ncmd="/usr/bin/v2ray"
elif [ "$ntype" == "trojan" ]; then
ncmd="/usr/sbin/trojan"
elif [ "$ntype" == "socks5" ]; then
ncmd="/usr/sbin/redsocks2"
elif [ "$ntype" == "tun" ]; then
ncmd="/usr/sbin/redsocks2"
fi
local utype=$(uci_get_by_name $UDP_RELAY_SERVER type)
@ -593,6 +590,9 @@ start() {
fi
NETFLIX_SERVER=$(uci_get_by_type global netflix_server same)
if [ "$NETFLIX_SERVER" == "same" ]; then
NETFLIX_SERVER=$GLOBAL_SERVER
fi
if rules; then
start_redir