luci-app-ssr-plus: fix bugs
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
e5cfcabfb9
commit
cc5d55ee44
@ -340,8 +340,9 @@ start_udp() {
|
||||
ss | ssr)
|
||||
gen_config_file $UDP_RELAY_SERVER $type 2 $tmp_udp_port
|
||||
ss_program="$(first_type ${type}local ${type}-redir)"
|
||||
[ "$(printf '%s' "$ss_program" | awk -F '/' '{print $NF}')" = "${type}local" ] && ss_exrta_arg="--protocol redir"
|
||||
ln_start_bin $ss_program ${type}-redir -c $udp_config_file -U $ss_exrta_arg
|
||||
[ "$(printf '%s' "$ss_program" | awk -F '/' '{print $NF}')" = "${type}local" ] && \
|
||||
ss_extra_arg="--protocol redir -u" || ss_extra_arg="-U"
|
||||
ln_start_bin $ss_program ${type}-redir -c $udp_config_file $ss_extra_arg
|
||||
echolog "UDP TPROXY Relay:$(get_name $type) Started!"
|
||||
;;
|
||||
v2ray)
|
||||
@ -383,8 +384,8 @@ start_shunt() {
|
||||
ss | ssr)
|
||||
gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port
|
||||
ss_program="$(first_type ${type}local ${type}-redir)"
|
||||
[ "$(printf '%s' "$ss_program" | awk -F '/' '{print $NF}')" = "${type}local" ] && ss_exrta_arg="--protocol redir"
|
||||
ln_start_bin $ss_program ${type}-redir -c $shunt_config_file $ss_exrta_arg
|
||||
[ "$(printf '%s' "$ss_program" | awk -F '/' '{print $NF}')" = "${type}local" ] && ss_extra_arg="--protocol redir"
|
||||
ln_start_bin $ss_program ${type}-redir -c $shunt_config_file $ss_extra_arg
|
||||
if [ -n "$tmp_local_port" ]; then
|
||||
local tmp_port=$tmp_local_port
|
||||
else
|
||||
@ -469,7 +470,10 @@ start_local() {
|
||||
case "$type" in
|
||||
ss | ssr)
|
||||
gen_config_file $LOCAL_SERVER $type 4 $local_port
|
||||
ln_start_bin $(first_type ${type}local ${type}-local) ${type}-local -c $local_config_file -u
|
||||
ss_program="$(first_type ${type}local ${type}-redir)"
|
||||
[ "$(printf '%s' "$ss_program" | awk -F '/' '{print $NF}')" = "${type}local" ] && \
|
||||
ss_extra_arg="-U" || ss_extra_arg="-u"
|
||||
ln_start_bin $ss_program ${type}-local -c $local_config_file $ss_extra_arg
|
||||
echolog "Global_Socks5:$(get_name $type) Started!"
|
||||
;;
|
||||
v2ray)
|
||||
@ -530,9 +534,10 @@ Start_Run() {
|
||||
ss | ssr)
|
||||
gen_config_file $GLOBAL_SERVER $type 1 $tcp_port
|
||||
ss_program="$(first_type ${type}local ${type}-redir)"
|
||||
[ "$(printf '%s' "$ss_program" | awk -F '/' '{print $NF}')" = "${type}local" ] && ss_exrta_arg="--protocol redir"
|
||||
[ "$(printf '%s' "$ss_program" | awk -F '/' '{print $NF}')" = "${type}local" ] && \
|
||||
{ ss_extra_arg="--protocol redir"; case ${ARG_OTA} in '-u') ARG_OTA='-U';; '-U') ARG_OTA='-u';; esac; }
|
||||
for i in $(seq 1 $threads); do
|
||||
ln_start_bin "$ss_program" ${type}-redir -c $tcp_config_file $ARG_OTA $ss_exrta_arg
|
||||
ln_start_bin "$ss_program" ${type}-redir -c $tcp_config_file $ARG_OTA $ss_extra_arg
|
||||
done
|
||||
echolog "Main node:$(get_name $type) $threads Threads Started!"
|
||||
;;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user