mirror of
https://github.com/vx3r/wg-gen-web.git
synced 2024-12-18 00:13:23 +00: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.Name = client["name"].(string)
|
||||||
c.Email = client["email"].(string)
|
c.Email = client["email"].(string)
|
||||||
c.Enable = client["enable"].(bool)
|
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.PresharedKey = s["presharedKey"].(string)
|
||||||
c.AllowedIPs = make([]string, 0)
|
c.AllowedIPs = make([]string, 0)
|
||||||
for _, address := range client["allowedIPs"].([]interface{}) {
|
for _, address := range client["allowedIPs"].([]interface{}) {
|
||||||
|
Loading…
Reference in New Issue
Block a user