Go to file
mo f77e659826 add user handle
revive inspect
2020-04-22 10:15:40 +08:00
_example fix go mod require 2020-04-21 08:32:52 +08:00
.github/workflows add go mod 2020-04-19 17:08:22 +08:00
.gitignore add go mod 2020-04-19 17:08:22 +08:00
.travis.yml add go mod 2020-04-19 17:08:22 +08:00
auth_test.go add user handle 2020-04-22 10:15:40 +08:00
auth.go add user handle 2020-04-22 10:15:40 +08:00
credentials_test.go add valid check add userIP 2020-04-21 22:28:34 +08:00
credentials.go add user handle 2020-04-22 10:15:40 +08:00
go.mod fix go mod require 2020-04-21 08:32:52 +08:00
go.sum add standard proxy test 2020-04-20 19:56:35 +08:00
header.go add user handle 2020-04-22 10:15:40 +08:00
LICENSE Initial commit 2014-01-22 15:49:51 -08:00
logger.go add user handle 2020-04-22 10:15:40 +08:00
option.go add user handle 2020-04-22 10:15:40 +08:00
pool_test.go fix socks test pool bug 2020-04-20 09:50:49 +08:00
pool.go add buffer pool 2020-04-20 09:41:06 +08:00
README.md fix readme 2020-04-21 22:39:11 +08:00
request_test.go use options 2020-04-20 21:17:38 +08:00
request.go add user handle 2020-04-22 10:15:40 +08:00
resolver_test.go add go mod 2020-04-19 17:08:22 +08:00
resolver.go add user handle 2020-04-22 10:15:40 +08:00
ruleset_test.go fix const defined 2020-04-21 14:03:20 +08:00
ruleset.go add user handle 2020-04-22 10:15:40 +08:00
socks5_test.go add valid check add userIP 2020-04-21 22:28:34 +08:00
socks5.go add user handle 2020-04-22 10:15:40 +08:00

go-socks5

Build Status codecov Action Status Go Report Card License

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 optional user addr limit
  • Support for the CONNECT command
  • Support for the ASSOCIATE command
  • Rules to do granular filtering of commands
  • Custom DNS resolution
  • Unit tests
  • Custom goroutine pool
  • Custom logger
  • buffer pool design

TODO

The package still needs the following:

  • Support for the BIND command

Example

Below is a simple example of usage

// Create a SOCKS5 server
server := socks5.New()

// Create SOCKS5 proxy on localhost port 8000
if err := server.ListenAndServe("tcp", "127.0.0.1:8000"); err != nil {
  panic(err)
}

Reference

original armon go-sock5 go-sock5