modulepackage
0.0.0-20160902184237-e75332964ef5
Repository: https://github.com/armon/go-socks5.git
Documentation: pkg.go.dev
# README
go-socks5 
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)
}
# Functions
New creates a new Server and potentially returns an error.
NewRequest creates a new Request from the tcp connection.
PermitAll returns a RuleSet which allows all types of connections.
PermitNone returns a RuleSet which disallows all types of connections.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
# Structs
AddrSpec is used to return the target AddrSpec which may be specified as IPv4, IPv6, or a FQDN.
A Request encapsulates authentication state provided during negotiation.
Config is used to setup and configure a Server.
DNSResolver uses the system DNS to resolve host names.
NoAuthAuthenticator is used to handle the "No Authentication" mode.
PermitCommand is an implementation of the RuleSet which enables filtering supported commands.
A Request represents request received by a server.
Server is reponsible for accepting connections and handling the details of the SOCKS5 protocol.
UserPassAuthenticator is used to handle username/password based authentication.
# Interfaces
AddressRewriter is used to rewrite a destination transparently.
No description provided by the author
CredentialStore is used to support user/pass authentication.
NameResolver is used to implement custom name resolution.
RuleSet is used to provide custom rules to allow or prohibit actions.
# Type aliases
StaticCredentials enables using a map directly as a credential store.