vless

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const Version = 0

Variables

This section is empty.

Functions

func ReadResponse

func ReadResponse(reader io.Reader) error

func WritePacketRequest

func WritePacketRequest(writer io.Writer, request Request, payload []byte) error

func WriteRequest

func WriteRequest(writer io.Writer, request Request, payload []byte) error

Types

type Client

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

func NewClient

func NewClient(userId string) (*Client, error)

func (*Client) DialConn

func (c *Client) DialConn(conn net.Conn, destination M.Socksaddr) (*Conn, error)

func (*Client) DialEarlyConn

func (c *Client) DialEarlyConn(conn net.Conn, destination M.Socksaddr) *Conn

func (*Client) DialEarlyPacketConn

func (c *Client) DialEarlyPacketConn(conn net.Conn, destination M.Socksaddr) *PacketConn

func (*Client) DialEarlyXUDPPacketConn

func (c *Client) DialEarlyXUDPPacketConn(conn net.Conn, globalID [8]byte, destination M.Socksaddr) vmess.PacketConn

func (*Client) DialPacketConn

func (c *Client) DialPacketConn(conn net.Conn, destination M.Socksaddr) (*PacketConn, error)

func (*Client) DialXUDPPacketConn

func (c *Client) DialXUDPPacketConn(conn net.Conn, globalID [8]byte, destination M.Socksaddr) (vmess.PacketConn, error)

type Conn

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

func (*Conn) Read

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

func (*Conn) Upstream

func (c *Conn) Upstream() any

func (*Conn) Write

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

type PacketConn

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

func (*PacketConn) FrontHeadroom

func (c *PacketConn) FrontHeadroom() int

func (*PacketConn) InitializeReadWaiter

func (c *PacketConn) InitializeReadWaiter(newBuffer func() *buf.Buffer)

func (*PacketConn) Read

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

func (*PacketConn) ReadFrom

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

func (*PacketConn) Upstream

func (c *PacketConn) Upstream() any

func (*PacketConn) WaitReadPacket

func (c *PacketConn) WaitReadPacket() (destination M.Socksaddr, err error)

func (*PacketConn) Write

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

func (*PacketConn) WritePacket

func (c *PacketConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error

func (*PacketConn) WriteTo

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

type Request

type Request struct {
	UUID        []byte
	Command     byte
	Destination M.Socksaddr
}

Jump to

Keyboard shortcuts

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