2020-11-25 19:01:53 +08:00
|
|
|
package reverse
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"crypto/rand"
|
|
|
|
|
"io"
|
|
|
|
|
|
2020-12-04 09:36:16 +08:00
|
|
|
"github.com/xtls/xray-core/common/dice"
|
2020-11-25 19:01:53 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func (c *Control) FillInRandom() {
|
|
|
|
|
randomLength := dice.Roll(64)
|
2025-07-23 12:09:17 +02:00
|
|
|
randomLength++
|
2020-11-25 19:01:53 +08:00
|
|
|
c.Random = make([]byte, randomLength)
|
|
|
|
|
io.ReadFull(rand.Reader, c.Random)
|
|
|
|
|
}
|