core: v2ray.com/core/proxy/vmess Index | Files | Directories

package vmess

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.

Index

Package Files

account.go account.pb.go errors.generated.go validator.go vmess.go

type Account Uses

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"`
    XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
    XXX_unrecognized     []byte                   `json:"-"`
    XXX_sizecache        int32                    `json:"-"`
}

func (*Account) AsAccount Uses

func (a *Account) AsAccount() (protocol.Account, error)

AsAccount implements protocol.Account.

func (*Account) Descriptor Uses

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

func (*Account) GetAlterId Uses

func (m *Account) GetAlterId() uint32

func (*Account) GetId Uses

func (m *Account) GetId() string

func (*Account) GetSecuritySettings Uses

func (m *Account) GetSecuritySettings() *protocol.SecurityConfig

func (*Account) ProtoMessage Uses

func (*Account) ProtoMessage()

func (*Account) Reset Uses

func (m *Account) Reset()

func (*Account) String Uses

func (m *Account) String() string

func (*Account) XXX_DiscardUnknown Uses

func (m *Account) XXX_DiscardUnknown()

func (*Account) XXX_Marshal Uses

func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Account) XXX_Merge Uses

func (m *Account) XXX_Merge(src proto.Message)

func (*Account) XXX_Size Uses

func (m *Account) XXX_Size() int

func (*Account) XXX_Unmarshal Uses

func (m *Account) XXX_Unmarshal(b []byte) error

type MemoryAccount Uses

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 from of VMess account.

func (*MemoryAccount) AnyValidID Uses

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 (*MemoryAccount) Equals Uses

func (a *MemoryAccount) Equals(account protocol.Account) bool

Equals implements protocol.Account.

type TimedUserValidator Uses

type TimedUserValidator struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

TimedUserValidator is a user Validator based on time.

func NewTimedUserValidator Uses

func NewTimedUserValidator(hasher protocol.IDHash) *TimedUserValidator

NewTimedUserValidator creates a new TimedUserValidator.

func (*TimedUserValidator) Add Uses

func (v *TimedUserValidator) Add(u *protocol.MemoryUser) error

func (*TimedUserValidator) Close Uses

func (v *TimedUserValidator) Close() error

Close implements common.Closable.

func (*TimedUserValidator) Get Uses

func (v *TimedUserValidator) Get(userHash []byte) (*protocol.MemoryUser, protocol.Timestamp, bool)

func (*TimedUserValidator) Remove Uses

func (v *TimedUserValidator) Remove(email string) bool

Directories

PathSynopsis
encoding
inbound
outbound

Package vmess imports 13 packages (graph) and is imported by 19 packages. Updated 2019-02-28. Refresh now. Tools for package owners.