shadowsocks-rust icon indicating copy to clipboard operation
shadowsocks-rust copied to clipboard

windows tun mode how to set router table?

Open robyousugar opened this issue 1 year ago • 5 comments
trafficstars

tun 10.1.0.1 ID 14 lan 192.168.2.130 ID 7 i use command "route add 0.0.0.0 mask 0.0.0.0 10.1.0.1 metric 5" but not working ... how to set route table in windows?

robyousugar avatar Dec 28 '23 07:12 robyousugar

I am not an expert of windows. Let’s see if there are any one could help.

zonyitoo avatar Dec 28 '23 07:12 zonyitoo

It seems that there is an issue with dns parsing. do I need to enable Local DNS in tun mode? or is there a method for hijack dns?

robyousugar avatar Dec 28 '23 07:12 robyousugar

It currently is just a pure tun interface. You could just set your system’s DNS server to a specific remote server, then DNS queries will be proxied to ssserver.

zonyitoo avatar Dec 29 '23 01:12 zonyitoo

Same issue on MacOS, when I run the example command in following the docs,

./sslocal --protocol tun -s "[::1]:8388" -m "aes-256-gcm" -k "hello-kitty" --outbound-bind-interface lo0 --tun-interface-address 10.255.0.1/24

and query the route table, I found it makes a new record.

Destination        Gateway            Flags        Refs      Use   Netif Expire
default            192.168.0.1        UGSc           60        0     en0       
10.0.0.255         10.255.0.1         UH              0        0   utun4   
...

But AFAIK, this route record is not reachable unless I make a IP packet with destination = "10.0.0.255". If I visit google.com, since is destination IP is not 10.0.0.255, it should not make effort. So, My question are:

  1. How can I active it, may I change it to default route record?
  2. As I think the answer of first question is not support, so I 'd like to know if there is any roadmap to make it work as default?

cc @zonyitoo appreciate for your reply.

hainesc avatar Feb 15 '24 15:02 hainesc

see the discussion: https://github.com/shadowsocks/shadowsocks-rust/issues/1432

hainesc avatar Feb 16 '24 03:02 hainesc