xjasonlyu b54d9936f9 Chore: unexported globals with _
Use uber’s go style.
2021-02-11 16:10:40 +08:00
2021-02-08 20:04:51 +08:00
2021-02-11 16:04:20 +08:00
2021-02-11 14:01:36 +08:00
2021-02-11 14:19:37 +08:00
2021-02-08 14:55:09 +08:00
2021-02-11 15:56:45 +08:00
2021-02-08 20:04:51 +08:00
2021-02-11 16:10:40 +08:00
2021-02-11 16:10:40 +08:00
2021-02-06 14:03:55 +08:00
2021-02-05 20:02:29 +08:00
2021-02-10 16:40:36 +08:00
2021-02-11 13:06:12 +08:00
2021-02-05 20:16:54 +08:00
2021-02-11 13:06:12 +08:00
2021-02-11 13:40:01 +08:00
2021-02-10 16:55:31 +08:00
2021-02-10 16:55:31 +08:00

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

Languages
Go 95.4%
Makefile 3%
Shell 1.2%
Dockerfile 0.4%