socks

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2016 License: MIT Imports: 15 Imported by: 0

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

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

func (*Config) HasAccount

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

type Server

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

Server is a SOCKS 5 proxy server

func NewServer

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

NewServer creates a new Server object.

func (*Server) Close

func (this *Server) Close()

Close implements InboundHandler.Close().

func (*Server) Port

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

Port implements InboundHandler.Port().

func (*Server) Start

func (this *Server) Start() error

Listen implements InboundHandler.Listen().

type ServerFactory

type ServerFactory struct{}

func (*ServerFactory) Create

func (this *ServerFactory) Create(space app.Space, rawConfig interface{}, meta *proxy.InboundHandlerMeta) (proxy.InboundHandler, error)

func (*ServerFactory) StreamCapability

func (this *ServerFactory) StreamCapability() internet.StreamConnectionType

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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