socks

package
v1.12.3 Latest Latest
Warning

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

Go to latest
Published: May 2, 2016 License: MIT Imports: 14 Imported by: 8 modules, 19 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	AuthTypeNoAuth   = byte(0)
	AuthTypePassword = byte(1)
)

Variables

View Source
var (
	ErrorUnsupportedSocksCommand = errors.New("Unsupported socks command.")
	ErrorUnsupportedAuthMethod   = errors.New("Unsupported auth method.")
)

Functions

This section is empty.

Types

type Config added in v1.1.1

type Config struct {
	AuthType   byte
	Accounts   map[string]string
	Address    v2net.Address
	UDPEnabled bool
}

func (*Config) HasAccount added in v1.1.1

func (this *Config) HasAccount(username, password string) bool

type Server added in v1.12.1

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

Server is a SOCKS 5 proxy server

func NewServer added in v1.12.1

func NewServer(config *Config, packetDispatcher dispatcher.PacketDispatcher) *Server

NewServer creates a new Server object.

func (*Server) Close added in v1.12.1

func (this *Server) Close()

Close implements InboundHandler.Close().

func (*Server) Listen added in v1.12.1

func (this *Server) Listen(port v2net.Port) error

Listen implements InboundHandler.Listen().

func (*Server) Port added in v1.12.1

func (this *Server) Port() v2net.Port

Port implements InboundHandler.Port().

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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