mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-17 22:57:10 +00:00
use uuid in vmess id
This commit is contained in:
1 parent
ce32d54a5f
commit
a63670311e
9 files changed
+36
-77
No files matched your search
@@ -3,6 +3,7 @@ package json
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/v2ray/v2ray-core/common/uuid"
|
||||
"github.com/v2ray/v2ray-core/proxy/vmess"
|
||||
)
|
||||
|
||||
@@ -23,11 +24,11 @@ func (u *ConfigUser) UnmarshalJSON(data []byte) error {
|
||||
if err := json.Unmarshal(data, &rawUserValue); err != nil {
|
||||
return err
|
||||
}
|
||||
id, err := vmess.NewID(rawUserValue.IdString)
|
||||
id, err := uuid.ParseString(rawUserValue.IdString)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
u.Id = id
|
||||
u.Id = vmess.NewID(id)
|
||||
u.Email = rawUserValue.EmailString
|
||||
u.LevelValue = vmess.UserLevel(rawUserValue.LevelInt)
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user