|
I am trying to understand the intent behind It appears to normalize VLESS user IDs by zeroing bytes 6 and 7: func ProcessUUID(id [16]byte) [16]byte {
id[6] = 0
id[7] = 0
return id
}If I understand correctly, this means the entire third UUID group is ignored for user matching. What is the reason for this normalization? |
Replies: 1 comment
|
This looks intentional. Those two bytes are not part of the effective VLESS user identity in Xray; they are reserved for The flow is:
So yes, UUIDs that differ only in bytes 6 and 7 are treated as the same VLESS user. Those bytes become a 16-bit route value ( Operationally, I would not create multiple users whose IDs only differ in the third UUID group. Use a distinct normalized UUID for user identity, and use bytes 6-7 only when you intentionally want to drive |
This looks intentional. Those two bytes are not part of the effective VLESS user identity in Xray; they are reserved for
vlessRoute.The flow is:
MemoryValidator.Add()stores users underProcessUUID(userID).MemoryValidator.Get()also looks upProcessUUID(id).inbound.VlessRoute = net.PortFromBytes(userSentID[6:8]).vlessRouterule field and matches it throughctx.GetVlessRoute().So yes, UUIDs that differ only in bytes 6 and 7 are treated as the same VLESS user. Those bytes become a 16-bit route value (
7th<<8 | 8th) that the client can send per request without breaking user lookup.Ope…