Documentation ¶
Index ¶
- func NewInboundConnSession(conn net.Conn, config *conf.GlobalConfig, auth stat.Authenticator) (protocol.ConnSession, error)
- func NewOutboundConnSession(req *protocol.Request, conn io.ReadWriteCloser, config *conf.GlobalConfig) (protocol.ConnSession, error)
- func NewPacketSession(conn io.ReadWriteCloser) (protocol.PacketSession, error)
- type TrojanInboundConnSession
- func (i *TrojanInboundConnSession) Close() error
- func (i *TrojanInboundConnSession) GetHash() string
- func (i *TrojanInboundConnSession) GetRequest() *protocol.Request
- func (i *TrojanInboundConnSession) Read(p []byte) (int, error)
- func (i *TrojanInboundConnSession) SetAuth(auth stat.Authenticator)
- func (i *TrojanInboundConnSession) SetMeter(meter stat.TrafficMeter)
- func (i *TrojanInboundConnSession) Write(p []byte) (int, error)
- type TrojanOutboundConnSession
- type TrojanPacketSession
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInboundConnSession ¶
func NewInboundConnSession(conn net.Conn, config *conf.GlobalConfig, auth stat.Authenticator) (protocol.ConnSession, error)
func NewOutboundConnSession ¶
func NewOutboundConnSession(req *protocol.Request, conn io.ReadWriteCloser, config *conf.GlobalConfig) (protocol.ConnSession, error)
func NewPacketSession ¶
func NewPacketSession(conn io.ReadWriteCloser) (protocol.PacketSession, error)
Types ¶
type TrojanInboundConnSession ¶
type TrojanInboundConnSession struct { protocol.ConnSession protocol.NeedAuth protocol.NeedMeter protocol.HasHash // contains filtered or unexported fields }
func (*TrojanInboundConnSession) Close ¶
func (i *TrojanInboundConnSession) Close() error
func (*TrojanInboundConnSession) GetHash ¶ added in v0.0.5
func (i *TrojanInboundConnSession) GetHash() string
func (*TrojanInboundConnSession) GetRequest ¶
func (i *TrojanInboundConnSession) GetRequest() *protocol.Request
func (*TrojanInboundConnSession) Read ¶
func (i *TrojanInboundConnSession) Read(p []byte) (int, error)
func (*TrojanInboundConnSession) SetAuth ¶ added in v0.0.3
func (i *TrojanInboundConnSession) SetAuth(auth stat.Authenticator)
func (*TrojanInboundConnSession) SetMeter ¶ added in v0.0.3
func (i *TrojanInboundConnSession) SetMeter(meter stat.TrafficMeter)
type TrojanOutboundConnSession ¶
type TrojanOutboundConnSession struct { protocol.ConnSession // contains filtered or unexported fields }
func (*TrojanOutboundConnSession) Close ¶
func (o *TrojanOutboundConnSession) Close() error
type TrojanPacketSession ¶
type TrojanPacketSession struct { protocol.PacketSession // contains filtered or unexported fields }
func (*TrojanPacketSession) Close ¶
func (i *TrojanPacketSession) Close() error
func (*TrojanPacketSession) ReadPacket ¶
func (i *TrojanPacketSession) ReadPacket() (*protocol.Request, []byte, error)
func (*TrojanPacketSession) WritePacket ¶
Click to show internal directories.
Click to hide internal directories.