Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

go-tun2socks

> 编程语言
Open source

A tun2socks implementation written in Go.

1.4K stars0 likes0 views
WebsiteGitHub

About

A tun2socks implementation written in Go.

go-tun2socks

A tun2socks implementation written in Go.

If you're looking for an easy to use tun2socks implementation for iOS, you might be interested in leaf and ileaf. leaf implements tun2socks and it's written in Rust, with significantly less memory usage and significantly better performance compares to the Go version.

To run the tun2socks command line program, depending on OS, you may need to run it as root, create the TUN interface and/or configure IP address of the interface manually. Moreover, you should add corresponding routes to the routing table manually. Mind that you often want to use some different system DNS resolvers, and your proxy server should support UDP.

To use go-tun2socks as a library in your own project, refer to the following files/repos for some ideas:

  • https://github.com/eycorsican/go-tun2socks/tree/master/cmd/tun2socks
  • https://github.com/eycorsican/go-tun2socks-mobile
  • https://github.com/Jigsaw-Code/outline-go-tun2socks

It's recommended to write your own SOCKS layer. For example, you can create a "tun2shadowsocks" program by implementing a Shadowsocks handler, see https://github.com/Jigsaw-Code/outline-go-tun2socks/tree/master/shadowsocks

It's also recommended to write your own TUN layer to connect the TUN interface and go-tun2socks, see https://github.com/eycorsican/go-tun2socks/tree/master/tun for examples.

The following projects are using go-tun2socks:

  • https://github.com/mellow-io/mellow
  • https://github.com/eycorsican/kitsunebi-android

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ctun2socks

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言