1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-07-03 20:45:23 +00:00
v2fly/common/protocol/account.go

21 lines
311 B
Go
Raw Normal View History

2016-05-07 18:26:03 +00:00
package protocol
2016-05-28 11:44:11 +00:00
import (
"github.com/v2ray/v2ray-core/common/dice"
)
2016-05-07 18:26:03 +00:00
type Account interface {
}
2016-05-28 11:44:11 +00:00
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))]
}