mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-11 14:30:05 +00:00
re-org vmess content
This commit is contained in:
1 parent
0a4d9fb037
commit
af8412175e
24 files changed
+113
-108
No files matched your search
@@ -0,0 +1,27 @@
|
||||
package vmess
|
||||
|
||||
type UserLevel int
|
||||
|
||||
const (
|
||||
UserLevelAdmin = UserLevel(999)
|
||||
UserLevelUntrusted = UserLevel(0)
|
||||
)
|
||||
|
||||
type User interface {
|
||||
ID() *ID
|
||||
Level() UserLevel
|
||||
}
|
||||
|
||||
type UserSettings struct {
|
||||
PayloadReadTimeout int
|
||||
}
|
||||
|
||||
func GetUserSettings(level UserLevel) UserSettings {
|
||||
settings := UserSettings{
|
||||
PayloadReadTimeout: 120,
|
||||
}
|
||||
if level > 0 {
|
||||
settings.PayloadReadTimeout = 0
|
||||
}
|
||||
return settings
|
||||
}
|
||||
Reference in new issue
Block a user