nws/socks5
2024-11-14 12:15:59 +01:00
..
auth_test.go Add EntryConfig to New function and update dependencies 2024-07-26 19:37:34 +02:00
auth.go Initial commit 2024-07-22 23:00:21 +02:00
credentials_test.go Initial commit 2024-07-22 23:00:21 +02:00
credentials.go Initial commit 2024-07-22 23:00:21 +02:00
LICENSE Initial commit 2024-07-22 23:00:21 +02:00
README.md Initial commit 2024-07-22 23:00:21 +02:00
request.go update dns and target public key in context for public exit nodes (#47) 2024-11-14 12:15:59 +01:00
resolver_test.go Initial commit 2024-07-22 23:00:21 +02:00
resolver.go Initial commit 2024-07-22 23:00:21 +02:00
ruleset_test.go Initial commit 2024-07-22 23:00:21 +02:00
ruleset.go Initial commit 2024-07-22 23:00:21 +02:00
socks5.go remove PublicAddressBind 2024-08-04 14:35:26 +02:00
tcp.go Refactor reverse TCP connection handling in socks5 2024-08-04 14:48:30 +02:00

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