1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-23 02:26:49 -05:00
v2fly/common/protocol/account.go
2016-05-28 13:44:11 +02:00

21 lines
311 B
Go

package protocol
import (
"github.com/v2ray/v2ray-core/common/dice"
)
type Account interface {
}
type VMessAccount struct {
ID *ID
AlterIDs []*ID
}
func (this *VMessAccount) AnyValidID() *ID {
if len(this.AlterIDs) == 0 {
return this.ID
}
return this.AlterIDs[dice.Roll(len(this.AlterIDs))]
}