This commit is contained in:
Yuzuki616
2023-08-23 23:55:57 +08:00
parent 2cb2199b83
commit f6b4c04f43

View File

@@ -73,7 +73,7 @@ type TlsSettings struct {
ServerName string `json:"server_name"`
ServerPort string `json:"server_port"`
ShortId string `json:"short_id"`
PrivateKey string `json:"-"`
PrivateKey string `json:"private_key"`
}
type RealityConfig struct {
@@ -148,9 +148,11 @@ func (c *Client) GetNodeInfo() (node *NodeInfo, err error) {
}
}
if node.Security == Reality {
if rsp.TlsSettings.PrivateKey == "" {
key := crypt.GenX25519Private([]byte("vless" + c.Token))
rsp.TlsSettings.PrivateKey = base64.RawURLEncoding.EncodeToString(key)
}
}
case "shadowsocks":
rsp := &ShadowsocksNode{}
err = json.Unmarshal(r.Body(), rsp)