trojanc

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FailAuthErr = fmt.Errorf("incorrect UUID")
)

Functions

func CompleteFromInstructionData

func CompleteFromInstructionData(m *vmess.Metadata, instructionData []byte) (err error)

func NewDialer

func NewDialer(nextDialer proxy.Dialer, header protocol.Header) (proxy.Dialer, error)

func Password2Key

func Password2Key(password string) (id []byte, err error)

Types

type Conn

type Conn struct {
	net.Conn
	// contains filtered or unexported fields
}

func NewConn

func NewConn(conn net.Conn, metadata vmess.Metadata, cmdKey []byte) (c *Conn, err error)

func (*Conn) LocalAddr

func (c *Conn) LocalAddr() net.Addr

func (*Conn) Read

func (c *Conn) Read(b []byte) (n int, err error)

func (*Conn) ReadFrom

func (c *Conn) ReadFrom(p []byte) (n int, addr net.Addr, err error)

func (*Conn) ReadReqHeader

func (c *Conn) ReadReqHeader() (err error)

func (*Conn) ReadRespHeader

func (c *Conn) ReadRespHeader() (err error)

func (*Conn) RemoteAddr

func (c *Conn) RemoteAddr() net.Addr

func (*Conn) Write

func (c *Conn) Write(b []byte) (n int, err error)

func (*Conn) WriteTo

func (c *Conn) WriteTo(p []byte, addr net.Addr) (n int, err error)

type Dialer

type Dialer struct {
	// contains filtered or unexported fields
}

func (*Dialer) Dial

func (d *Dialer) Dial(network string, addr string) (c net.Conn, err error)

Jump to

Keyboard shortcuts

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