vless

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XRO = "xtls-rprx-origin"
	XRD = "xtls-rprx-direct"
	XRS = "xtls-rprx-splice"
	XRV = "xtls-rprx-vision"

	Version byte = 0 // protocol version. preview version is 0
)
View Source
const (
	CommandTCP byte = 1
	CommandUDP byte = 2
	CommandMux byte = 3
)

Command types

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

Addr types

Variables

View Source
var File_transport_vless_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Addons

type Addons struct {
	Flow string `protobuf:"bytes,1,opt,name=Flow,proto3" json:"Flow,omitempty"`
	Seed []byte `protobuf:"bytes,2,opt,name=Seed,proto3" json:"Seed,omitempty"`
	// contains filtered or unexported fields
}

func (*Addons) Descriptor deprecated

func (*Addons) Descriptor() ([]byte, []int)

Deprecated: Use Addons.ProtoReflect.Descriptor instead.

func (*Addons) GetFlow

func (x *Addons) GetFlow() string

func (*Addons) GetSeed

func (x *Addons) GetSeed() []byte

func (*Addons) ProtoMessage

func (*Addons) ProtoMessage()

func (*Addons) ProtoReflect

func (x *Addons) ProtoReflect() protoreflect.Message

func (*Addons) Reset

func (x *Addons) Reset()

func (*Addons) String

func (x *Addons) String() string

type Client

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

Client is vless connection generator

func NewClient

func NewClient(uuidStr string, addons *Addons) (*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 {
	N.ExtendedWriter
	N.ExtendedReader
	net.Conn
	// contains filtered or unexported fields
}

func (*Conn) IsXTLSVisionEnabled

func (vc *Conn) IsXTLSVisionEnabled() bool

func (*Conn) NeedHandshake

func (vc *Conn) NeedHandshake() bool

func (*Conn) Read

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

func (*Conn) ReadBuffer

func (vc *Conn) ReadBuffer(buffer *buf.Buffer) error

func (*Conn) Upstream

func (vc *Conn) Upstream() any

func (*Conn) Write

func (vc *Conn) Write(p []byte) (int, error)

func (*Conn) WriteBuffer

func (vc *Conn) WriteBuffer(buffer *buf.Buffer) error

type DstAddr

type DstAddr struct {
	UDP      bool
	AddrType byte
	Addr     []byte
	Port     uint16
	Mux      bool // currently used for XUDP only
}

DstAddr store destination address

Directories

Path Synopsis
Package vision implements VLESS flow `xtls-rprx-vision` introduced by Xray-core.
Package vision implements VLESS flow `xtls-rprx-vision` introduced by Xray-core.

Jump to

Keyboard shortcuts

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