vmess

package
v2.51.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTimedUserValidator added in v1.1.0

func NewTimedUserValidator(ctx context.Context, hasher protocol.IDHash) protocol.UserValidator

Types

type Account added in v1.1.0

type Account struct {
	// ID of the account, in the form of an UUID, e.g., "66ad4540-b58c-4ad2-9926-ea63445a9b57".
	Id string `protobuf:"bytes,1,opt,name=id" 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" json:"alter_id,omitempty"`
	// Security settings. Only applies to client side.
	SecuritySettings *v2ray_core_common_protocol.SecurityConfig `protobuf:"bytes,3,opt,name=security_settings,json=securitySettings" json:"security_settings,omitempty"`
}

func (*Account) AsAccount added in v1.1.0

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

func (*Account) Descriptor added in v1.1.0

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

func (*Account) GetAlterId added in v1.1.0

func (m *Account) GetAlterId() uint32

func (*Account) GetId added in v1.1.0

func (m *Account) GetId() string

func (*Account) GetSecuritySettings added in v1.1.0

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

func (*Account) ProtoMessage added in v1.1.0

func (*Account) ProtoMessage()

func (*Account) Reset added in v1.1.0

func (m *Account) Reset()

func (*Account) String added in v1.1.0

func (m *Account) String() string

type InternalAccount

type InternalAccount struct {
	ID       *protocol.ID
	AlterIDs []*protocol.ID
	Security protocol.Security
}

func (*InternalAccount) AnyValidID

func (a *InternalAccount) AnyValidID() *protocol.ID

func (*InternalAccount) Equals

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

type TimedUserValidator added in v1.1.0

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

func (*TimedUserValidator) Add added in v1.1.0

func (v *TimedUserValidator) Add(user *protocol.User) error

func (*TimedUserValidator) Get added in v1.1.0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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