:art:新增客户端状态字段

This commit is contained in:
coward
2024-03-11 14:53:28 +08:00
parent 16799ee5d8
commit 71d6090f94
10 changed files with 1002 additions and 0 deletions

View File

@@ -66,6 +66,7 @@ func asyncWireguardConfigFile() {
Table: globalSetting.Table,
}
// 客户端数据
var renderClients []template_data.Client
for _, v := range serverEnt.Clients {
var clientKey template_data.Keys
@@ -77,6 +78,7 @@ func asyncWireguardConfigFile() {
renderClients = append(renderClients, template_data.Client{
ID: v.Id,
Name: v.Name,
Email: v.Email,
PublicKey: clientKey.PublicKey,
PresharedKey: clientKey.PrivateKey,
AllowedIPS: v.AllowedIps,
@@ -85,6 +87,7 @@ func asyncWireguardConfigFile() {
CreatedAt: v.CreatedAt.String(),
UpdatedAt: v.UpdatedAt.String(),
CreateUser: createUserName,
Enabled: v.Enabled,
})
}