Skip to content

A tun2socks implementation written in Go.

License

Notifications You must be signed in to change notification settings

ggg17226/go-tun2socks

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-tun2socks

Build Status

A tun2socks implementation written in Go.

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:

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:


build for musl

This build target depends on musl-gcc which can find in system path

You can build for musl system by using this command

make build_musl

About

A tun2socks implementation written in Go.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • C 95.2%
  • Go 4.0%
  • Other 0.8%