mirror of
https://github.com/vx3r/wg-gen-web.git
synced 2024-11-26 04:19:41 +01:00
bug, IgnorePersistentKeepalive may be absent
This commit is contained in:
parent
200e47b708
commit
8a79426e2f
@ -167,7 +167,11 @@ func MigratePresharedKey() error {
|
||||
c.Name = client["name"].(string)
|
||||
c.Email = client["email"].(string)
|
||||
c.Enable = client["enable"].(bool)
|
||||
c.IgnorePersistentKeepalive = client["ignorePersistentKeepalive"].(bool)
|
||||
if val, ok := client["ignorePersistentKeepalive"]; ok {
|
||||
c.IgnorePersistentKeepalive = val.(bool)
|
||||
} else {
|
||||
c.IgnorePersistentKeepalive = false
|
||||
}
|
||||
c.PresharedKey = s["presharedKey"].(string)
|
||||
c.AllowedIPs = make([]string, 0)
|
||||
for _, address := range client["allowedIPs"].([]interface{}) {
|
||||
|
Loading…
Reference in New Issue
Block a user