Versions in this module Expand all Collapse all v1 v1.0.0 Nov 8, 2024 v0 v0.0.0 Nov 8, 2024 Changes in this version + func Accept(l net.Listener, f func(c net.Conn)) + func CopyWaitGroup(conn1, conn2 net.Conn, crypt bool, snappy bool, rate *rate.Rate, ...) + func GetConn(conn net.Conn, cpt, snappy bool, rt *rate.Rate, isServer bool) io.ReadWriteCloser + func GetLenBytes(buf []byte) (b []byte, err error) + func NewKcpListenerAndProcess(addr string, f func(c net.Conn)) error + func NewTcpListenerAndProcess(addr string, f func(c net.Conn), listener *net.Listener) error + func SetUdpSession(sess *kcp.UDPSession) + type Conn struct + Conn net.Conn + Rb []byte + func NewConn(conn net.Conn) *Conn + func (s *Conn) Close() error + func (s *Conn) GetAddStatus() (b bool) + func (s *Conn) GetConfigInfo() (c *file.Client, err error) + func (s *Conn) GetHealthInfo() (info string, status bool, err error) + func (s *Conn) GetHost() (method, address string, rb []byte, err error, r *http.Request) + func (s *Conn) GetHostInfo() (h *file.Host, err error) + func (s *Conn) GetLen() (int, error) + func (s *Conn) GetLinkInfo() (lk *Link, err error) + func (s *Conn) GetShortContent(l int) (b []byte, err error) + func (s *Conn) GetShortLenContent() (b []byte, err error) + func (s *Conn) GetTaskInfo() (t *file.Tunnel, err error) + func (s *Conn) LocalAddr() net.Addr + func (s *Conn) Read(b []byte) (n int, err error) + func (s *Conn) ReadFlag() (string, error) + func (s *Conn) ReadLen(cLen int, buf []byte) (int, error) + func (s *Conn) RemoteAddr() net.Addr + func (s *Conn) SendHealthInfo(info, status string) (int, error) + func (s *Conn) SendInfo(t interface{}, flag string) (int, error) + func (s *Conn) SetAlive(tp string) + func (s *Conn) SetDeadline(t time.Time) error + func (s *Conn) SetReadDeadline(t time.Time) error + func (s *Conn) SetReadDeadlineBySecond(t time.Duration) + func (s *Conn) SetWriteDeadline(t time.Time) error + func (s *Conn) Write(b []byte) (int, error) + func (s *Conn) WriteAddFail() error + func (s *Conn) WriteAddOk() error + func (s *Conn) WriteChan() (int, error) + func (s *Conn) WriteClose() (int, error) + func (s *Conn) WriteConfig() (int, error) + func (s *Conn) WriteLenContent(buf []byte) (err error) + func (s *Conn) WriteMain() (int, error) + type LenConn struct + Len int + func NewLenConn(conn io.Writer) *LenConn + func (c *LenConn) Write(p []byte) (n int, err error) + type Link struct + Compress bool + ConnType string + Crypt bool + Host string + LocalProxy bool + Option Options + RemoteAddr string + func NewLink(connType string, host string, crypt bool, compress bool, remoteAddr string, ...) *Link + type Option func(*Options) + func LinkTimeout(t time.Duration) Option + type Options struct + Timeout time.Duration + type Secret struct + Conn *Conn + Password string + func NewSecret(p string, conn *Conn) *Secret + type SnappyConn struct + func NewSnappyConn(conn io.ReadWriteCloser) *SnappyConn + func (s *SnappyConn) Close() error + func (s *SnappyConn) Read(b []byte) (n int, err error) + func (s *SnappyConn) Write(b []byte) (n int, err error)