|
|
@@ -204,7 +204,8 @@ gen_config_file() {
|
|
|
cat <<-EOF >/var/etc/naive-ssr-$FILE_NAME.json
|
|
|
{
|
|
|
"listen": "$PROTO://0.0.0.0:$3",
|
|
|
- "proxy": "https://$(uci_get_by_name $1 username):$(uci_get_by_name $1 password)@$(uci_get_by_name $1 server):$(uci_get_by_name $1 server_port)"
|
|
|
+ "proxy": "https://$(uci_get_by_name $1 username):$(uci_get_by_name $1 password)@$(uci_get_by_name $1 server):$(uci_get_by_name $1 server_port)",
|
|
|
+ "concurrency": "${4:-1}"
|
|
|
}
|
|
|
EOF
|
|
|
;;
|
|
|
@@ -342,12 +343,12 @@ start_redir_tcp() {
|
|
|
-l :$server_port $password $kcp_param
|
|
|
kcp_enable_flag=1
|
|
|
fi
|
|
|
- gen_config_file $GLOBAL_SERVER 0 $(uci_get_by_name $GLOBAL_SERVER local_port 1234)
|
|
|
if [ "$(uci_get_by_type global threads 0)" == "0" ]; then
|
|
|
threads=$(cat /proc/cpuinfo | grep 'processor' | wc -l)
|
|
|
else
|
|
|
threads=$(uci_get_by_type global threads)
|
|
|
fi
|
|
|
+ gen_config_file $GLOBAL_SERVER 0 $(uci_get_by_name $GLOBAL_SERVER local_port 1234) $threads
|
|
|
case "$type" in
|
|
|
ss | ssr)
|
|
|
local last_config_file=$CONFIG_FILE
|
|
|
@@ -370,7 +371,7 @@ start_redir_tcp() {
|
|
|
;;
|
|
|
naiveproxy)
|
|
|
$bin /var/etc/naive-ssr-retcp.json >/dev/null 2>&1 &
|
|
|
- echo "$(date "+%Y-%m-%d %H:%M:%S") Main node:$($bin --version 2>&1 | head -1) Started!" >>/tmp/ssrplus.log
|
|
|
+ echo "$(date "+%Y-%m-%d %H:%M:%S") Main node:$($bin --version 2>&1 | head -1) , $threads Threads Started!" >>/tmp/ssrplus.log
|
|
|
;;
|
|
|
socks5)
|
|
|
/usr/share/shadowsocksr/genred2config.sh "/var/etc/redsocks-ssr-retcp.conf" socks5 tcp $(uci_get_by_name $GLOBAL_SERVER local_port) \
|