-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does gotun2socks work on macOS? #1
Comments
I think the package itself works on macOS, as the code does not rely on OS-specific structs/interfaces. Thought I did't test. The executable in bin directory only works on Linux. But it should be not hard to make it works on macOS. The only thing missing is a procedure that opens a tun device and returns a os.File object. |
I will have a try, and give my feedback ASAP. |
@liudanking gotun2socks works on macOS now. You can have a try. The problem only sets up the utun interface, you need to take care of routing yourself. |
Could you give me a route command example for OSX? I am not familiar with OSX As you see.
Follow command work for me. But I do not know it is corrent or not? # start shadowsocks server on vps with udp relay
# start shadowsocks client on your computer with udp relay
sudo ./gotun2socks --local-socks-addr 127.0.0.1:1080
sudo route add -net 0.0.0.0 10.0.0.1 -netmask 128.0.0.0
sudo route add -net 128.0.0.0 10.0.0.1 -netmask 128.0.0.0
orig_gw=$(netstat -nr | grep --color=never '^default' | grep -v 'utun' | sed 's/default *\([0-9\.]*\) .*/\1/' | head -1)
sudo route add my_ss_server $origin_gw |
@FlowerWrong I think the commands you posted should be sufficient. The 2th and 3th commands change default route to the new utun device. The 4th command extracts previous default gateway. The 5th command specifies your ss_server to go through the previous gateway. |
I'm sorry if this is a dumb question - but is Or, will |
see this comment |
@FlowerWrong Is |
There is a
tun_linux.go
file inbin
directory, but missingtun_darwin.go
.The text was updated successfully, but these errors were encountered: