socks

package
v0.0.0-...-2a3f33f Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2019 License: GPL-3.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CmdConnect   = 0x01
	CmdBind      = 0x02
	CmdAssociate = 0x03

	ReplySuccess             = 0x00
	ReplyGeneralFailure      = 0x01
	ReplyCommandNotSupported = 0x07
)

Variables

This section is empty.

Functions

func Handshake

func Handshake(conn net.Conn) error

func SendReply

func SendReply(conn net.Conn, response uint8) error

Types

type Address

type Address struct {
	Raw  []byte
	Addr string
	Port uint16
}

func (*Address) HostPort

func (addr *Address) HostPort() (string, string)

func (*Address) Read

func (addr *Address) Read(r net.Conn) error

func (*Address) String

func (addr *Address) String() string

type Reply

type Reply struct {
	Version uint8
	Reply   uint8
	Addr    *Address
}

type Request

type Request struct {
	Version uint8
	Command uint8
	Addr    *Address
}

func UnmarshalRequest

func UnmarshalRequest(conn net.Conn) (*Request, error)

type SocksError

type SocksError struct {
	Code uint8
}

Jump to

Keyboard shortcuts

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