From 78943784595433d828fe00faf9c5dfe2e9c1e98e Mon Sep 17 00:00:00 2001 From: PoriaMs Date: Sat, 11 Feb 2023 19:18:03 +0800 Subject: [PATCH] second commit --- vanish.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/vanish.sh b/vanish.sh index 0f71bf7..bea94bb 100644 --- a/vanish.sh +++ b/vanish.sh @@ -1,6 +1,5 @@ #!/bin/bash -# proxy_add="socks://10.211.55.2:7890" log="/tmp/vanish.log" loging(){ @@ -70,9 +69,9 @@ mix_proxy(){ } # 测试功能 -tcp_iner(){ +tcp_inner(){ nohup gost -L "red://:12346?sniffing=true&tproxy=true" -F $inner_proxy_add?so_mark=100 >> $log 2>&1 & - iptables -t mangle -A GOST -p tcp -d $route -j REDIRECT --to-port 12346 + iptables -t mangle -A GOST -p tcp -d $route -j TPROXY --tproxy-mark 0x1/0x1 --on-ip 127.0.0.1 --on-port 12346 loging "inner mode ..." } @@ -205,9 +204,9 @@ if [ "$2" ]; then fi if [ "$1" = "inner" ]; then - $inner_proxy_add=$2 - $route=$3 - inner + inner_proxy_add=$2 + route=$3 + tcp_inner exit 0 fi @@ -219,4 +218,4 @@ fi if [ "$1" = "clean" ]; then del_log exit 0 -fi \ No newline at end of file +fi