socks

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MaxAddrLen = 1 + 1 + 255 + 2

MaxAddrLen is the maximum size of SOCKS address in bytes.

Variables

This section is empty.

Functions

func ATYP

func ATYP(b byte) int

ATYP return the address type

func NewTCPHandler

func NewTCPHandler(proxyHost string, proxyPort uint16, fakeDns dns.FakeDns) core.TCPConnHandler

func NewUDPHandler

func NewUDPHandler(proxyHost string, proxyPort uint16, timeout time.Duration, dnsCache dns.DnsCache, fakeDns dns.FakeDns) core.UDPConnHandler

Types

type Addr

type Addr []byte

Addr represents a SOCKS address as defined in RFC 1928 section 5.

func ParseAddr

func ParseAddr(s string) Addr

ParseAddr parses the address in string s. Returns nil if failed.

func SplitAddr

func SplitAddr(b []byte) Addr

SplitAddr slices a SOCKS address from beginning of b. Returns nil if failed.

func (Addr) String

func (a Addr) String() string

String serializes SOCKS address a to string form.

Jump to

Keyboard shortcuts

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