Update tun2socks.sh

This commit is contained in:
Jason
2020-04-27 22:13:08 +08:00
parent 1d781f2d02
commit 557a2129da
-5
View File
@@ -11,14 +11,10 @@ LOGLEVEL="${LOGLEVEL:-warning}"
BACKENDDNS="${BACKENDDNS:-8.8.8.8:53}"
HOSTS="${HOSTS:-localhost=127.0.0.1}"
# enable ip_forward
sysctl -w net.ipv4.ip_forward=1 &> /dev/null
# create tun device
ip tuntap add mode tun dev $TUN
ip addr add $TUNGW/24 dev $TUN
ip link set dev $TUN up
echo "tun device created: $TUN"
# change default gateway
ip route del default &> /dev/null
@@ -32,7 +28,6 @@ done
# DNS settings
echo "nameserver $TUNGW" > /etc/resolv.conf
echo "DNS settings updated"
tun2socks -loglevel $LOGLEVEL \
-tunName $TUN -proxyServer $PROXY \