socks5

package
v0.0.0-...-198281b Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Method_NO_AUTH         = uint8(0x00)
	Method_GSSAPI          = uint8(0x01)
	Method_USER_PASS       = uint8(0x02)
	Method_IANA            = uint8(0x7F)
	Method_RESVERVE        = uint8(0x80)
	Method_NONE_ACCEPTABLE = uint8(0xFF)
	VERSION_V5             = uint8(0x05)
	CMD_CONNECT            = uint8(0x01)
	CMD_BIND               = uint8(0x02)
	CMD_ASSOCIATE          = uint8(0x03)
	ATYP_IPV4              = uint8(0x01)
	ATYP_DOMAIN            = uint8(0x03)
	ATYP_IPV6              = uint8(0x04)
	REP_SUCCESS            = uint8(0x00)
	REP_REQ_FAIL           = uint8(0x01)
	REP_RULE_FORBIDDEN     = uint8(0x02)
	REP_NETWOR_UNREACHABLE = uint8(0x03)
	REP_HOST_UNREACHABLE   = uint8(0x04)
	REP_CONNECTION_REFUSED = uint8(0x05)
	REP_TTL_TIMEOUT        = uint8(0x06)
	REP_CMD_UNSUPPORTED    = uint8(0x07)
	REP_ATYP_UNSUPPORTED   = uint8(0x08)
	REP_UNKNOWN            = uint8(0x09)
	RSV                    = uint8(0x00)
)

Variables

View Source
var (
	ZERO_IP   = []byte{0x00, 0x00, 0x00, 0x00}
	ZERO_PORT = []byte{0x00, 0x00}
)
View Source
var Socks5Errors = []string{
	"",
	"general failure",
	"connection forbidden",
	"network unreachable",
	"host unreachable",
	"connection refused",
	"TTL expired",
	"command not supported",
	"address type not supported",
}

Functions

This section is empty.

Types

type PacketUDP

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

func NewPacketUDP

func NewPacketUDP() (p PacketUDP)

func (*PacketUDP) Build

func (p *PacketUDP) Build(destAddr string, data []byte) (err error)

func (*PacketUDP) Bytes

func (p *PacketUDP) Bytes() []byte

func (*PacketUDP) Data

func (p *PacketUDP) Data() []byte

func (*PacketUDP) Header

func (p *PacketUDP) Header() []byte

func (*PacketUDP) Host

func (p *PacketUDP) Host() string

func (*PacketUDP) Parse

func (p *PacketUDP) Parse(b []byte) (err error)

func (*PacketUDP) Port

func (p *PacketUDP) Port() string

type UsernamePassword

type UsernamePassword struct {
	Username, Password string
}

Auth contains authentication parameters that specific Dialers may require.

Jump to

Keyboard shortcuts

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