Documentation
¶
Overview ¶
Package vless contains the implementation of VLess protocol and transportation.
VLess contains both inbound and outbound connections. VLess inbound is usually used on servers together with 'freedom' to talk to final destination, while VLess outbound is usually used on clients with 'socks' for proxying.
Index ¶
- Constants
- Variables
- func ProcessUUID(id [16]byte) [16]byte
- type Account
- func (a *Account) AsAccount() (protocol.Account, error)
- func (*Account) Descriptor() ([]byte, []int)deprecated
- func (x *Account) GetEncryption() string
- func (x *Account) GetFlow() string
- func (x *Account) GetId() string
- func (x *Account) GetPadding() string
- func (x *Account) GetReverse() *Reverse
- func (x *Account) GetSeconds() uint32
- func (x *Account) GetXorMode() uint32
- func (*Account) ProtoMessage()
- func (x *Account) ProtoReflect() protoreflect.Message
- func (x *Account) Reset()
- func (x *Account) String() string
- type MemoryAccount
- type MemoryValidator
- func (v *MemoryValidator) Add(u *protocol.MemoryUser) error
- func (v *MemoryValidator) Del(e string) error
- func (v *MemoryValidator) Get(id uuid.UUID) *protocol.MemoryUser
- func (v *MemoryValidator) GetAll() []*protocol.MemoryUser
- func (v *MemoryValidator) GetByEmail(email string) *protocol.MemoryUser
- func (v *MemoryValidator) GetCount() int64
- type Reverse
- type Validator
Constants ¶
View Source
const ( None = "none" XRV = "xtls-rprx-vision" )
Variables ¶
View Source
var File_proxy_vless_account_proto protoreflect.FileDescriptor
Functions ¶
func ProcessUUID ¶ added in v1.250831.0
Types ¶
type Account ¶
type Account struct {
// ID of the account, in the form of a UUID, e.g., "66ad4540-b58c-4ad2-9926-ea63445a9b57".
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Flow settings. May be "xtls-rprx-vision".
Flow string `protobuf:"bytes,2,opt,name=flow,proto3" json:"flow,omitempty"`
Encryption string `protobuf:"bytes,3,opt,name=encryption,proto3" json:"encryption,omitempty"`
XorMode uint32 `protobuf:"varint,4,opt,name=xorMode,proto3" json:"xorMode,omitempty"`
Seconds uint32 `protobuf:"varint,5,opt,name=seconds,proto3" json:"seconds,omitempty"`
Padding string `protobuf:"bytes,6,opt,name=padding,proto3" json:"padding,omitempty"`
Reverse *Reverse `protobuf:"bytes,7,opt,name=reverse,proto3" json:"reverse,omitempty"`
// contains filtered or unexported fields
}
func (*Account) Descriptor
deprecated
func (*Account) GetEncryption ¶
func (*Account) GetPadding ¶ added in v1.250831.0
func (*Account) GetReverse ¶ added in v1.250910.0
func (*Account) GetSeconds ¶ added in v1.250831.0
func (*Account) GetXorMode ¶ added in v1.250831.0
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) ProtoReflect ¶
func (x *Account) ProtoReflect() protoreflect.Message
type MemoryAccount ¶
type MemoryAccount struct {
// ID of the account.
ID *protocol.ID
// Flow of the account. May be "xtls-rprx-vision".
Flow string
Encryption string
XorMode uint32
Seconds uint32
Padding string
Reverse *Reverse
}
MemoryAccount is an in-memory form of VLess account.
func (*MemoryAccount) Equals ¶
func (a *MemoryAccount) Equals(account protocol.Account) bool
Equals implements protocol.Account.Equals().
func (*MemoryAccount) ToProto ¶ added in v1.250306.0
func (a *MemoryAccount) ToProto() proto.Message
type MemoryValidator ¶ added in v1.250306.0
type MemoryValidator struct {
// contains filtered or unexported fields
}
MemoryValidator stores valid VLESS users.
func (*MemoryValidator) Add ¶ added in v1.250306.0
func (v *MemoryValidator) Add(u *protocol.MemoryUser) error
Add a VLESS user, Email must be empty or unique.
func (*MemoryValidator) Del ¶ added in v1.250306.0
func (v *MemoryValidator) Del(e string) error
Del a VLESS user with a non-empty Email.
func (*MemoryValidator) Get ¶ added in v1.250306.0
func (v *MemoryValidator) Get(id uuid.UUID) *protocol.MemoryUser
Get a VLESS user with UUID, nil if user doesn't exist.
func (*MemoryValidator) GetAll ¶ added in v1.250306.0
func (v *MemoryValidator) GetAll() []*protocol.MemoryUser
Get all users
func (*MemoryValidator) GetByEmail ¶ added in v1.250306.0
func (v *MemoryValidator) GetByEmail(email string) *protocol.MemoryUser
Get a VLESS user with email, nil if user doesn't exist.
func (*MemoryValidator) GetCount ¶ added in v1.250306.0
func (v *MemoryValidator) GetCount() int64
Get users count
type Reverse ¶ added in v1.250910.0
type Reverse struct {
Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
// contains filtered or unexported fields
}
func (*Reverse) Descriptor
deprecated
added in
v1.250910.0
func (*Reverse) ProtoMessage ¶ added in v1.250910.0
func (*Reverse) ProtoMessage()
func (*Reverse) ProtoReflect ¶ added in v1.250910.0
func (x *Reverse) ProtoReflect() protoreflect.Message
type Validator ¶
type Validator interface {
Get(id uuid.UUID) *protocol.MemoryUser
Add(u *protocol.MemoryUser) error
Del(email string) error
GetByEmail(email string) *protocol.MemoryUser
GetAll() []*protocol.MemoryUser
GetCount() int64
}
Click to show internal directories.
Click to hide internal directories.