mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-19 14:13:30 +00:00
luci ssr plus: combined into one instance when tcp and udp node are the same to save ram usage
This commit is contained in:
parent
6f0e369f9b
commit
6260fa89e2
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-ssr-plus
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=73
|
||||
PKG_RELEASE:=75
|
||||
|
||||
PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks \
|
||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_V2ray \
|
||||
|
@ -303,6 +303,21 @@ start_redir() {
|
||||
fi
|
||||
|
||||
redir_tcp=1
|
||||
|
||||
if [ "$ARG_UDP" = "-u" ]; then
|
||||
redir_udp=1
|
||||
if [ "$stype" == "ss" -o "$stype" == "ssr" ] ;then
|
||||
local last_config_file=$CONFIG_FILE
|
||||
for i in $(seq 1 $threads)
|
||||
do
|
||||
$sscmd -c $CONFIG_FILE $ARG_OTA -u -f /var/run/ssr-retcp-ssr-reudp_$i.pid >/dev/null 2>&1
|
||||
done
|
||||
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
|
||||
local last_config_file=$CONFIG_FILE
|
||||
local pid_file="/var/run/ssr-retcp.pid"
|
||||
@ -334,6 +349,8 @@ start_redir() {
|
||||
$ucmd -config /var/etc/v2-ssr-reudp.json >/dev/null 2>&1 &
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user