mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-03 07:56:42 -05:00
31 lines
602 B
Go
31 lines
602 B
Go
package mocks
|
|
|
|
import (
|
|
"github.com/v2ray/v2ray-core/common/uuid"
|
|
"github.com/v2ray/v2ray-core/proxy/vmess"
|
|
)
|
|
|
|
type StaticUser struct {
|
|
id *vmess.ID
|
|
}
|
|
|
|
func (this *StaticUser) ID() *vmess.ID {
|
|
return this.id
|
|
}
|
|
|
|
func (this *StaticUser) Level() vmess.UserLevel {
|
|
return vmess.UserLevelUntrusted
|
|
}
|
|
|
|
type StaticUserSet struct {
|
|
}
|
|
|
|
func (us *StaticUserSet) AddUser(user vmess.User) error {
|
|
return nil
|
|
}
|
|
|
|
func (us *StaticUserSet) GetUser(userhash []byte) (vmess.User, int64, bool) {
|
|
id, _ := uuid.ParseString("703e9102-eb57-499c-8b59-faf4f371bb21")
|
|
return &StaticUser{id: vmess.NewID(id)}, 0, true
|
|
}
|