tun2socks
tun2socks copied to clipboard
[Feature] Instructions for a local socks proxy
Description
I think the sample configuration might be breaking my local proxy since it affects its own routing
Is this feature related to a specific bug?
No response
Do you have a specific solution in mind?
Include a sample config to use with an already existing proxy running on the same machine
https://dev.to/jadolg/tunneling-all-your-internet-connections-through-a-socks-proxy-4f5i
the step that's missing for me is ensuring the local proxy still connects through the default gateway
ip r a $server_ip via $default_gateway
https://dev.to/jadolg/tunneling-all-your-internet-connections-through-a-socks-proxy-4f5i
I saw this website so I adapted some of the steps, here are all of them:
sudo ip tuntap add mode tun dev tun0
sudo ip addr add 198.18.0.1/15 dev tun0
sudo ip link set dev tun0 up
curl --socks5 socks5://localhost:1080 https://myip.wtf/json
sudo ip route del default
sudo ip route add default via 198.18.0.1 dev tun0 metric 1
sudo ip route add default via $your_gateway dev wlp38s0 metric 10
sudo ip r a $remote_proxy_address via $your_gateway
tun2socks -device tun0 -proxy socks5://127.0.0.1:1080 -interface wlp38s0
where wlp38s0 is my wifi interface
tun2socks -device tun0 -proxy socks5://127.0.0.1:1080 -interface wlp38s0
where wlp38s0 is my wifi interface
No, see:
- https://github.com/xjasonlyu/tun2socks/issues/165#issuecomment-1247586773
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
Did anyone get this working with a local socks proxy? I can't seem to avoid looping after trying a few different suggestions.
The best implementation is here
https://github.com/v2rayA/v2rayA/blob/25975fb8e57a882fa5147ab93a6974317ebcdfba/service/core/iptables/tproxy.go#L68
I just switched to using this program directly, but using a fork for xray