|
@@ -359,12 +359,12 @@ start_udp() {
|
|
|
ARG_UDP=""
|
|
|
;;
|
|
|
socks5)
|
|
|
- if [ "$(uci_get_by_name $UDP_RELAY_SERVER auth_enable 0)" == "1" ]; then
|
|
|
- local auth="-a $(uci_get_by_name $UDP_RELAY_SERVER username) -k $(uci_get_by_name $UDP_RELAY_SERVER password)"
|
|
|
- fi
|
|
|
- ln_start_bin $(first_type ipt2socks) ipt2socks $udp_config_file -U -4 -s $(uci_get_by_name $UDP_RELAY_SERVER server) -p $(uci_get_by_name $UDP_RELAY_SERVER server_port) -l $tmp_udp_port $auth
|
|
|
- #gen_config_file $UDP_RELAY_SERVER $type 2 $tmp_udp_port
|
|
|
- #ln_start_bin $(first_type redsocks2) redsocks2 -c $udp_config_file
|
|
|
+ # if [ "$(uci_get_by_name $UDP_RELAY_SERVER auth_enable 0)" == "1" ]; then
|
|
|
+ # local auth="-a $(uci_get_by_name $UDP_RELAY_SERVER username) -k $(uci_get_by_name $UDP_RELAY_SERVER password)"
|
|
|
+ # fi
|
|
|
+ # ln_start_bin $(first_type ipt2socks) ipt2socks $udp_config_file -U -4 -s $(uci_get_by_name $UDP_RELAY_SERVER server) -p $(uci_get_by_name $UDP_RELAY_SERVER server_port) -l $tmp_udp_port $auth
|
|
|
+ gen_config_file $UDP_RELAY_SERVER $type 2 $tmp_udp_port
|
|
|
+ ln_start_bin $(first_type redsocks2) redsocks2 -c $udp_config_file
|
|
|
echolog "UDP TPROXY Relay:Socks5 REDIRECT/TPROXY Started!"
|
|
|
;;
|
|
|
tun)
|
|
@@ -426,22 +426,22 @@ start_shunt() {
|
|
|
echolog "shunt:$($(first_type "naive") --version 2>&1 | head -1) Started!"
|
|
|
redir_udp=0
|
|
|
;;
|
|
|
- socks5)
|
|
|
- if [ "$(uci_get_by_name $SHUNT_SERVER auth_enable 0)" == "1" ]; then
|
|
|
- local auth="-a $(uci_get_by_name $SHUNT_SERVER username) -k $(uci_get_by_name $SHUNT_SERVER password)"
|
|
|
- fi
|
|
|
- ln_start_bin $(first_type ipt2socks) ipt2socks $shunt_config_file -R -4 -s $(uci_get_by_name $SHUNT_SERVER server) -p $(uci_get_by_name $SHUNT_SERVER server_port) -l $tmp_shunt_port $auth
|
|
|
- #gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port
|
|
|
- #ln_start_bin $(first_type redsocks2) redsocks2 -c $shunt_config_file
|
|
|
- if [ -n "$tmp_local_port" ]; then
|
|
|
- local tmp_port=$tmp_local_port
|
|
|
- else
|
|
|
- local tmp_port=$tmp_shunt_local_port
|
|
|
- ln_start_bin $(first_type microsocks) microsocks -i 127.0.0.1 -p $tmp_port shunt-dns-ssr-plus
|
|
|
- fi
|
|
|
- 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:$type REDIRECT/TPROXY Started!"
|
|
|
- ;;
|
|
|
+ # socks5)
|
|
|
+ # if [ "$(uci_get_by_name $SHUNT_SERVER auth_enable 0)" == "1" ]; then
|
|
|
+ # local auth="-a $(uci_get_by_name $SHUNT_SERVER username) -k $(uci_get_by_name $SHUNT_SERVER password)"
|
|
|
+ # fi
|
|
|
+ # ln_start_bin $(first_type ipt2socks) ipt2socks $shunt_config_file -R -4 -s $(uci_get_by_name $SHUNT_SERVER server) -p $(uci_get_by_name $SHUNT_SERVER server_port) -l $tmp_shunt_port $auth
|
|
|
+ # #gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port
|
|
|
+ # #ln_start_bin $(first_type redsocks2) redsocks2 -c $shunt_config_file
|
|
|
+ # if [ -n "$tmp_local_port" ]; then
|
|
|
+ # local tmp_port=$tmp_local_port
|
|
|
+ # else
|
|
|
+ # local tmp_port=$tmp_shunt_local_port
|
|
|
+ # ln_start_bin $(first_type microsocks) microsocks -i 127.0.0.1 -p $tmp_port shunt-dns-ssr-plus
|
|
|
+ # fi
|
|
|
+ # 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:$type REDIRECT/TPROXY Started!"
|
|
|
+ # ;;
|
|
|
*)
|
|
|
gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port
|
|
|
ln_start_bin $(first_type redsocks2) redsocks2 -c $shunt_config_file
|
|
@@ -537,8 +537,10 @@ Start_Run() {
|
|
|
;;
|
|
|
trojan)
|
|
|
gen_config_file $GLOBAL_SERVER $type 1 $tcp_port
|
|
|
- ln_start_bin $(first_type trojan) $type --config $tcp_config_file
|
|
|
- echolog "Main node:$($(first_type trojan) --version 2>&1 | head -1) Started!"
|
|
|
+ for i in $(seq 1 $threads); do
|
|
|
+ ln_start_bin $(first_type $type) $type --config $tcp_config_file
|
|
|
+ done
|
|
|
+ echolog "Main node:$($(first_type $type) --version 2>&1 | head -1) , $threads Threads Started!"
|
|
|
;;
|
|
|
naiveproxy)
|
|
|
gen_config_file $GLOBAL_SERVER $type 1 $tcp_port
|