socks5

package module
v0.0.0-...-5d22286 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: MIT Imports: 7 Imported by: 0

README

socks5

Documentation

Index

Constants

View Source
const (
	AuthMethodNoAuth       = uint8(0x00)
	AuthMethodNoAcceptable = uint8(0xff)
)
View Source
const (
	ATYPIPv4       = uint8(0x01)
	ATYPDomainName = uint8(0x03)
	ATYPIPv6       = uint8(0x04) // not support
)
View Source
const (
	CmdTypeConnect = uint8(0x01)
)
View Source
const (
	RSV = uint8(0x00)
)
View Source
const (
	RepSucceeded = uint8(0x00)
)
View Source
const (
	TCP = "tcp"
)
View Source
const (
	V5 = uint8(0x05)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddrSpec

type AddrSpec struct {
	IP   net.IP
	FQDN string
	Port int
}

func (*AddrSpec) Address

func (p *AddrSpec) Address() string

type Authenticator

type Authenticator interface {
	Authenticate(local net.Conn) error
	Code() uint8
}

type Config

type Config struct {
	Address     AddrSpec
	AuthMethods []Authenticator
	LogLevel    log.Level
}

type NoAuthAuthenticator

type NoAuthAuthenticator struct{}

func (NoAuthAuthenticator) Authenticate

func (a NoAuthAuthenticator) Authenticate(local net.Conn) error

func (NoAuthAuthenticator) Code

func (a NoAuthAuthenticator) Code() uint8

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(ctx context.Context, cancel context.CancelFunc, config *Config, logger *log.Logger) *Server

func (*Server) Run

func (s *Server) Run() (err error)

func (*Server) Stop

func (s *Server) Stop()

type Stream

type Stream struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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