Fix random seed

This commit is contained in:
世界 2022-09-27 20:29:17 +08:00
parent 1b44faed17
commit 1e510511ae
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
2 changed files with 3 additions and 2 deletions

2
box.go
View file

@ -177,7 +177,7 @@ func New(ctx context.Context, options option.Options) (*Box, error) {
outbounds: outbounds,
createdAt: createdAt,
logFactory: logFactory,
logger: logFactory.NewLogger(""),
logger: logFactory.Logger(),
logFile: logFile,
clashServer: clashServer,
v2rayServer: v2rayServer,

View file

@ -9,10 +9,11 @@ import (
"time"
B "github.com/sagernet/sing/common/buf"
"github.com/sagernet/sing/common/random"
)
func init() {
rand.Seed(time.Now().Unix())
random.InitializeSeed()
}
const (