chore: adjust method of private key generation

This commit is contained in:
cubemaze 2023-08-16 01:03:29 +08:00
parent 438bcc3361
commit da919666a8

View File

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