Versions in this module Expand all Collapse all v0 v0.0.9 Jan 12, 2019 Changes in this version + func ChangeHostAndHeader(r *http.Request, host string, header string, addr string) + func ReplayWaitGroup(conn1 net.Conn, conn2 net.Conn, compressEncode, compressDecode int, ...) v0.0.8 Jan 9, 2019 Changes in this version + const COMPRESS_NONE_DECODE + const COMPRESS_NONE_ENCODE + const COMPRESS_SNAPY_DECODE + const COMPRESS_SNAPY_ENCODE + const CONN_ERROR + const CONN_SUCCESS + const CONN_TCP + const CONN_UDP + const IO_EOF + const RES_MSG + const RES_SIGN + const TEST_FLAG + const Unauthorized_BYTES + const VERIFY_EER + const WORK_CHAN + const WORK_MAIN + func AesDecrypt(crypted, key []byte) ([]byte, error) + func AesEncrypt(origData, key []byte) ([]byte, error) + func CheckAuth(r *http.Request, user, passwd string) bool + func DomainCheck(domain string) bool + func FlushConn(c net.Conn) + func GetBoolByStr(s string) bool + func GetCompressType(compress string) (int, int) + func GetIntNoerrByStr(str string) int + func GetLenByBytes(buf []byte) (int, error) + func GetLenBytes(buf []byte) (b []byte, err error) + func GetRandomString(l int) string + func GetStrByBool(b bool) string + func Gethostbyname(hostname string) string + func Getverifyval(vkey string) string + func Md5(s string) string + func PKCS5Padding(ciphertext []byte, blockSize int) []byte + func PKCS5UnPadding(origData []byte) (error, []byte) + func Relay(in, out net.Conn, compressType int, crypt, mux bool) + type Conn struct + Conn net.Conn + func NewConn(conn net.Conn) *Conn + func (s *Conn) Close() error + func (s *Conn) GetConnInfoFromConn() (en, de int, crypt, mux bool) + func (s *Conn) GetHost() (method, address string, rb []byte, err error, r *http.Request) + func (s *Conn) GetHostFromConn() (typeStr string, host string, en, de int, crypt, mux bool, err error) + func (s *Conn) GetLen() (int, error) + func (s *Conn) Read(b []byte) (int, error) + func (s *Conn) ReadFlag() (string, error) + func (s *Conn) ReadFrom(b []byte, compress int, crypt bool) (int, error) + func (s *Conn) ReadLen(cLen int) ([]byte, error) + func (s *Conn) SetAlive() + func (s *Conn) Write(b []byte) (int, error) + func (s *Conn) WriteChan() (int, error) + func (s *Conn) WriteConnInfo(en, de int, crypt, mux bool) + func (s *Conn) WriteError() (int, error) + func (s *Conn) WriteFail() (int, error) + func (s *Conn) WriteHost(ltype string, host string) (int, error) + func (s *Conn) WriteLen(buf []byte) (int, error) + func (s *Conn) WriteMain() (int, error) + func (s *Conn) WriteSign() (int, error) + func (s *Conn) WriteSuccess() (int, error) + func (s *Conn) WriteTest() (int, error) + func (s *Conn) WriteTo(b []byte, compress int, crypt bool) (n int, err error) + type CryptConn struct + func NewCryptConn(conn net.Conn, crypt bool) *CryptConn + func (s *CryptConn) Read(b []byte) (n int, err error) + func (s *CryptConn) Write(b []byte) (n int, err error) + type SnappyConn struct + func NewSnappyConn(conn net.Conn, crypt bool) *SnappyConn + func (s *SnappyConn) Read(b []byte) (n int, err error) + func (s *SnappyConn) Write(b []byte) (n int, err error)