import "v2ray.com/core/proxy/vmess"
Package vmess contains the implementation of VMess protocol and transportation.
VMess contains both inbound and outbound connections. VMess inbound is usually used on servers together with 'freedom' to talk to final destination, while VMess outbound is usually used on clients with 'socks' for proxying.
account.go account.pb.go errors.generated.go validator.go vmess.go vmessCtxInterface.go
const AlterID = "VMessCtxInterface_AlterID"
example
var ErrNotFound = newError("Not Found")
var ErrTainted = newError("ErrTainted")
var File_proxy_vmess_account_proto protoreflect.FileDescriptor
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"` // Number of alternative IDs. Client and server must share the same number. AlterId uint32 `protobuf:"varint,2,opt,name=alter_id,json=alterId,proto3" json:"alter_id,omitempty"` // Security settings. Only applies to client side. SecuritySettings *protocol.SecurityConfig `protobuf:"bytes,3,opt,name=security_settings,json=securitySettings,proto3" json:"security_settings,omitempty"` // Define tests enabled for this account TestsEnabled string `protobuf:"bytes,4,opt,name=tests_enabled,json=testsEnabled,proto3" json:"tests_enabled,omitempty"` // contains filtered or unexported fields }
AsAccount implements protocol.Account.
Deprecated: Use Account.ProtoReflect.Descriptor instead.
func (x *Account) GetSecuritySettings() *protocol.SecurityConfig
func (x *Account) ProtoReflect() protoreflect.Message
type MemoryAccount struct { // ID is the main ID of the account. ID *protocol.ID // AlterIDs are the alternative IDs of the account. AlterIDs []*protocol.ID // Security type of the account. Used for client connections. Security protocol.SecurityType }
MemoryAccount is an in-memory form of VMess account.
func (a *MemoryAccount) AnyValidID() *protocol.ID
AnyValidID returns an ID that is either the main ID or one of the alternative IDs if any.
func (a *MemoryAccount) Equals(account protocol.Account) bool
Equals implements protocol.Account.
TimedUserValidator is a user Validator based on time.
func NewTimedUserValidator(hasher protocol.IDHash) *TimedUserValidator
NewTimedUserValidator creates a new TimedUserValidator.
func (v *TimedUserValidator) Add(u *protocol.MemoryUser) error
func (v *TimedUserValidator) BurnTaintFuse(userHash []byte) error
func (v *TimedUserValidator) Close() error
Close implements common.Closable.
func (v *TimedUserValidator) Get(userHash []byte) (*protocol.MemoryUser, protocol.Timestamp, bool, error)
func (v *TimedUserValidator) GetAEAD(userHash []byte) (*protocol.MemoryUser, bool, error)
func (v *TimedUserValidator) GetBehaviorSeed() uint64
func (v *TimedUserValidator) Remove(email string) bool
Path | Synopsis |
---|---|
aead | |
encoding | |
inbound | |
outbound |
Package vmess imports 20 packages (graph) and is imported by 46 packages. Updated 2020-10-12. Refresh now. Tools for package owners.