trojanc

package
v0.0.0-...-e5d0cd3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func CompleteMetadataFromReader

func CompleteMetadataFromReader(m *vmess.Metadata, first4 []byte, r io.Reader) (err error)

func NewDialer

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

func Password2Key

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

Types

type Conn

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

func NewConn

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

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 netip.AddrPort, err error)

func (*Conn) ReadReqHeader

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

func (*Conn) ReadRespHeader

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

func (*Conn) Write

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

func (*Conn) WriteTo

func (c *Conn) WriteTo(p []byte, addr string) (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 netproxy.Conn, err error)

func (*Dialer) DialTcp

func (d *Dialer) DialTcp(addr string) (c netproxy.Conn, err error)

func (*Dialer) DialUdp

func (d *Dialer) DialUdp(addr string) (c netproxy.PacketConn, err error)

Jump to

Keyboard shortcuts

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