Documentation ¶
Overview ¶
*
- Created with IntelliJ IDEA.
- User: clowwindy
- Date: 12-11-2
- Time: 上午10:31
- To change this template use File | Settings | File Templates.
Provides leaky buffer, based on the example in Effective Go.
Index ¶
- func CheckCipherMethod(method string) error
- func IsFileExists(path string) (bool, error)
- func PipeThenClose(src, dst net.Conn)
- func PrintVersion()
- func RawAddr(addr string) (buf []byte, err error)
- func SetDebug(d DebugLog)
- func SetReadTimeout(c net.Conn)
- func Sort(arr []uint64, comparison func(uint64, uint64) int64) []uint64
- func UpdateConfig(old, new *Config)
- type Cipher
- type Config
- type Conn
- type DebugLog
- type DecOrEnc
- type LeakyBuf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCipherMethod ¶
func IsFileExists ¶
func PipeThenClose ¶
PipeThenClose copies data from src to dst, closes dst when done.
func PrintVersion ¶
func PrintVersion()
func SetReadTimeout ¶
func UpdateConfig ¶
func UpdateConfig(old, new *Config)
Useful for command line to override options specified in config file Debug is not updated.
Types ¶
type Cipher ¶
type Cipher struct {
// contains filtered or unexported fields
}
type Config ¶
type Config struct { Server interface{} `json:"server"` ServerPort int `json:"server_port"` LocalPort int `json:"local_port"` Password string `json:"password"` Method string `json:"method"` // encryption method // following options are only used by server PortPassword map[string]string `json:"port_password"` Timeout int `json:"timeout"` // The order of servers in the client config is significant, so use array // instead of map to preserve the order. ServerPassword [][]string `json:"server_password"` }
func ParseConfig ¶
func (*Config) GetServerArray ¶
type Conn ¶
func DialWithRawAddr ¶
This is intended for use by users implementing a local socks proxy. rawaddr shoud contain part of the data in socks request, starting from the ATYP field. (Refer to rfc1928 for more information.)
Click to show internal directories.
Click to hide internal directories.