Documentation ¶
Index ¶
- func NewH2InboundConn(ctx context.Context, conn net.Conn) (io.ReadWriteCloser, error)
- func NewH2OutboundConn(ctx context.Context, conn net.Conn) (io.ReadWriteCloser, error)
- func NewInboundConnSession(ctx context.Context, conn net.Conn, config *conf.GlobalConfig, ...) (protocol.ConnSession, *protocol.Request, error)
- func NewInboundObfReadWriteCloser(key []byte, conn net.Conn) (*obfReadWriteCloser, error)
- func NewInboundWebsocket(ctx context.Context, conn net.Conn, config *conf.GlobalConfig, ...) (io.ReadWriteCloser, error)
- func NewOutboundConnSession(req *protocol.Request, rwc io.ReadWriteCloser, config *conf.GlobalConfig, ...) (protocol.ConnSession, error)
- func NewOutboundObfReadWriteCloser(key []byte, conn net.Conn) *obfReadWriteCloser
- func NewOutboundWebosocket(conn net.Conn, config *conf.GlobalConfig) (io.ReadWriteCloser, error)
- func NewPacketSession(conn io.ReadWriteCloser) (protocol.PacketSession, error)
- type TrojanInboundConnSession
- type TrojanOutboundConnSession
- type TrojanPacketSession
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewH2InboundConn ¶ added in v0.4.2
func NewH2OutboundConn ¶ added in v0.4.2
func NewInboundConnSession ¶
func NewInboundConnSession(ctx context.Context, conn net.Conn, config *conf.GlobalConfig, auth stat.Authenticator, shadowMan *shadow.ShadowManager) (protocol.ConnSession, *protocol.Request, error)
func NewInboundObfReadWriteCloser ¶ added in v0.3.0
func NewInboundWebsocket ¶ added in v0.1.3
func NewInboundWebsocket(ctx context.Context, conn net.Conn, config *conf.GlobalConfig, shadowMan *shadow.ShadowManager) (io.ReadWriteCloser, error)
func NewOutboundConnSession ¶
func NewOutboundConnSession(req *protocol.Request, rwc io.ReadWriteCloser, config *conf.GlobalConfig, auth stat.Authenticator) (protocol.ConnSession, error)
func NewOutboundObfReadWriteCloser ¶ added in v0.3.0
func NewOutboundWebosocket ¶ added in v0.1.3
func NewOutboundWebosocket(conn net.Conn, config *conf.GlobalConfig) (io.ReadWriteCloser, error)
func NewPacketSession ¶
func NewPacketSession(conn io.ReadWriteCloser) (protocol.PacketSession, error)
Types ¶
type TrojanInboundConnSession ¶
type TrojanInboundConnSession struct { protocol.ConnSession // contains filtered or unexported fields }
func (*TrojanInboundConnSession) Close ¶
func (i *TrojanInboundConnSession) Close() error
func (*TrojanInboundConnSession) Read ¶
func (i *TrojanInboundConnSession) Read(p []byte) (int, error)
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
func (*TrojanOutboundConnSession) Read ¶
func (o *TrojanOutboundConnSession) Read(p []byte) (int, error)
func (*TrojanOutboundConnSession) SetMeter ¶ added in v0.1.5
func (o *TrojanOutboundConnSession) SetMeter(meter stat.TrafficMeter)
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.