wlf f051014ac2 提交正常运行的所有代码 | 1 year ago | |
---|---|---|
.. | ||
.travis.yml | 1 year ago | |
LICENSE | 1 year ago | |
README.md | 1 year ago | |
auth.go | 1 year ago | |
credentials.go | 1 year ago | |
request.go | 1 year ago | |
resolver.go | 1 year ago | |
ruleset.go | 1 year ago | |
socks5.go | 1 year ago |
Provides the socks5
package that implements a SOCKS5 server.
SOCKS (Secure Sockets) is used to route traffic between a client and server through
an intermediate proxy layer. This can be used to bypass firewalls or NATs.
The package has the following features:
The package still needs the following:
Below is a simple example of usage
// Create a SOCKS5 server
conf := &socks5.Config{}
server, err := socks5.New(conf)
if err != nil {
panic(err)
}
// Create SOCKS5 proxy on localhost port 8000
if err := server.ListenAndServe("tcp", "127.0.0.1:8000"); err != nil {
panic(err)
}