Help us shape the future of Go! Take the 2026 Go Developer Survey

socks4

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: GPL-2.0 Imports: 10 Imported by: 16

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 varbin.Reader) (request Request, err error)

func ReadRequest0

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

type Response

type Response struct {
	ReplyCode   byte
	Destination M.Socksaddr
}

func ReadResponse

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

Jump to

Keyboard shortcuts

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