Files
tun2socks/README.md
2021-02-10 16:55:31 +08:00

2.8 KiB

tun2socks

GitHub Workflow Go Version Go Report GitHub License Total Lines Releases

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
  • SO_BINDTODEVICE & SO_MARK option support
  • 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