trojan

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2020 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 NewInboundObfReadWriteCloser(key []byte, conn net.Conn) (*obfReadWriteCloser, error)

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 NewOutboundObfReadWriteCloser(key []byte, conn net.Conn) *obfReadWriteCloser

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)

func (*TrojanInboundConnSession) Write

func (i *TrojanInboundConnSession) Write(p []byte) (int, error)

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)

func (*TrojanOutboundConnSession) Write

func (o *TrojanOutboundConnSession) Write(p []byte) (int, 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

func (i *TrojanPacketSession) WritePacket(req *protocol.Request, packet []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL