1
0
Fork 0
Go to file
ymmt2005 385bbe4759 Add golang.org/x/net/context support.
Read http://blog.golang.org/context for its benefits.

This PR has not utilized contexts yet; just passing them
to every customization points to help them add/retrieve
request context values.
2016-03-08 23:29:11 +09:00
.gitignore Initial commit 2014-01-22 15:49:51 -08:00
.travis.yml Adding Travis CI support 2014-01-23 14:25:04 -08:00
LICENSE Initial commit 2014-01-22 15:49:51 -08:00
README.md Usage example 2014-06-27 13:39:00 +08:00
auth.go Introduce AuthContext struct and refactor auth api using it 2016-01-11 20:52:06 +13:00
auth_test.go Introduce AuthContext struct and refactor auth api using it 2016-01-11 20:52:06 +13:00
credentials.go Adding simple credentials interface 2014-01-23 11:10:54 -08:00
credentials_test.go Adding credentials test 2014-01-23 11:12:28 -08:00
request.go Add golang.org/x/net/context support. 2016-03-08 23:29:11 +09:00
request_test.go Refactor handleRequest using new Request struct 2016-01-11 21:01:29 +13:00
resolver.go Add golang.org/x/net/context support. 2016-03-08 23:29:11 +09:00
resolver_test.go Add golang.org/x/net/context support. 2016-03-08 23:29:11 +09:00
ruleset.go Add golang.org/x/net/context support. 2016-03-08 23:29:11 +09:00
ruleset_test.go Add golang.org/x/net/context support. 2016-03-08 23:29:11 +09:00
socks5.go Add golang.org/x/net/context support. 2016-03-08 23:29:11 +09:00
socks5_test.go Use new Request struct for the Server api 2016-01-11 21:24:54 +13:00

README.md

go-socks5 Build Status

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.

Feature

The package has the following features:

  • "No Auth" mode
  • User/Password authentication
  • Support for the CONNECT command
  • Rules to do granular filtering of commands
  • Custom DNS resolution
  • Unit tests

TODO

The package still needs the following:

  • Support for the BIND command
  • Support for the ASSOCIATE command

Example

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)
}