socks

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2018 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) tun2socks.ConnectionHandler

func NewUDPHandler

func NewUDPHandler(proxyHost string, proxyPort uint16) tun2socks.ConnectionHandler

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