Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addr ¶
Addr is a SOCKS-specific address. Either Name or IP is used exclusively.
type Authentication ¶
Authentication proxy authentication
func UserAuth ¶
func UserAuth(username, password string) Authentication
UserAuth basic authentication
type AuthenticationFunc ¶
AuthenticationFunc Authentication interface is implemented
type Dialer ¶
type Dialer struct { // ProxyNetwork network between a proxy server and a client ProxyNetwork string // ProxyAddress proxy server address ProxyAddress string // ProxyDial specifies the optional dial function for // establishing the transport connection. ProxyDial func(context.Context, string, string) (net.Conn, error) // Username use username authentication if not empty Username string // Password use password authentication if not empty, // only valid if username is set Password string // IsResolve resolve domain name on locally IsResolve bool // Resolver optionally specifies an alternate resolver to use Resolver *net.Resolver // Timeout is the maximum amount of time a dial will wait for // a connect to complete. The default is no timeout Timeout time.Duration }
Dialer is a SOCKS5 dialer.
func NewDialer ¶
NewDialer returns a new Dialer that dials through the provided proxy server's network and address.
func (*Dialer) DialContext ¶
DialContext connects to the provided address on the provided network.
type Server ¶
type Server struct { // Authentication is proxy authentication Authentication Authentication // ProxyDial specifies the optional proxyDial function for // establishing the transport connection. ProxyDial func(context.Context, string, string) (net.Conn, error) // Logger error log Logger *log.Logger // Context is default context Context context.Context }
Server is accepting connections and handling the details of the SOCKS5 protocol
func (*Server) ListenAndServe ¶
ListenAndServe is used to create a listener and serve on it
Click to show internal directories.
Click to hide internal directories.