Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
Expand Down