From 8fb76cf20f2873793e227b303c899a973fbef0a9 Mon Sep 17 00:00:00 2001 From: comma Date: Tue, 4 Jun 2024 18:42:02 +0800 Subject: [PATCH] :bug:fix a bug --- http/api/client.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/http/api/client.go b/http/api/client.go index 4d53f57..a606894 100644 --- a/http/api/client.go +++ b/http/api/client.go @@ -129,11 +129,11 @@ func (clients) Download(c *gin.Context) { // 处理一下数据 execData := template_data.ClientConfig{ - PrivateKey: data.Server.PrivateKey, + PrivateKey: keys.PrivateKey, IpAllocation: data.IpAllocation, MTU: setting.MTU, DNS: strings.Join(setting.DnsServer, ","), - PublicKey: keys.PublicKey, + PublicKey: data.Server.PublicKey, PresharedKey: keys.PresharedKey, AllowedIPS: data.AllowedIps, Endpoint: setting.EndpointAddress, @@ -201,10 +201,10 @@ func (clients) GenerateQrCode(c *gin.Context) { // 处理一下数据 execData := template_data.ClientConfig{ - PrivateKey: data.Server.PrivateKey, + PrivateKey: keys.PrivateKey, IpAllocation: data.IpAllocation, MTU: setting.MTU, - PublicKey: keys.PublicKey, + PublicKey: data.Server.PublicKey, PresharedKey: keys.PresharedKey, AllowedIPS: data.AllowedIps, Endpoint: setting.EndpointAddress,