socks5

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MethodNoAuthRequired   = Method(0x00)
	MethodGSSAPI           = Method(0x01)
	MethodUsernamePassword = Method(0x02)
	MethodNoAcceptable     = Method(0xFF)

	ATypeIPv4       = ATyp(0x01)
	ATypeDomainName = ATyp(0x03)
	ATypeIPv6       = ATyp(0x04)

	CmdConnect      = Cmd(0x01)
	CmdBind         = Cmd(0x02)
	CmdUDPAssociate = Cmd(0x03)

	RepSucceeded                     = Rep(0x00)
	RepServerFailure                 = Rep(0x01)
	RepConnectionNotAllowedByRuleset = Rep(0x02)
	RepNetworkUnreachable            = Rep(0x03)
	RepHostUnreachable               = Rep(0x04)
	RepConnectionRefused             = Rep(0x05)
	RepTTLExpired                    = Rep(0x06)
	RepCmdNotSupported               = Rep(0x07)
	RepATypNotSupported              = Rep(0x08)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ATyp

type ATyp = byte

type Cmd

type Cmd = byte

type Method

type Method = byte

type MethodReply

type MethodReply struct {
	Method
	// contains filtered or unexported fields
}

func NewMethodReply

func NewMethodReply(method Method) MethodReply

func (MethodReply) Encode

func (mr MethodReply) Encode() []byte

func (MethodReply) WriteTo

func (mr MethodReply) WriteTo(writer io.Writer) (int64, error)

type MethodRequest

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

func NewMethodRequestFrom

func NewMethodRequestFrom(b []byte) (mr MethodRequest, err error)

func (MethodRequest) Methods

func (mr MethodRequest) Methods() []Method

type Rep

type Rep = byte

type Reply

type Reply struct {
	Rep

	ATyp
	// contains filtered or unexported fields
}

func NewReply

func NewReply(rep Rep, aTyp ATyp, bndAddr []byte, bndPort uint16) Reply

func (Reply) Pack

func (reply Reply) Pack() []byte

type Request

type Request struct {
	Cmd

	ATyp
	DstAddr []byte
	DstPort uint16
	// contains filtered or unexported fields
}

func NewRequestFrom

func NewRequestFrom(b []byte) (request Request, err error)

Jump to

Keyboard shortcuts

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