Documentation ¶
Index ¶
- Constants
- 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
- 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
- type SnappyConn
Constants ¶
View Source
const ( COMPRESS_NONE_ENCODE = iota COMPRESS_NONE_DECODE COMPRESS_SNAPY_ENCODE COMPRESS_SNAPY_DECODE VERIFY_EER = "vkey" WORK_MAIN = "main" WORK_CHAN = "chan" RES_SIGN = "sign" RES_MSG = "msg0" CONN_SUCCESS = "sucs" CONN_ERROR = "fail" TEST_FLAG = "tst" CONN_TCP = "tcp" CONN_UDP = "udp" Content-Type: text/plain; charset=utf-8 WWW-Authenticate: Basic realm="easyProxy" 401 Unauthorized` IO_EOF = "PROXYEOF" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conn ¶
func (*Conn) GetConnInfoFromConn ¶
获取压缩方式,是否加密
func (*Conn) GetHostFromConn ¶
func (s *Conn) GetHostFromConn() (typeStr string, host string, en, de int, crypt, mux bool, err error)
读取host 连接地址 压缩类型
type SnappyConn ¶
type SnappyConn struct {
// contains filtered or unexported fields
}
func NewSnappyConn ¶
func NewSnappyConn(conn net.Conn, crypt bool) *SnappyConn
Click to show internal directories.
Click to hide internal directories.