client

package
v0.3.1-rc.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoAuthenticationRequired = 0x00
	Gssapi                   = 0x01
	UserAndPassword          = 0x02
	NoAcceptableMethods      = 0xff

	Succeeded                     = 0x00
	SocksServerFailure            = 0x01
	ConnectionNotAllowedByRuleset = 0x02
	NetworkUnreachable            = 0x03
	HostUnreachable               = 0x04
	ConnectionRefused             = 0x05
	TTLExpired                    = 0x06
	CommandNotSupport             = 0x07
	AddressTypeNotSupport         = 0x08
)
View Source
const (
	Connect CMD = 0x01
	Bind    CMD = 0x02
	Udp     CMD = 0x03

	IPv4   byte = 0x01
	Domain byte = 0x03
	IPv6   byte = 0x04
)

Variables

This section is empty.

Functions

func Dial

func Dial(host, port, user, password string) proxy.Proxy

func New

New returns a new Socks5 client

func ParseAddrWriter

func ParseAddrWriter(addr proxy.Address, buf io.Writer)

Types

type ADDR

type ADDR []byte

func ParseAddr

func ParseAddr(addr proxy.Address) ADDR

func ResolveAddr

func ResolveAddr(r io.Reader) (ADDR, error)

func ResolveAddrBytes

func ResolveAddrBytes(buf []byte) (ADDR, error)

func (ADDR) Address

func (a ADDR) Address(network statistic.Type) proxy.Address

type CMD

type CMD byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL