socks4

package
v0.0.0-...-27c55a5 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version byte = 4

	CommandConnect byte = 1
	CommandBind    byte = 2

	ReplyCodeGranted                     byte = 90
	ReplyCodeRejectedOrFailed            byte = 91
	ReplyCodeCannotConnectToIdentd       byte = 92
	ReplyCodeIdentdReportDifferentUserID byte = 93
)

Variables

This section is empty.

Functions

func WriteRequest

func WriteRequest(writer io.Writer, request Request) error

func WriteResponse

func WriteResponse(writer io.Writer, response Response) error

Types

type Request

type Request struct {
	Command     byte
	Destination M.Socksaddr
	Username    string
}

func ReadRequest

func ReadRequest(reader io.Reader) (request Request, err error)

func ReadRequest0

func ReadRequest0(reader io.Reader) (request Request, err error)

type Response

type Response struct {
	ReplyCode   byte
	Destination M.Socksaddr
}

func ReadResponse

func ReadResponse(reader io.Reader) (response Response, err error)

Jump to

Keyboard shortcuts

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