update 2026-09-25 00:20:43

This commit is contained in:
action committed 2026-09-25 00:20:43 +08:00
1 parent e4cee331e9
commit 45632307c8
2182 files changed
+2769 -1568773

No files matched your search

@@ -94,7 +94,7 @@ run_singbox() {
[ "$type" != "sing-box" ] && [ -n "$SINGBOX_BIN" ] && type="sing-box"
}
[ -z "$type" ] && return 1
[ -n "$log_file" ] || local log_file="/dev/null"
[ -n "$log_file" ] || log_file="/dev/null"
json_init
if [ "$log_file" = "/dev/null" ]; then
json_add_string "log" "0"
@@ -102,7 +102,7 @@ run_singbox() {
json_add_string "log" "1"
json_add_string "logfile" "${log_file}"
fi
[ -z "$loglevel" ] && local loglevel=$(config_n_get @global[0] loglevel "warn")
[ -z "$loglevel" ] && loglevel=$(config_n_get @global[0] loglevel "warn")
json_add_string "loglevel" "$loglevel"
[ -n "$flag" ] && json_add_string "flag" "$flag"
@@ -213,8 +213,8 @@ run_xray() {
}
[ -z "$type" ] && return 1
json_init
[ -n "$log_file" ] || local log_file="/dev/null"
[ -z "$loglevel" ] && local loglevel=$(config_n_get @global[0] loglevel "warning")
[ -n "$log_file" ] || log_file="/dev/null"
[ -z "$loglevel" ] && loglevel=$(config_n_get @global[0] loglevel "warning")
[ -n "$flag" ] && json_add_string "flag" "$flag"
[ -n "$node" ] && json_add_string "node" "$node"
[ -n "$use_proxy_list" ] && json_add_string "use_proxy_list" "$use_proxy_list"
@@ -340,7 +340,7 @@ run_chinadns_ng() {
}
run_socks() {
local flag node bind socks_port config_file http_port http_config_file relay_port log_file no_run
local flag node bind socks_port config_file http_port http_config_file relay_port log_file no_run loglevel
eval_set_val "$@"
[ -n "$config_file" ] && [ -z "$(echo ${config_file} | grep $TMP_PATH)" ] && config_file=$TMP_PATH/$config_file
[ -n "$http_port" ] || http_port=0
@@ -350,6 +350,7 @@ run_socks() {
elif [ "${log_file#"$TMP_PATH/"}" = "$log_file" ]; then
log_file=$TMP_PATH/$log_file
fi
loglevel=${loglevel:-warn}
local type=$(echo $(config_n_get $node type) | tr 'A-Z' 'a-z')
local remarks=$(config_n_get $node remarks)
@@ -442,7 +443,7 @@ run_socks() {
}
[ -n "$relay_port" ] && _args="${_args} server_host=$server_host server_port=$server_port"
[ -n "$no_run" ] && _args="${_args} no_run=1"
run_singbox flag=$flag node=$node socks_address=$bind socks_port=$socks_port config_file=$config_file log_file=$log_file ${_args}
run_singbox flag=$flag node=$node socks_address=$bind socks_port=$socks_port config_file=$config_file log_file=$log_file loglevel=$loglevel ${_args}
;;
xray)
[ "$http_port" != "0" ] && {
@@ -452,7 +453,7 @@ run_socks() {
}
[ -n "$relay_port" ] && _args="${_args} server_host=$server_host server_port=$server_port"
[ -n "$no_run" ] && _args="${_args} no_run=1"
run_xray flag=$flag node=$node socks_address=$bind socks_port=$socks_port config_file=$config_file log_file=$log_file ${_args}
run_xray flag=$flag node=$node socks_address=$bind socks_port=$socks_port config_file=$config_file log_file=$log_file loglevel=$loglevel ${_args}
;;
naiveproxy)
json_add_string "run_type" "socks"
@@ -480,6 +481,7 @@ run_socks() {
}
json_add_string "local_socks_address" "$bind"
json_add_string "local_socks_port" "$socks_port"
json_add_string "loglevel" "$loglevel"
lua $UTIL_SS gen_config "$(json_dump)" > $config_file
[ -n "$no_run" ] || ln_run "$(first_type sslocal)" "sslocal" $log_file -c "$config_file" -v
;;
@@ -493,7 +495,10 @@ run_socks() {
json_add_string "local_socks_address" "$bind"
json_add_string "local_socks_port" "$socks_port"
lua $UTIL_HYSTERIA2 gen_config "$(json_dump)" > $config_file
[ -n "$no_run" ] || ln_run "$(first_type $(config_n_get @global_app[0] hysteria_file))" "hysteria" $log_file -c "$config_file" client
[ -n "$no_run" ] || {
HYSTERIA_LOG_LEVEL="$loglevel" \
ln_run "$(first_type "$(config_n_get @global_app[0] hysteria_file)")" "hysteria" $log_file -c "$config_file" client
}
;;
esac
@@ -792,6 +797,7 @@ start_global() {
}
local plugin_sh="${config_file%.json}_plugin.sh"
json_add_string "plugin_sh" "$plugin_sh"
json_add_string "loglevel" "$(config_n_get @global[0] loglevel "warn")"
lua $UTIL_SS gen_config "$(json_dump)" > $config_file
ln_run "$(first_type sslocal)" "sslocal" $log_file -c "$config_file" -v
;;
@@ -808,7 +814,9 @@ start_global() {
}
json_add_string "tcp_proxy_way" "${TCP_PROXY_WAY}"
lua $UTIL_HYSTERIA2 gen_config "$(json_dump)" > $config_file
ln_run "$(first_type $(config_n_get @global_app[0] hysteria_file))" "hysteria" $log_file -c "$config_file" client
local loglevel=$(config_n_get @global[0] loglevel "warn")
HYSTERIA_LOG_LEVEL="$loglevel" \
ln_run "$(first_type "$(config_n_get @global_app[0] hysteria_file)")" "hysteria" $log_file -c "$config_file" client
;;
esac
if [ -n "${_socks_flag}" ]; then
@@ -1622,7 +1630,7 @@ acl_app() {
run_${type} flag=$node node=$node redir_port=$redir_port ${_extra_param} config_file=$config_file log_file=$log_file loglevel=$loglevel
else
config_file="acl/${node}_SOCKS_${socks_port}.json"
run_socks flag=$node node=$node bind=127.0.0.1 socks_port=$socks_port config_file=$config_file log_file=$log_file
run_socks flag=$node node=$node bind=127.0.0.1 socks_port=$socks_port config_file=$config_file log_file=$log_file loglevel=$loglevel
# log_file=$TMP_ACL_PATH/ipt2socks_${node}_${redir_port}.log
log_file="/dev/null"
run_ipt2socks flag=acl_${node} tcp_tproxy=${is_tproxy} local_port=$redir_port socks_address=127.0.0.1 socks_port=$socks_port log_file=$log_file