socks5

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ErrGeneralServerFailure          = ReplyCode(0x01)
	ErrConnectionNotAllowedByRuleset = ReplyCode(0x02)
	ErrNetworkUnreachable            = ReplyCode(0x03)
	ErrHostUnreachable               = ReplyCode(0x04)
	ErrConnectionRefused             = ReplyCode(0x05)
	ErrTTLExpired                    = ReplyCode(0x06)
	ErrCommandNotSupported           = ReplyCode(0x07)
	ErrAddressTypeNotSupported       = ReplyCode(0x08)
)

SOCKS reply codes, as enumerated in https://datatracker.ietf.org/doc/html/rfc1928#section-6.

Variables

This section is empty.

Functions

func NewStreamDialer

func NewStreamDialer(endpoint transport.StreamEndpoint) (transport.StreamDialer, error)

NewStreamDialer creates a transport.StreamDialer that routes connections to a SOCKS5 proxy listening at the given transport.StreamEndpoint.

Types

type ReplyCode added in v0.0.5

type ReplyCode byte

ReplyCode is a byte-unsigned number that represents a SOCKS error as indicated in the REP field of the server response.

func (ReplyCode) Error added in v0.0.5

func (e ReplyCode) Error() string

Error returns a human-readable description of the error, based on the SOCKS5 RFC.

Jump to

Keyboard shortcuts

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