mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-01-01 23:15:21 -05:00
server spec
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
)
|
||||
|
||||
type Account interface {
|
||||
Equals(Account) bool
|
||||
}
|
||||
|
||||
type VMessAccount struct {
|
||||
@@ -18,3 +19,12 @@ func (this *VMessAccount) AnyValidID() *ID {
|
||||
}
|
||||
return this.AlterIDs[dice.Roll(len(this.AlterIDs))]
|
||||
}
|
||||
|
||||
func (this *VMessAccount) Equals(account Account) bool {
|
||||
vmessAccount, ok := account.(*VMessAccount)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
// TODO: handle AlterIds difference
|
||||
return this.ID.Equals(vmessAccount.ID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user