socks4

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: GPL-3.0 Imports: 7 Imported by: 6

Documentation

Index

Constants

View Source
const Version = 0x04

Variables

View Source
var (
	ErrRequestRejected         = errors.New("request rejected or failed")
	ErrRequestIdentdFailed     = errors.New("request rejected because SOCKS server cannot connect to identd on the client")
	ErrRequestIdentdMismatched = errors.New("request rejected because the client program and identd report different user-ids")
	ErrRequestUnknownCode      = errors.New("request failed with unknown code")
)

Functions

func ClientHandshake

func ClientHandshake(rw io.ReadWriter, addr string, command Command, userID string) (err error)

Types

type Code

type Code = uint8
const (
	RequestGranted          Code = 90
	RequestRejected         Code = 91
	RequestIdentdFailed     Code = 92
	RequestIdentdMismatched Code = 93
)

type Command

type Command = uint8
const (
	CmdConnect Command = 0x01
	CmdBind    Command = 0x02
)

func ServerHandshake

func ServerHandshake(rw io.ReadWriter, authenticator auth.Authenticator) (addr string, command Command, err error)

Jump to

Keyboard shortcuts

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