diff --git a/user.go b/user.go index f73f19d..1f08353 100755 --- a/user.go +++ b/user.go @@ -42,10 +42,16 @@ type User struct { TransferEnable int64 `json:"transfer_enable"` U int64 `json:"u"` D int64 `json:"d"` + IsAdmin bool `json:"is_admin"` + Class int `json:"class"` V2rayUser VUser `json:"v2ray_user"` } +func (u User) GetClass() int { + return u.Class +} + func (u User) GetPort() int { return u.Port } @@ -72,6 +78,10 @@ func (u User) IsEnable() bool { return true } +func (u User) Admin() bool { + return u.IsAdmin +} + func (u User) GetCipher() (*ss.Cipher, error, bool) { method := u.Method auth := false