mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 17:35:40 +08:00
vmess: add rand.Seed to avoid same sequence values of rand.Read
This commit is contained in:
parent
3c3cb8e3fd
commit
49482bf054
@ -114,6 +114,7 @@ func (c *Client) NewConn(rc net.Conn, target string) (*Conn, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
randBytes := make([]byte, 33)
|
randBytes := make([]byte, 33)
|
||||||
|
rand.Seed(time.Now().UnixNano())
|
||||||
rand.Read(randBytes)
|
rand.Read(randBytes)
|
||||||
|
|
||||||
copy(conn.reqBodyIV[:], randBytes[:16])
|
copy(conn.reqBodyIV[:], randBytes[:16])
|
||||||
|
Loading…
Reference in New Issue
Block a user