mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-06 18:28:00 -05:00
21 lines
311 B
Go
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))]
|
|
}
|