trojan

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

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)

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) 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