mirror of
https://github.com/netchx/netch.git
synced 2026-03-14 17:43:18 +08:00
V2Ray : Support Xray UUIDv5 mapping standard
This commit is contained in:
@@ -82,7 +82,7 @@ public static class V2rayConfigUtils
|
||||
{
|
||||
new User
|
||||
{
|
||||
id = vless.UserID,
|
||||
id = getUUID(vless.UserID),
|
||||
flow = vless.Flow.ValueOrDefault(),
|
||||
encryption = vless.EncryptMethod
|
||||
}
|
||||
@@ -125,7 +125,7 @@ public static class V2rayConfigUtils
|
||||
{
|
||||
new User
|
||||
{
|
||||
id = vmess.UserID,
|
||||
id = getUUID(vmess.UserID),
|
||||
alterId = vmess.AlterID,
|
||||
security = vmess.EncryptMethod
|
||||
}
|
||||
@@ -366,4 +366,13 @@ public static class V2rayConfigUtils
|
||||
|
||||
return streamSettings;
|
||||
}
|
||||
|
||||
public static string getUUID(string uuid)
|
||||
{
|
||||
if (uuid.Length == 36 || uuid.Length == 32)
|
||||
{
|
||||
return uuid;
|
||||
}
|
||||
return uuid.GenerateUUIDv5();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user