mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-04-17 13:05:57 +00:00
16 lines
251 B
Go
16 lines
251 B
Go
|
|
package reverse
|
||
|
|
|
||
|
|
import (
|
||
|
|
"crypto/rand"
|
||
|
|
"io"
|
||
|
|
|
||
|
|
"github.com/xtls/xray-core/common/dice"
|
||
|
|
)
|
||
|
|
|
||
|
|
func (c *Control) FillInRandom() {
|
||
|
|
randomLength := dice.Roll(64)
|
||
|
|
randomLength++
|
||
|
|
c.Random = make([]byte, randomLength)
|
||
|
|
io.ReadFull(rand.Reader, c.Random)
|
||
|
|
}
|