vmess

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("user do not exist")
	ErrReplay   = errors.New("replayed request")
)
View Source
var NewAuthIDMatchers = map[bool]NewAuthIDMatcherFunc{
	// contains filtered or unexported fields
}

map[AntiReplay]NewAuthIDMatcherFunc

Functions

This section is empty.

Types

type Account

type Account struct {
	ID     *protocol.ID
	Server *Server
}

type AuthIDDecoderItem

type AuthIDDecoderItem struct {
	// contains filtered or unexported fields
}

func NewAuthIDDecoderItem

func NewAuthIDDecoderItem(key [16]byte, account *Account) *AuthIDDecoderItem

type AuthIDLinearMatcher

type AuthIDLinearMatcher struct {
	// contains filtered or unexported fields
}

func (*AuthIDLinearMatcher) AddUser

func (a *AuthIDLinearMatcher) AddUser(key [16]byte, account *Account)

func (*AuthIDLinearMatcher) Match

func (a *AuthIDLinearMatcher) Match(authID [16]byte) (*Account, error)

func (*AuthIDLinearMatcher) RemoveUser

func (a *AuthIDLinearMatcher) RemoveUser(key [16]byte)

type AuthIDLinearMatcherWithAntiReplay added in v0.1.2

type AuthIDLinearMatcherWithAntiReplay struct {
	AuthIDLinearMatcher
	// contains filtered or unexported fields
}

func (*AuthIDLinearMatcherWithAntiReplay) Match added in v0.1.2

func (a *AuthIDLinearMatcherWithAntiReplay) Match(authID [16]byte) (*Account, error)

type AuthIDMatcher

type AuthIDMatcher interface {
	Match([16]byte) (*Account, error)
	AddUser([16]byte, *Account)
	RemoveUser([16]byte)
}

func NewAuthIDLinearMatcher

func NewAuthIDLinearMatcher() AuthIDMatcher

func NewAuthIDLinearMatcherWithAntiReplay added in v0.1.2

func NewAuthIDLinearMatcherWithAntiReplay() AuthIDMatcher

type NewAuthIDMatcherFunc added in v0.1.2

type NewAuthIDMatcherFunc func() AuthIDMatcher

type Server

type Server struct {
	Target      string
	TCPFastOpen bool
}

type Validator

type Validator struct {
	sync.RWMutex

	AuthIDMatcher AuthIDMatcher
	// contains filtered or unexported fields
}

func (*Validator) Add

func (v *Validator) Add(account *Account)

func (*Validator) Get

func (v *Validator) Get(userHash []byte) (*Account, error)

func (*Validator) GetBehaviorSeed

func (v *Validator) GetBehaviorSeed() uint64

func (*Validator) Remove

func (v *Validator) Remove(uuid uuid.UUID)

Jump to

Keyboard shortcuts

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