[client] Persist route selection (#2810)

This commit is contained in:
Viktor Liu
2024-12-02 17:55:02 +01:00
committed by GitHub
parent ecb44ff306
commit 5142dc52c1
10 changed files with 273 additions and 40 deletions

View File

@@ -37,6 +37,11 @@ func (s *ipList) UnmarshalJSON(data []byte) error {
return err
}
s.ips = temp.IPs
if temp.IPs == nil {
temp.IPs = make(map[string]struct{})
}
return nil
}
@@ -89,5 +94,10 @@ func (s *ipsetStore) UnmarshalJSON(data []byte) error {
return err
}
s.ipsets = temp.IPSets
if temp.IPSets == nil {
temp.IPSets = make(map[string]*ipList)
}
return nil
}