luci ssr plus: splite tcp and udp to 2 instance
This commit is contained in:
parent
59a6964da8
commit
9b3b5c8cce
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=luci-app-ssr-plus
|
PKG_NAME:=luci-app-ssr-plus
|
||||||
PKG_VERSION:=1
|
PKG_VERSION:=1
|
||||||
PKG_RELEASE:=48
|
PKG_RELEASE:=49
|
||||||
|
|
||||||
PO2LMO:=$(BUILD_DIR)/luci-base/po2lmo
|
PO2LMO:=$(BUILD_DIR)/luci-base/po2lmo
|
||||||
|
|
||||||
|
@ -286,8 +286,6 @@ start_redir() {
|
|||||||
sscmd="/usr/bin/v2ray/v2ray"
|
sscmd="/usr/bin/v2ray/v2ray"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
redir_tcp=1
|
|
||||||
|
|
||||||
local utype=$(uci_get_by_name $UDP_RELAY_SERVER type)
|
local utype=$(uci_get_by_name $UDP_RELAY_SERVER type)
|
||||||
if [ "$utype" == "ss" ] ;then
|
if [ "$utype" == "ss" ] ;then
|
||||||
ucmd="/usr/bin/ss-redir"
|
ucmd="/usr/bin/ss-redir"
|
||||||
@ -297,18 +295,7 @@ start_redir() {
|
|||||||
ucmd="/usr/bin/v2ray/v2ray"
|
ucmd="/usr/bin/v2ray/v2ray"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$ARG_UDP" = "-u" ]; then
|
redir_tcp=1
|
||||||
redir_udp=1
|
|
||||||
if [ "$stype" == "ss" -o "$stype" == "ssr" ] ;then
|
|
||||||
local last_config_file=$CONFIG_FILE
|
|
||||||
$sscmd \
|
|
||||||
-c $CONFIG_FILE $ARG_OTA -u \
|
|
||||||
-f /var/run/ssr-retcp-ssr-reudp.pid >/dev/null 2>&1
|
|
||||||
elif [ "$utype" == "v2ray" ] ; then
|
|
||||||
lua /usr/share/shadowsocksr/genv2config.lua $GLOBAL_SERVER 'tcp,udp' $(uci_get_by_name $GLOBAL_SERVER local_port) > /var/etc/v2-ssr-retcp-ssr-reudp.json
|
|
||||||
$ucmd -config /var/etc/v2-ssr-retcp-ssr-reudp.json >/dev/null 2>&1 &
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ "$stype" == "ss" -o "$stype" == "ssr" ] ;then
|
if [ "$stype" == "ss" -o "$stype" == "ssr" ] ;then
|
||||||
local last_config_file=$CONFIG_FILE
|
local last_config_file=$CONFIG_FILE
|
||||||
local pid_file="/var/run/ssr-retcp.pid"
|
local pid_file="/var/run/ssr-retcp.pid"
|
||||||
@ -319,7 +306,7 @@ start_redir() {
|
|||||||
$sscmd -config /var/etc/v2-ssr-retcp.json >/dev/null 2>&1 &
|
$sscmd -config /var/etc/v2-ssr-retcp.json >/dev/null 2>&1 &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$ARG_UDP" = "-U" ]; then
|
if [ -n $UDP_RELAY_SERVER ] ;then
|
||||||
redir_udp=1
|
redir_udp=1
|
||||||
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
|
case "$(uci_get_by_name $UDP_RELAY_SERVER auth_enable)" in
|
||||||
@ -337,7 +324,6 @@ start_redir() {
|
|||||||
$ucmd -config /var/etc/v2-ssr-reudp.json >/dev/null 2>&1 &
|
$ucmd -config /var/etc/v2-ssr-reudp.json >/dev/null 2>&1 &
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user