mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-06 09:16:58 +08:00
ae77a8a009204b15a7d55330f5b43953df19e65d
English | 简体中文
What is tun2socks?
tun2socks
is an application used to "socksify" TCP/UDP (IPv4 and IPv6) traffic at the network layer. It implements a TUN virtual network interface which accepts all incoming TCP/UDP packets and forwards them through a SOCKS server.
Features
- ICMP echoing / IPv6 support / Socks5 & SS proxy
- Optimized UDP transmission for game acceleration
- Pure Go implementation, no more CGO required
- Router mode, routing all the traffic in LAN
- TCP/IP stack powered by gVisor
- More than 2.5Gbps throughput (10x faster than v1)
Requirements
Target | Minimum | Recommended |
---|---|---|
System | Linux MacOS Freebsd OpenBSD Windows | Linux or MacOS |
Memory | >20MB | >128MB |
CPU | AMD64(x86_64) ARM64 | AMD64 with AES-NI & AVX2 |
Documentation
Documentations and quick start guides can be found at Github Wiki.
Building from source
Due to the limitation of gVisor, tun2socks only supports x86_64 and ARM64 for now. Other architectures may become available in the future.
Environments
Make sure the following dependencies are installed:
- Go 1.15+
Building
Build and install the tun2socks
binary:
make tun2socks
sudo cp ./bin/tun2socks /usr/local/bin
Build for all architectures:
make all-arch
Credits
TODO
- Windows support
- FreeBSD support
- OpenBSD support
- Auto route mode
Description
tun2socks - powered by gVisor TCP/IP stack
gfwgogolanggvisorhttp-proxynatnetworkproxifier-alternativeproxyshadowsockssocks4socks5ssh-tunneltcpip-stacktortun-devicetun2sockstunneludpwireguard
Readme
MIT
6.9 MiB
Languages
Go
95.4%
Makefile
3%
Shell
1.2%
Dockerfile
0.4%