cherry-pick: 2875 client settings

Merge in DNS/adguard-home from 2875-client-settings to master

Updates #2875.

Squashed commit of the following:

commit 43e5af66acb8ace71a329fe2effae6a78492d73f
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Wed May 12 18:12:03 2021 +0300

    all: fix client settings applying
This commit is contained in:
Eugene Burkov
2021-05-12 20:04:50 +03:00
committed by Ainar Garipov
parent f7e4e998cf
commit 3953ca50e6
4 changed files with 25 additions and 44 deletions

View File

@@ -370,9 +370,7 @@ func (s *Server) setupResolvers(localAddrs []string) (err error) {
// really applicable here since in case of listening on all network
// interfaces we should check the whole interface's network to cut off
// all the loopback addresses as well.
localAddrs = aghstrings.FilterOut(localAddrs, func(s string) (ok bool) {
return ourAddrsSet.Has(s)
})
localAddrs = aghstrings.FilterOut(localAddrs, ourAddrsSet.Has)
var upsConfig proxy.UpstreamConfig
upsConfig, err = proxy.ParseUpstreamsConfig(localAddrs, upstream.Options{