Versions in this module Expand all Collapse all v1 v1.2.2 Aug 25, 2021 v1.2.1 Aug 25, 2021 v1.0.2 Aug 25, 2021 v1.0.1 Aug 25, 2021 v1.0.0 Aug 25, 2021 Changes in this version + const MAX_INDEX + const MAX_PROTO_PACK_SIZE + var CLIENT_TYPE_name = map[int32]string + var CLIENT_TYPE_value = map[string]int32 + var FRAME_TYPE_name = map[int32]string + var FRAME_TYPE_value = map[string]int32 + var PROXY_PROTO_name = map[int32]string + var PROXY_PROTO_value = map[string]int32 + func MarshalSrpFrame(f *ProxyFrame, compress int, encrpyt string) ([]byte, error) + type CLIENT_TYPE int32 + const CLIENT_TYPE_PROXY + const CLIENT_TYPE_REVERSE_PROXY + const CLIENT_TYPE_REVERSE_SOCKS5 + const CLIENT_TYPE_SOCKS5 + const CLIENT_TYPE_SS_PROXY + func (CLIENT_TYPE) EnumDescriptor() ([]byte, []int) + func (x CLIENT_TYPE) String() string + type Client struct + func NewClient(config *Config, serverproto string, server string, name string, ...) (*Client, error) + func (c *Client) Close() + type ClientConn struct + type CloseFrame struct + Id string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*CloseFrame) Descriptor() ([]byte, []int) + func (*CloseFrame) ProtoMessage() + func (m *CloseFrame) GetId() string + func (m *CloseFrame) Reset() + func (m *CloseFrame) String() string + func (m *CloseFrame) XXX_DiscardUnknown() + func (m *CloseFrame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *CloseFrame) XXX_Merge(src proto.Message) + func (m *CloseFrame) XXX_Size() int + func (m *CloseFrame) XXX_Unmarshal(b []byte) error + type Config struct + Compress int + Congestion string + ConnBuffer int + ConnTimeout int + ConnectTimeout int + Encrypt string + EstablishedTimeout int + Key string + MainBuffer int + MainWriteChannelTimeoutMs int + MaxClient int + MaxMsgSize int + MaxSonny int + Password string + PingInter int + PingTimeoutInter int + ShowPing bool + Username string + func DefaultConfig() *Config + type DataFrame struct + Compress bool + Crc string + Data []byte + Id string + Index int32 + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*DataFrame) Descriptor() ([]byte, []int) + func (*DataFrame) ProtoMessage() + func (m *DataFrame) GetCompress() bool + func (m *DataFrame) GetCrc() string + func (m *DataFrame) GetData() []byte + func (m *DataFrame) GetId() string + func (m *DataFrame) GetIndex() int32 + func (m *DataFrame) Reset() + func (m *DataFrame) String() string + func (m *DataFrame) XXX_DiscardUnknown() + func (m *DataFrame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *DataFrame) XXX_Merge(src proto.Message) + func (m *DataFrame) XXX_Size() int + func (m *DataFrame) XXX_Unmarshal(b []byte) error + type DeadLock struct + type FRAME_TYPE int32 + const FRAME_TYPE_CLOSE + const FRAME_TYPE_DATA + const FRAME_TYPE_LOGIN + const FRAME_TYPE_LOGINRSP + const FRAME_TYPE_OPEN + const FRAME_TYPE_OPENRSP + const FRAME_TYPE_PING + const FRAME_TYPE_PONG + func (FRAME_TYPE) EnumDescriptor() ([]byte, []int) + func (x FRAME_TYPE) String() string + type Inputer struct + func NewInputer(wg *group.Group, proto string, addr string, clienttype CLIENT_TYPE, ...) (*Inputer, error) + func NewSocks5Inputer(wg *group.Group, proto string, addr string, clienttype CLIENT_TYPE, ...) (*Inputer, error) + func (i *Inputer) Close() + type LoginFrame struct + Clienttype CLIENT_TYPE + Fromaddr string + Key string + Name string + Proxyproto PROXY_PROTO + Toaddr string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*LoginFrame) Descriptor() ([]byte, []int) + func (*LoginFrame) ProtoMessage() + func (m *LoginFrame) GetClienttype() CLIENT_TYPE + func (m *LoginFrame) GetFromaddr() string + func (m *LoginFrame) GetKey() string + func (m *LoginFrame) GetName() string + func (m *LoginFrame) GetProxyproto() PROXY_PROTO + func (m *LoginFrame) GetToaddr() string + func (m *LoginFrame) Reset() + func (m *LoginFrame) String() string + func (m *LoginFrame) XXX_DiscardUnknown() + func (m *LoginFrame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *LoginFrame) XXX_Merge(src proto.Message) + func (m *LoginFrame) XXX_Size() int + func (m *LoginFrame) XXX_Unmarshal(b []byte) error + type LoginRspFrame struct + Msg string + Ret bool + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*LoginRspFrame) Descriptor() ([]byte, []int) + func (*LoginRspFrame) ProtoMessage() + func (m *LoginRspFrame) GetMsg() string + func (m *LoginRspFrame) GetRet() bool + func (m *LoginRspFrame) Reset() + func (m *LoginRspFrame) String() string + func (m *LoginRspFrame) XXX_DiscardUnknown() + func (m *LoginRspFrame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *LoginRspFrame) XXX_Merge(src proto.Message) + func (m *LoginRspFrame) XXX_Size() int + func (m *LoginRspFrame) XXX_Unmarshal(b []byte) error + type OpenConnFrame struct + Id string + Toaddr string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*OpenConnFrame) Descriptor() ([]byte, []int) + func (*OpenConnFrame) ProtoMessage() + func (m *OpenConnFrame) GetId() string + func (m *OpenConnFrame) GetToaddr() string + func (m *OpenConnFrame) Reset() + func (m *OpenConnFrame) String() string + func (m *OpenConnFrame) XXX_DiscardUnknown() + func (m *OpenConnFrame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *OpenConnFrame) XXX_Merge(src proto.Message) + func (m *OpenConnFrame) XXX_Size() int + func (m *OpenConnFrame) XXX_Unmarshal(b []byte) error + type OpenConnRspFrame struct + Id string + Msg string + Ret bool + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*OpenConnRspFrame) Descriptor() ([]byte, []int) + func (*OpenConnRspFrame) ProtoMessage() + func (m *OpenConnRspFrame) GetId() string + func (m *OpenConnRspFrame) GetMsg() string + func (m *OpenConnRspFrame) GetRet() bool + func (m *OpenConnRspFrame) Reset() + func (m *OpenConnRspFrame) String() string + func (m *OpenConnRspFrame) XXX_DiscardUnknown() + func (m *OpenConnRspFrame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *OpenConnRspFrame) XXX_Merge(src proto.Message) + func (m *OpenConnRspFrame) XXX_Size() int + func (m *OpenConnRspFrame) XXX_Unmarshal(b []byte) error + type Outputer struct + func NewOutputer(wg *group.Group, proto string, clienttype CLIENT_TYPE, config *Config, ...) (*Outputer, error) + func NewSSOutputer(wg *group.Group, proto string, clienttype CLIENT_TYPE, config *Config, ...) (*Outputer, error) + func (o *Outputer) Close() + type PROXY_PROTO int32 + const PROXY_PROTO_KCP + const PROXY_PROTO_RICMP + const PROXY_PROTO_RUDP + const PROXY_PROTO_TCP + const PROXY_PROTO_UDP + func (PROXY_PROTO) EnumDescriptor() ([]byte, []int) + func (x PROXY_PROTO) String() string + type PingFrame struct + Time int64 + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*PingFrame) Descriptor() ([]byte, []int) + func (*PingFrame) ProtoMessage() + func (m *PingFrame) GetTime() int64 + func (m *PingFrame) Reset() + func (m *PingFrame) String() string + func (m *PingFrame) XXX_DiscardUnknown() + func (m *PingFrame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *PingFrame) XXX_Merge(src proto.Message) + func (m *PingFrame) XXX_Size() int + func (m *PingFrame) XXX_Unmarshal(b []byte) error + type PongFrame struct + Time int64 + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*PongFrame) Descriptor() ([]byte, []int) + func (*PongFrame) ProtoMessage() + func (m *PongFrame) GetTime() int64 + func (m *PongFrame) Reset() + func (m *PongFrame) String() string + func (m *PongFrame) XXX_DiscardUnknown() + func (m *PongFrame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *PongFrame) XXX_Merge(src proto.Message) + func (m *PongFrame) XXX_Size() int + func (m *PongFrame) XXX_Unmarshal(b []byte) error + type ProxyConn struct + type ProxyFrame struct + CloseFrame *CloseFrame + DataFrame *DataFrame + LoginFrame *LoginFrame + LoginRspFrame *LoginRspFrame + OpenFrame *OpenConnFrame + OpenRspFrame *OpenConnRspFrame + PingFrame *PingFrame + PongFrame *PongFrame + Type FRAME_TYPE + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func UnmarshalSrpFrame(b []byte, encrpyt string) (*ProxyFrame, error) + func (*ProxyFrame) Descriptor() ([]byte, []int) + func (*ProxyFrame) ProtoMessage() + func (m *ProxyFrame) GetCloseFrame() *CloseFrame + func (m *ProxyFrame) GetDataFrame() *DataFrame + func (m *ProxyFrame) GetLoginFrame() *LoginFrame + func (m *ProxyFrame) GetLoginRspFrame() *LoginRspFrame + func (m *ProxyFrame) GetOpenFrame() *OpenConnFrame + func (m *ProxyFrame) GetOpenRspFrame() *OpenConnRspFrame + func (m *ProxyFrame) GetPingFrame() *PingFrame + func (m *ProxyFrame) GetPongFrame() *PongFrame + func (m *ProxyFrame) GetType() FRAME_TYPE + func (m *ProxyFrame) Reset() + func (m *ProxyFrame) String() string + func (m *ProxyFrame) XXX_DiscardUnknown() + func (m *ProxyFrame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *ProxyFrame) XXX_Merge(src proto.Message) + func (m *ProxyFrame) XXX_Size() int + func (m *ProxyFrame) XXX_Unmarshal(b []byte) error + type Server struct + func NewServer(config *Config, proto []string, listenaddrs []string) (*Server, error) + func (s *Server) Close() + type ServerConn struct + type State struct + CheckFps int32 + CheckFrames int32 + CopyFps int32 + CopyFrames int32 + MainRecvNum int32 + MainRecvSize int64 + MainSendNum int32 + MainSendSize int64 + RecvCompSaveSize int64 + RecvFps int32 + RecvFrames int32 + RecvNum int32 + RecvSize int64 + RecvSonnyFps int32 + RecvSonnyFrames int32 + SendCompSaveSize int64 + SendFps int32 + SendFrames int32 + SendNum int32 + SendSize int64 + SendSonnyFps int32 + SendSonnyFrames int32 + type StateThreadNum struct + CheckThread int32 + CopyThread int32 + RecvSonnyThread int32 + RecvThread int32 + SendSonnyThread int32 + SendThread int32 + ThreadNum int32