1
0
Fork 0
Go to file
ap4y ae345732fa Refactor handleRequest using new Request struct 2016-01-11 21:01:29 +13: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 Refactor handleRequest using new Request struct 2016-01-11 21:01:29 +13:00
request_test.go Refactor handleRequest using new Request struct 2016-01-11 21:01:29 +13:00
resolver.go Resolver uses net.IP 2014-01-23 13:07:13 -08:00
resolver_test.go Resolver uses net.IP 2014-01-23 13:07:13 -08:00
ruleset.go Refactor RuleSet api using Request struct 2016-01-11 20:37:41 +13:00
ruleset_test.go Refactor RuleSet api using Request struct 2016-01-11 20:37:41 +13:00
socks5.go Add configuration option for the log target 2015-09-07 01:47:05 +02:00
socks5_test.go Adjust tests to use the logger config option 2015-09-07 02:19:34 +02: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)
}