vless

package
v1.31.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandTCP byte = 1
	CommandUDP byte = 2
)

Command types

View Source
const (
	AtypIPv4       byte = 1
	AtypDomainName byte = 2
	AtypIPv6       byte = 3
)

Addr types

View Source
const Version byte = 0

Version of vmess

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is vless connection generator

func NewClient

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

NewClient return Client instance

func (*Client) StreamConn

func (c *Client) StreamConn(conn net.Conn, dst *DstAddr) (net.Conn, error)

StreamConn return a Conn with net.Conn and DstAddr

type Conn

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

func (*Conn) Read

func (vc *Conn) Read(b []byte) (int, error)

type DstAddr

type DstAddr struct {
	UDP      bool
	AddrType byte
	Addr     []byte
	Port     uint
}

DstAddr store destination address

Jump to

Keyboard shortcuts

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