Versions in this module Expand all Collapse all v0 v0.1.22 Apr 18, 2021 Changes in this version + 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 struct + AC *aead.Cipher + func NewCipher(method, password string) (c *Cipher, err error) + func (c *Cipher) Copy() *Cipher + func (c *Cipher) Init(conn net.Conn) + type Config struct + LocalPort int + Method string + Password string + PortPassword map[string]string + Server interface{} + ServerPassword [][]string + ServerPort int + Timeout int + func ParseConfig(path string) (config *Config, err error) + func (config *Config) GetServerArray() []string + type Conn struct + func Dial(addr, server string, cipher *Cipher) (c *Conn, err error) + func DialWithRawAddr(rawaddr []byte, server string, cipher *Cipher) (c *Conn, err error) + func NewConn(c net.Conn, cipher *Cipher) *Conn + func (c *Conn) Close() error + func (c *Conn) Read(b []byte) (n int, err error) + func (c *Conn) Write(b []byte) (n int, err error) + type DebugLog bool + var Debug DebugLog + func (d DebugLog) Printf(format string, args ...interface{}) + func (d DebugLog) Println(args ...interface{}) + type DecOrEnc int + const Decrypt + const Encrypt + type LeakyBuf struct + func NewLeakyBuf(n, bufSize int) *LeakyBuf + func (lb *LeakyBuf) Get() (b []byte) + func (lb *LeakyBuf) Put(b []byte)