1
0
mirror of https://github.com/kenzok8/small-package synced 2025-09-20 19:11:30 +08:00

update-03.09

This commit is contained in:
github-actions[bot]
2022-03-09 20:32:57 +08:00
parent 447a500bb2
commit dda307bf43
3 changed files with 20 additions and 13 deletions

View File

@ -557,8 +557,9 @@ o:depends({type = "v2ray", xtls = false})
o = s:option(Value, "concurrency", translate("Concurrency"))
o.datatype = "uinteger"
o.rmempty = true
o.default = "8"
o.default = "4"
o:depends("mux", "1")
o:depends("type", "naiveproxy")
-- [[ Cert ]]--
o = s:option(Flag, "certificate", translate("Self-signed Certificate"))

View File

@ -323,7 +323,7 @@ gen_config_file() { #server1 type2 code3 local_port4 socks_port5 threads5
naiveproxy)
case "$3" in
1)
lua /usr/share/shadowsocksr/gen_config.lua $1 redir $4 $5 >$config_file
lua /usr/share/shadowsocksr/gen_config.lua $1 redir $4 >$config_file
;;
3)
lua /usr/share/shadowsocksr/gen_config.lua $1 redir $4 >$config_file
@ -409,13 +409,9 @@ start_shunt() {
echolog "shunt:$(get_name $type) Started!"
;;
v2ray)
if [ -n "$tmp_local_port" ]; then
local tmp_port=$tmp_local_port
else
local tmp_port=$tmp_shunt_local_port
gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port $tmp_port
ln_start_bin $(first_type xray v2ray) v2ray -config $shunt_config_file
fi
local tmp_port=${tmp_local_port:-$tmp_shunt_local_port}
gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port $tmp_port
ln_start_bin $(first_type xray v2ray) v2ray -config $shunt_config_file
ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_port 8.8.8.8:53 127.0.0.1:$tmp_shunt_dns_port -q
echolog "shunt:$($(first_type xray v2ray) -version | head -1) Started!"
;;
@ -492,8 +488,8 @@ start_local() {
if [ "$_local" == "2" ]; then
gen_config_file $LOCAL_SERVER $type 4 0 $local_port
ln_start_bin $(first_type xray v2ray) v2ray -config $local_config_file
echolog "Global_Socks5:$($(first_type "xray" "v2ray") -version | head -1) Started!"
fi
echolog "Global_Socks5:$($(first_type "xray" "v2ray") -version | head -1) Started!"
;;
trojan) #client
gen_config_file $LOCAL_SERVER $type 4 $local_port
@ -564,8 +560,7 @@ Start_Run() {
echolog "Main node:$($(first_type $type) --version 2>&1 | head -1) , $threads Threads Started!"
;;
naiveproxy)
[ "$(uci_get_by_type global threads 0)" == "0" ] && threads=1
gen_config_file $GLOBAL_SERVER $type 1 $tcp_port $threads
gen_config_file $GLOBAL_SERVER $type 1 $tcp_port
ln_start_bin $(first_type naive) naive $tcp_config_file
echolog "Main node:$($(first_type naive) --version 2>&1 | head -1) , $threads Threads Started!"
;;
@ -638,6 +633,11 @@ load_config() {
start_local
local_enable=0
;;
$SHUNT_SERVER)
_local="3"
local_config_file=$TMP_PATH/tcp-udp-ssr-local.json
start_local
;;
*)
_local="2"
local_config_file=$TMP_PATH/tcp-udp-ssr-local.json
@ -652,6 +652,12 @@ load_config() {
shunt="1"
SHUNT_SERVER=$GLOBAL_SERVER
;;
$LOCAL_SERVER)
shunt="$tmp_shunt_port"
shunt_config_file=$TMP_PATH/tcp-udp-ssr-local.json
shunt_dns_config_file=$TMP_PATH/shunt-dns-ssr-plus.json
start_shunt
;;
*)
shunt="$tmp_shunt_port"
shunt_config_file=$TMP_PATH/shunt-ssr-retcp.json

View File

@ -227,7 +227,7 @@ local trojan = {
local naiveproxy = {
proxy = (server.username and server.password and server.server and server.server_port) and "https://" .. server.username .. ":" .. server.password .. "@" .. server.server .. ":" .. server.server_port,
listen = (proto == "redir") and "redir" .. "://0.0.0.0:" .. tonumber(local_port) or "socks" .. "://0.0.0.0:" .. tonumber(local_port),
["insecure-concurrency"] = (socks_port ~= "0") and tonumber(socks_port) or "1"
["insecure-concurrency"] = tonumber(server.concurrency) or 1
}
local ss = {
server = (server.kcp_enable == "1") and "127.0.0.1" or server.server,