Mattraks 4 éve
szülő
commit
5be011eb74
1 módosított fájl, 4 hozzáadás és 9 törlés
  1. 4 9
      luci-app-ssr-plus/root/etc/init.d/shadowsocksr

+ 4 - 9
luci-app-ssr-plus/root/etc/init.d/shadowsocksr

@@ -340,9 +340,8 @@ start_udp() {
 	ss | ssr)
 	ss | ssr)
 		gen_config_file $UDP_RELAY_SERVER $type 2 $tmp_udp_port
 		gen_config_file $UDP_RELAY_SERVER $type 2 $tmp_udp_port
 		ss_program="$(first_type ${type}local ${type}-redir)"
 		ss_program="$(first_type ${type}local ${type}-redir)"
-		[ "$(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
+		[ "$(printf '%s' "$ss_program" | awk -F '/' '{print $NF}')" = "${type}local" ] && ss_extra_arg="--protocol redir"
+		ln_start_bin $ss_program ${type}-redir -c $udp_config_file $ss_extra_arg -U
 		echolog "UDP TPROXY Relay:$(get_name $type) Started!"
 		echolog "UDP TPROXY Relay:$(get_name $type) Started!"
 		;;
 		;;
 	v2ray)
 	v2ray)
@@ -470,10 +469,7 @@ start_local() {
 	case "$type" in
 	case "$type" in
 	ss | ssr)
 	ss | ssr)
 		gen_config_file $LOCAL_SERVER $type 4 $local_port
 		gen_config_file $LOCAL_SERVER $type 4 $local_port
-		ss_program="$(first_type ${type}local ${type}-local)"
-		[ "$(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
+		ln_start_bin $(first_type ${type}local ${type}-local) ${type}-local -c $local_config_file -u
 		echolog "Global_Socks5:$(get_name $type) Started!"
 		echolog "Global_Socks5:$(get_name $type) Started!"
 		;;
 		;;
 	v2ray)
 	v2ray)
@@ -534,8 +530,7 @@ Start_Run() {
 	ss | ssr)
 	ss | ssr)
 		gen_config_file $GLOBAL_SERVER $type 1 $tcp_port
 		gen_config_file $GLOBAL_SERVER $type 1 $tcp_port
 		ss_program="$(first_type ${type}local ${type}-redir)"
 		ss_program="$(first_type ${type}local ${type}-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; }
+		[ "$(printf '%s' "$ss_program" | awk -F '/' '{print $NF}')" = "${type}local" ] && ss_extra_arg="--protocol redir"
 		for i in $(seq 1 $threads); do
 		for i in $(seq 1 $threads); do
 			ln_start_bin "$ss_program" ${type}-redir -c $tcp_config_file $ARG_OTA $ss_extra_arg
 			ln_start_bin "$ss_program" ${type}-redir -c $tcp_config_file $ARG_OTA $ss_extra_arg
 		done
 		done