vless

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

modified from https://github.com/yaling888/clash/blob/plus-pro/transport/vless/vless.go

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

func NewClient

func NewClient(config *protocol.Protocol_Vless) point.WrapProxy

Types

type Client

type Client struct {
	netapi.Proxy
	// contains filtered or unexported fields
}

Client is vless connection generator

func (*Client) Conn

func (c *Client) Conn(ctx context.Context, addr netapi.Address) (net.Conn, error)

func (*Client) PacketConn

func (c *Client) PacketConn(ctx context.Context, addr netapi.Address) (net.PacketConn, error)

type Conn

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

func (*Conn) Read

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

func (*Conn) ReadFrom

func (vc *Conn) ReadFrom(b []byte) (int, net.Addr, error)

func (*Conn) WriteTo

func (vc *Conn) WriteTo(b []byte, target net.Addr) (int, error)

type DstAddr

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

DstAddr store destination address

Jump to

Keyboard shortcuts

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