"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "internal/dnsforward/config.go" between
AdGuardHome-0.105.1.tar.gz and AdGuardHome-0.105.2.tar.gz

About: AdGuard Home is a network-wide ads & trackers blocking DNS server. It operates as a DNS server that re-routes tracking domains to a "black hole," thus preventing your devices from connecting to those servers.

config.go  (AdGuardHome-0.105.1):config.go  (AdGuardHome-0.105.2)
skipping to change at line 279 skipping to change at line 279
d := string(data) d := string(data)
for len(d) != 0 { for len(d) != 0 {
s := util.SplitNext(&d, '\n') s := util.SplitNext(&d, '\n')
upstreams = append(upstreams, s) upstreams = append(upstreams, s)
} }
log.Debug("DNS: using %d upstream servers from file %s", len(upst reams), s.conf.UpstreamDNSFileName) log.Debug("DNS: using %d upstream servers from file %s", len(upst reams), s.conf.UpstreamDNSFileName)
} else { } else {
upstreams = s.conf.UpstreamDNS upstreams = s.conf.UpstreamDNS
} }
upstreams = filterOutComments(upstreams) upstreams = filterOutComments(upstreams)
upstreamConfig, err := proxy.ParseUpstreamsConfig(upstreams, s.conf.Boots upstreamConfig, err := proxy.ParseUpstreamsConfig(upstreams,
trapDNS, DefaultTimeout) upstream.Options{
Bootstrap: s.conf.BootstrapDNS,
Timeout: DefaultTimeout,
},
)
if err != nil { if err != nil {
return fmt.Errorf("dns: proxy.ParseUpstreamsConfig: %w", err) return fmt.Errorf("dns: proxy.ParseUpstreamsConfig: %w", err)
} }
if len(upstreamConfig.Upstreams) == 0 { if len(upstreamConfig.Upstreams) == 0 {
log.Info("Warning: no default upstream servers specified, using % log.Info("warning: no default upstream servers specified, using %
v", defaultDNS) v", defaultDNS)
uc, err := proxy.ParseUpstreamsConfig(defaultDNS, s.conf.Bootstra uc, err := proxy.ParseUpstreamsConfig(defaultDNS,
pDNS, DefaultTimeout) upstream.Options{
Bootstrap: s.conf.BootstrapDNS,
Timeout: DefaultTimeout,
},
)
if err != nil { if err != nil {
return fmt.Errorf("dns: failed to parse default upstreams : %v", err) return fmt.Errorf("dns: failed to parse default upstreams : %v", err)
} }
upstreamConfig.Upstreams = uc.Upstreams upstreamConfig.Upstreams = uc.Upstreams
} }
s.conf.UpstreamConfig = &upstreamConfig s.conf.UpstreamConfig = &upstreamConfig
return nil return nil
} }
 End of changes. 2 change blocks. 
6 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)