mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-07-15 14:34:14 +00:00
!feat(vless): IP restriction
Beta, only works for vless for now and it's not perfect needs a lot of testing.
This commit is contained in:
parent
34b68518fd
commit
3d692eb208
9 changed files with 94 additions and 22 deletions
|
@ -231,13 +231,15 @@ func (list *PortList) UnmarshalJSON(data []byte) error {
|
|||
}
|
||||
|
||||
type User struct {
|
||||
EmailString string `json:"email"`
|
||||
LevelByte byte `json:"level"`
|
||||
EmailString string `json:"email"`
|
||||
LevelByte byte `json:"level"`
|
||||
IpLimitByte byte `json:"ips"`
|
||||
}
|
||||
|
||||
func (v *User) Build() *protocol.User {
|
||||
return &protocol.User{
|
||||
Email: v.EmailString,
|
||||
Level: uint32(v.LevelByte),
|
||||
Ips: uint32(v.IpLimitByte),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue