Merge pull request #14 from stitchrs/dev

chore: adjust method of private key generation
This commit is contained in:
riolu.rs 2023-08-16 01:34:33 +08:00 committed by GitHub
commit f9f8c5c5c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,8 +193,7 @@ func (c *Client) GetNodeInfo() (node *NodeInfo, err error) {
if node.ExtraConfig.RealityConfig == nil {
node.ExtraConfig.EnableReality = "false"
} else {
key := crypt.GenX25519Private([]byte(strconv.Itoa(c.NodeId) + c.NodeType + c.Token +
node.ExtraConfig.RealityConfig.PrivateKey))
key := crypt.GenX25519Private([]byte(strconv.Itoa(c.NodeId) + c.NodeType + c.Token))
node.ExtraConfig.RealityConfig.PrivateKey = base64.RawURLEncoding.EncodeToString(key)
}
}