mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-16 08:22:21 +08:00
Fix random seed
This commit is contained in:
parent
1b44faed17
commit
1e510511ae
2
box.go
2
box.go
|
@ -177,7 +177,7 @@ func New(ctx context.Context, options option.Options) (*Box, error) {
|
||||||
outbounds: outbounds,
|
outbounds: outbounds,
|
||||||
createdAt: createdAt,
|
createdAt: createdAt,
|
||||||
logFactory: logFactory,
|
logFactory: logFactory,
|
||||||
logger: logFactory.NewLogger(""),
|
logger: logFactory.Logger(),
|
||||||
logFile: logFile,
|
logFile: logFile,
|
||||||
clashServer: clashServer,
|
clashServer: clashServer,
|
||||||
v2rayServer: v2rayServer,
|
v2rayServer: v2rayServer,
|
||||||
|
|
|
@ -9,10 +9,11 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
B "github.com/sagernet/sing/common/buf"
|
B "github.com/sagernet/sing/common/buf"
|
||||||
|
"github.com/sagernet/sing/common/random"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rand.Seed(time.Now().Unix())
|
random.InitializeSeed()
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user