🐛修复了bug
All checks were successful
continuous-integration/drone/tag Build is passing

This commit is contained in:
coward 2024-06-04 17:31:45 +08:00
parent d942de22de
commit 42b4334d07
2 changed files with 4 additions and 2 deletions

View File

@ -129,7 +129,7 @@ func (clients) Download(c *gin.Context) {
// 处理一下数据
execData := template_data.ClientConfig{
PrivateKey: keys.PrivateKey,
PrivateKey: data.Server.PrivateKey,
IpAllocation: data.IpAllocation,
MTU: setting.MTU,
DNS: strings.Join(setting.DnsServer, ","),
@ -201,7 +201,7 @@ func (clients) GenerateQrCode(c *gin.Context) {
// 处理一下数据
execData := template_data.ClientConfig{
PrivateKey: keys.PrivateKey,
PrivateKey: data.Server.PrivateKey,
IpAllocation: data.IpAllocation,
MTU: setting.MTU,
PublicKey: keys.PublicKey,

View File

@ -4,6 +4,8 @@ type SaveServer struct {
Id string `json:"id" form:"id" binding:"omitempty"` // id
IpScope string `json:"ipScope" form:"ipScope" binding:"required"` // 内网ip范围段
ListenPort int `json:"listenPort" form:"listenPort" binding:"required"` // 监听端口
PrivateKey string `json:"privateKey" form:"privateKey"` // 私钥
PublicKey string `json:"publicKey" form:"publicKey"` // 密钥
PostUpScript string `json:"postUpScript" form:"postUpScript" binding:"omitempty"`
PreDownScript string `json:"preDownScript" form:"preDownScript" binding:"omitempty"`
PostDownScript string `json:"postDownScript" form:"postDownScript" binding:"omitempty"`