luci ssr plus :fix udp relay mode when using the same server witch tcp

This commit is contained in:
coolsnowwolf 2018-11-11 16:27:38 +08:00
parent b9a34151ca
commit 74481c3ed1
2 changed files with 7 additions and 10 deletions

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ssr-plus
PKG_VERSION:=1
PKG_RELEASE:=41
PKG_RELEASE:=42
PO2LMO:=$(BUILD_DIR)/luci-base/po2lmo

View File

@ -307,8 +307,7 @@ start_redir() {
$sscmd -config /var/etc/v2-ssr-retcp.json >/dev/null 2>&1 &
fi
if [ "$ARG_UDP" = "-U" ]; then
if [ "$utype" == "ss" -o "$utype" == "ssr" ] ;then
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";;
*) ARG_OTA="";;
@ -319,15 +318,13 @@ start_redir() {
redir_udp=1
$ucmd \
-c $last_config_file $ARG_OTA $ARG_UDP \
-f $pid_file
fi
fi
if [ "$utype" == "v2ray" ] ; then
lua /usr/share/shadowsocksr/genv2config.lua $UDP_RELAY_SERVER udp > /var/etc/v2-ssr-reudp.json
$ucmd -config /var/etc/v2-ssr-reudp.json >/dev/null 2>&1 &
-f $pid_file
elif [ "$utype" == "v2ray" ] ; then
lua /usr/share/shadowsocksr/genv2config.lua $UDP_RELAY_SERVER udp > /var/etc/v2-ssr-reudp.json
$ucmd -config /var/etc/v2-ssr-reudp.json >/dev/null 2>&1 &
fi
#deal with dns
if [ "$(uci_get_by_type global pdnsd_enable)" = "1" ] ;then