xjasonlyu / tun2socks

tun2socks - powered by gVisor TCP/IP stack
https://github.com/xjasonlyu/tun2socks/wiki
GNU General Public License v3.0
3.12k stars 433 forks source link

[Feature] support tunneling between two instances #410

Open ameir opened 3 days ago

ameir commented 3 days ago

Description

It would be nice if tun2socks can support a model similar to https://github.com/go-gost/gost where it can run on two instances -- one acts as a server, and the other a client. This would allow us to tunnel with a single tool, and lessen variables across users who need this use case.

Is this feature related to a specific bug?

No response

Do you have a specific solution in mind?

The server side can be a socks5 proxy, or just a raw UDP socket that we tunnel over. The client would not need changes in the former case, and would understand the tunnel protocol in the latter case.

xjasonlyu commented 3 days ago

tun2socks is always a client-side tool that tunnels local traffic to a target proxy server. I don't think it's worthwhile to make it act as a proxy server since there are already tons of proxy applications.