# install golang 1.9+, becase of sync.Map
go get -u -v github.com/FlowerWrong/tun2socks
cd tun2socks
go get ./...
cp config.example.ini config.ini
# edit it for free
sudo go run cmd/main.go --config=config.ini
USR2 signal. Not support windows.Support route, udp.proxy, proxy, pattern and rule, see config.example.ini.
sudo kill -s USR2 $PID
NOTE: go run not support kill command signal.
See c api wiki.
Windows build need to install git + tdm-gcc.
$ claude mcp add tun2socks \
-- python -m otcore.mcp_server <graph>