Documentation
¶
Index ¶
Constants ¶
View Source
const ( Socks4Version = 4 Socks5Version = 5 MethodNoAuth = 0 CmdConnect = 1 )
Variables ¶
View Source
var ( ERR_VERSION = errors.New("unknown socks version") ERR_METHOD = errors.New("unsupported method") ERR_CMD = errors.New("unsupported command") ERR_READ_FAILED = errors.New("read failed") ERR_ADDRESS_TYPE = errors.New("unsupported address type") ERR_AUTH_FAILED = errors.New("auth failed") )
View Source
var ErrServerClosed = errors.New("socket: Server closed")
Functions ¶
func NewNeverStopBackOff ¶
func NewNeverStopBackOff() *backoff.ExponentialBackOff
Types ¶
type Address ¶
func NewAddressFromHostPort ¶
type AddressType ¶
type AddressType byte
const ( IPv4 AddressType = 1 DomainName AddressType = 3 IPv6 AddressType = 4 )
type Proxy ¶
type Proxy struct { Dial func(ctx context.Context, network, addr string) (net.Conn, error) Timeout time.Duration }
func (Proxy) Socks5Connect ¶
Socks5Connect only support socks5 NoAuth and only CONNECT command
Click to show internal directories.
Click to hide internal directories.