Documentation ¶
Overview ¶
Provides leaky buffer, based on the example in Effective Go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAddrType = errors.New("socks addr type not supported") ErrVer = errors.New("socks version not supported") ErrMethod = errors.New("socks only support 1 method now") ErrAuthExtraData = errors.New("socks authentication get extra data") ErrReqExtraData = errors.New("socks request get extra data") ErrCmd = errors.New("socks command not supported") )
Functions ¶
func InitCmdConfig ¶
func InitCmdConfig()
func PipeThenClose ¶
PipeThenClose copies data from src to dst, closes dst when done.
func SetReadTimeout ¶
func SetTimeout ¶
func SetTimeout(timeout int)
func ShowVersion ¶
func ShowVersion()
Types ¶
type Config ¶
type Config struct { Server string ServerPort int Timeout int `json:"timeout"` UserPort map[string]string `json:"user_port"` Debug bool }
var CmdConfig *Config
var FileConfig *Config
func ParseConfig ¶
Click to show internal directories.
Click to hide internal directories.