Documentation ¶
Index ¶
- Constants
- Variables
- func NewDialer(nextDialer netproxy.Dialer, header protocol.Header) (netproxy.Dialer, error)
- func SealUDP(metadata trojanc.Metadata, dst []byte, data []byte) []byte
- type ClientOption
- type Conn
- type Dialer
- func (d *Dialer) Dial(network string, addr string) (c netproxy.Conn, err error)
- func (d *Dialer) DialCmdMsg(cmd protocol.MetadataCmd) (c netproxy.Conn, err error)
- func (d *Dialer) DialTcp(addr string) (c netproxy.Conn, err error)
- func (d *Dialer) DialUdp(addr string) (c netproxy.PacketConn, err error)
- type PacketConn
- type TransportPacketConn
- func (c *TransportPacketConn) Close() error
- func (c *TransportPacketConn) Read(b []byte) (n int, err error)
- func (c *TransportPacketConn) ReadFrom(p []byte) (n int, addrPort netip.AddrPort, err error)
- func (c *TransportPacketConn) SetDeadline(t time.Time) error
- func (c *TransportPacketConn) SetReadDeadline(t time.Time) error
- func (c *TransportPacketConn) SetWriteDeadline(t time.Time) error
- func (c *TransportPacketConn) Write(b []byte) (int, error)
- func (c *TransportPacketConn) WriteTo(p []byte, addr string) (n int, err error)
- type UnderlayAuth
Constants ¶
View Source
const (
UnderlaySaltLen = 32
)
View Source
const (
Version0 byte = 0x0
)
Variables ¶
View Source
var (
CipherConf = ciphers.AeadCiphersConf["chacha20-poly1305"]
)
Functions ¶
Types ¶
type ClientOption ¶
type Conn ¶
type Conn struct { quic.Stream Metadata *trojanc.Metadata // contains filtered or unexported fields }
func (*Conn) CloseWrite ¶
type Dialer ¶
type Dialer struct {
// contains filtered or unexported fields
}
func (*Dialer) DialCmdMsg ¶
type PacketConn ¶
type PacketConn struct { *Conn // contains filtered or unexported fields }
func (*PacketConn) Close ¶
func (c *PacketConn) Close() error
type TransportPacketConn ¶
type TransportPacketConn struct { *quic.Transport // contains filtered or unexported fields }
func (*TransportPacketConn) Close ¶
func (c *TransportPacketConn) Close() error
func (*TransportPacketConn) SetDeadline ¶
func (c *TransportPacketConn) SetDeadline(t time.Time) error
SetDeadline implements netproxy.Conn.
func (*TransportPacketConn) SetReadDeadline ¶
func (c *TransportPacketConn) SetReadDeadline(t time.Time) error
SetReadDeadline implements netproxy.Conn.
func (*TransportPacketConn) SetWriteDeadline ¶
func (c *TransportPacketConn) SetWriteDeadline(t time.Time) error
SetWriteDeadline implements netproxy.Conn.
type UnderlayAuth ¶
func (*UnderlayAuth) PackFromPool ¶
func (a *UnderlayAuth) PackFromPool() (buf pool.PB)
Click to show internal directories.
Click to hide internal directories.