From 113e3b0b0d823724fdeca97d7d293b459de98cdc Mon Sep 17 00:00:00 2001 From: fatedier Date: Mon, 6 Feb 2023 15:55:33 +0800 Subject: [PATCH] revert random change (#3292) --- client/service.go | 3 +++ cmd/frps/main.go | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/client/service.go b/client/service.go index 90d5b3a..bac5716 100644 --- a/client/service.go +++ b/client/service.go @@ -19,6 +19,7 @@ import ( "crypto/tls" "fmt" "io" + "math/rand" "net" "runtime" "strconv" @@ -46,6 +47,8 @@ import ( func init() { crypto.DefaultSalt = "frp" + // TODO: remove this when we drop support for go1.19 + rand.Seed(time.Now().UnixNano()) } // Service is a client service. diff --git a/cmd/frps/main.go b/cmd/frps/main.go index a7c1e9b..6ae5378 100644 --- a/cmd/frps/main.go +++ b/cmd/frps/main.go @@ -15,6 +15,9 @@ package main import ( + "math/rand" + "time" + "github.com/fatedier/golib/crypto" _ "github.com/fatedier/frp/assets/frps" @@ -23,6 +26,8 @@ import ( func main() { crypto.DefaultSalt = "frp" + // TODO: remove this when we drop support for go1.19 + rand.Seed(time.Now().UnixNano()) Execute() }