tun2socks
A pure go implementation of tun2socks powered by [gVisor](https://gvisor.dev/) TCP/IP stack
About tun2socks

Features
- Universal Proxying: Transparently routes all network traffic from any application through a proxy.
- Multi-Protocol: Supports HTTP/SOCKS/Shadowsocks/SSH/Relay proxies with optional authentication.
- Cross-Platform: Runs on Linux/macOS/Windows/FreeBSD/OpenBSD with platform-specific optimizations.
- Gateway Mode: Acts as a Layer 3 gateway to route traffic from other devices on the same network.
- Full IPv6 Compatibility: Natively supports IPv6; seamlessly tunnels IPv4 over IPv6 and vice versa.
- User-Space Networking: Leverages the gVisor network stack for enhanced performance and flexibility.
Benchmarks

For all scenarios of usage, tun2socks performs best. See benchmarks for more details.
Documentation
Full documentation and technical guides can be found at Wiki.
Community
Welcome and feel free to ask any questions at Discussions.
Credits
- google/gvisor - Application Kernel for Containers
- wireguard-go - Go Implementation of WireGuard
- wintun - Layer 3 TUN Driver for Windows
License
Star History
Frequently Asked Questions
What is tun2socks?
tun2socks is a Networking library for the Go programming language. A pure go implementation of tun2socks powered by [gVisor](https://gvisor.dev/) TCP/IP stack
How do I install tun2socks?
Install tun2socks with the Go module system using `go get xjasonlyu/tun2socks`. Check the repository for the current installation instructions.
What category does tun2socks belong to?
tun2socks is listed under Networking, specifically Networking.