tun2proxy is a Rust-based networking tool that routes traffic from a TUN interface through HTTP or SOCKS proxies. It allows system-level traffic to be redirected through a proxy even when individual applications do not support proxy configuration. The project supports Linux, Android, macOS, iOS, and Windows, making it broadly useful across desktop, mobile, and embedded-style environments. It includes HTTP, SOCKS4, SOCKS5, SOCKS4a, and SOCKS5h support, along with authentication options depending on the proxy type. tun2proxy can automatically configure routing in supported environments, or it can be used with manual TUN setup for more controlled deployments. It also includes DNS handling, IPv4 and IPv6 support, SOCKS5 UDP support, and Android-specific session information features for per-app routing scenarios.
Features
- TUN interface routing through HTTP and SOCKS proxies
- SOCKS4, SOCKS5, SOCKS4a, and SOCKS5h support
- Linux, Android, macOS, iOS, and Windows compatibility
- IPv4 and IPv6 traffic support
- Virtual DNS and DNS-over-TCP behavior
- Android per-app routing session information support