diff --git a/repository/client.go b/repository/client.go index f7ae4ec..2df1d01 100644 --- a/repository/client.go +++ b/repository/client.go @@ -109,7 +109,11 @@ func (r clientRepo) Save(p param.SaveClient, adminId string) (client *entity.Cli if p.Id != "" { keys, _ := json.Marshal(p.Keys) ent.Keys = string(keys) - if err = r.Model(&entity.Client{}).Where("id = ?", p.Id).Updates(ent).Error; err != nil { + if err = r.Model(&entity.Client{}). + Where("id = ?", p.Id).Select("name", "email", "subnet_range", "ip_allocation", + "allowed_ips", "extra_allowed_ips", "endpoint", "use_server_dns", "enable_after_creation", + "user_id", "enabled"). + Updates(ent).Error; err != nil { return } return diff --git a/script/script.go b/script/script.go index 87d529f..5f85663 100644 --- a/script/script.go +++ b/script/script.go @@ -109,7 +109,7 @@ func (s Script) InitServer() error { "dnsServer": []string{"10.10.10.1/24"}, "MTU": 1450, "persistentKeepalive": 15, - "firewallMark": "", + "firewallMark": "0xca6c", "table": "", "configFilePath": "/etc/wireguard/wg0.conf", }