luci ssr plus: add multithreading cpu banlance for UDP relay
This commit is contained in:
parent
a7aa94748f
commit
ad54ad2919
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-ssr-plus
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=71
|
||||
PKG_RELEASE:=72
|
||||
|
||||
PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks \
|
||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_V2ray \
|
||||
|
||||
@ -325,9 +325,10 @@ start_redir() {
|
||||
gen_config_file $UDP_RELAY_SERVER 1
|
||||
last_config_file=$CONFIG_UDP_FILE
|
||||
pid_file="/var/run/ssr-reudp.pid"
|
||||
$ucmd \
|
||||
-c $last_config_file $ARG_OTA -U \
|
||||
-f $pid_file >/dev/null 2>&1
|
||||
for i in $(seq 1 $threads)
|
||||
do
|
||||
$ucmd -c $last_config_file $ARG_OTA -U -f $pid_file >/dev/null 2>&1
|
||||
done
|
||||
elif [ "$utype" == "v2ray" ] ; then
|
||||
lua /usr/share/shadowsocksr/genv2config.lua $UDP_RELAY_SERVER udp $(uci_get_by_name $UDP_RELAY_SERVER local_port) > /var/etc/v2-ssr-reudp.json
|
||||
$ucmd -config /var/etc/v2-ssr-reudp.json >/dev/null 2>&1 &
|
||||
|
||||
Loading…
Reference in New Issue
Block a user