socks

package
v0.0.0-...-63affae Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AddrTypeIPv4 is ...
	AddrTypeIPv4 = 1
	// AddrTypeDomain is ...
	AddrTypeDomain = 3
	// AddrTypeIPv6 is ...
	AddrTypeIPv6 = 4
)
View Source
const MaxAddrLen = 1 + 1 + 255 + 2

MaxAddrLen is the maximum length of socks.Addr

Variables

View Source
var (
	// ErrInvalidAddrType is ...
	ErrInvalidAddrType = errors.New("invalid address type")
	// ErrInvalidAddrLen is ...
	ErrInvalidAddrLen = errors.New("invalid address length")
)

Functions

func ResolveTCPAddr

func ResolveTCPAddr(addr *Addr) (*net.TCPAddr, error)

ResolveTCPAddr is ...

func ResolveUDPAddr

func ResolveUDPAddr(addr *Addr) (*net.UDPAddr, error)

ResolveUDPAddr is ...

Types

type Addr

type Addr struct {
	// contains filtered or unexported fields
}

Addr is ...

func ParseAddr

func ParseAddr(addr []byte) (*Addr, error)

ParseAddr is ...

func ReadAddr

func ReadAddr(conn io.Reader) (*Addr, error)

ReadAddr is ....

func ReadAddrBuffer

func ReadAddrBuffer(conn io.Reader, addr []byte) (*Addr, error)

ReadAddrBuffer is ...

func ResolveAddr

func ResolveAddr(addr net.Addr) (*Addr, error)

ResolveAddr is ...

func ResolveAddrBuffer

func ResolveAddrBuffer(addr net.Addr, b []byte) (*Addr, error)

ResolveAddrBuffer is ...

func (*Addr) AppendTo

func (addr *Addr) AppendTo(b []byte) []byte

AppendTo is ...

func (*Addr) ByteSlice

func (addr *Addr) ByteSlice() []byte

ByteSlice is ...

func (*Addr) Len

func (addr *Addr) Len() int

Len is ...

func (*Addr) Network

func (*Addr) Network() string

Network is ...

func (*Addr) String

func (addr *Addr) String() string

String is ...

Jump to

Keyboard shortcuts

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