From 91bb4c6ed128d58625ef1700584a10ee6a0e4fff Mon Sep 17 00:00:00 2001 From: nange Date: Mon, 16 Dec 2024 00:02:22 +0800 Subject: [PATCH] fix: ip route on darwin when enable tun2socks --- scripts/create_tun_dev_darwin.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/create_tun_dev_darwin.sh b/scripts/create_tun_dev_darwin.sh index 4f01facf..c12487b6 100644 --- a/scripts/create_tun_dev_darwin.sh +++ b/scripts/create_tun_dev_darwin.sh @@ -10,7 +10,7 @@ local_gateway_v6=$8 # create tun device ifconfig "$tun_device" "$tun_ip" "$tun_gw" up -ifconfig "$tun_device" inet6 "$tun_ip_v6" "$tun_gw_v6" up +ifconfig "$tun_device" inet6 "$tun_ip_v6"/64 up # add ipv4 ip route route add -net 1.0.0.0/8 "$tun_gw" @@ -23,10 +23,8 @@ route add -net 64.0.0.0/2 "$tun_gw" route add -net 128.0.0.0/1 "$tun_gw" route add -net 198.18.0.0/15 "$tun_gw" -route add "$local_gateway" "$tun_gw" if [ -n "$server_ip_v6" ]; then # check if server_ip_v6 is not empty # add ipv6 ip route route add -inet6 -net ::/0 -gateway "$tun_gw_v6" - route add -inet6 -net "$local_gateway_v6" -gateway "$tun_gw_v6" fi