Finalmask: Make "udpHop" a new UDP mask (#6327)

https://github.com/XTLS/Xray-core/pull/6327#issuecomment-5592421364

---------

Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
This commit is contained in:
LjhAUMEM
2026-09-08 22:15:02 +00:00
committed by GitHub
co-authored by RPRX
parent c26d2eda24
commit 18a1b5042a
32 changed files with 823 additions and 677 deletions
+3 -3
View File
@@ -10,12 +10,12 @@ import (
// [,)
func RandBetween(from int64, to int64) int64 {
if from == to {
return from
}
if from > to {
from, to = to, from
}
if d := to - from; d == 0 || d == 1 {
return from
}
bigInt, _ := rand.Int(rand.Reader, big.NewInt(to-from))
return from + bigInt.Int64()
}