+ use per-client DNS servers

This commit is contained in:
Simon Zolin
2019-11-06 17:24:15 +03:00
parent b6b26c0681
commit 7313c3bc53
7 changed files with 58 additions and 6 deletions

View File

@@ -20,6 +20,8 @@ type clientJSON struct {
UseGlobalBlockedServices bool `json:"use_global_blocked_services"`
BlockedServices []string `json:"blocked_services"`
Upstreams []string `json:"upstreams"`
}
type clientHostJSON struct {
@@ -92,6 +94,8 @@ func jsonToClient(cj clientJSON) (*Client, error) {
UseOwnBlockedServices: !cj.UseGlobalBlockedServices,
BlockedServices: cj.BlockedServices,
Upstreams: cj.Upstreams,
}
return &c, nil
}
@@ -109,6 +113,8 @@ func clientToJSON(c *Client) clientJSON {
UseGlobalBlockedServices: !c.UseOwnBlockedServices,
BlockedServices: c.BlockedServices,
Upstreams: c.Upstreams,
}
cj.WhoisInfo = make(map[string]interface{})