mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-07-16 12:59:39 +03:00
Add xhttp transport
This commit is contained in:
14
common/xray/crypto/crypto.go
Normal file
14
common/xray/crypto/crypto.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package crypto
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"math/big"
|
||||
)
|
||||
|
||||
func RandBetween(from int64, to int64) int64 {
|
||||
if from == to {
|
||||
return from
|
||||
}
|
||||
bigInt, _ := rand.Int(rand.Reader, big.NewInt(to-from))
|
||||
return from + bigInt.Int64()
|
||||
}
|
||||
Reference in New Issue
Block a user