docstring_tokens stringlengths 18 16.9k | code_tokens stringlengths 75 1.81M | html_url stringlengths 74 116 | file_name stringlengths 3 311 |
|---|---|---|---|
keep keep keep keep replace keep keep keep keep keep | <mask> Stats stats.Stats
<mask> QueryLog querylog.QueryLog
<mask> DHCPServer dhcpd.ServerInterface
<mask> SubnetDetector *aghnet.SubnetDetector
<mask> LocalResolvers aghnet.Exchanger
<mask> AutohostTLD string
<mask> }
<mask>
<mask> // tldToSuffix converts a top-level domain into an autohost suffix.
<mask> func tldToSuffix(tld string) (suffix string) {
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove writeStrings(
</s> add aghstrings.WriteToBuilder( </s> add // RDNSSettings returns the copy of actual RDNS configuration.
func (s *Server) RDNSSettings() (localPTRResolvers []string, resolveClients bool) {
s.RLock()
defer s.RUnlock()
return aghstrings.CloneSlice(s.conf.LocalPTRResolvers), s.conf.ResolveClients
}
</s> remove func stringArrayDup(a []string) []string {
a2 := make([]string, len(a))
copy(a2, a)
return a2
}
</s> add </s> add const dot = "."
</s> remove // inStr checks if string is in the slice of strings.
func inStr(strs []string, str string) (ok bool) {
for _, s := range strs {
if s == str {
return true
}
}
return false
}
</s> add </s> remove subnetDetector *aghnet.SubnetDetector
systemResolvers aghnet.SystemResolvers
localResolvers aghnet.Exchanger
</s> add subnetDetector *aghnet.SubnetDetector | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
keep keep keep keep replace keep keep keep keep keep | <mask> dnsFilter: p.DNSFilter,
<mask> stats: p.Stats,
<mask> queryLog: p.QueryLog,
<mask> subnetDetector: p.SubnetDetector,
<mask> localResolvers: p.LocalResolvers,
<mask> autohostSuffix: autohostSuffix,
<mask> }
<mask>
<mask> if p.DHCPServer != nil {
<mask> s.dhcpServer = p.DHCPServer
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove LocalResolvers: Context.localResolvers,
</s> add </s> remove dnsServer: nil,
clients: cc,
subnetDetector: snd,
localResolvers: lr,
ipCh: ch,
</s> add exchanger: &rDNSExchanger{
Exchanger: aghtest.Exchanger{
Ups: tc.ups,
},
},
clients: cc,
ipCh: ch, </s> remove dnsServer: dnsServer,
clients: clients,
subnetDetector: snd,
localResolvers: lr,
</s> add exchanger: exchanger,
clients: clients, </s> remove setupResolvers()
</s> add </s> add if dc.LocalPTRUpstreams != nil {
s.conf.LocalPTRResolvers = *dc.LocalPTRUpstreams
restart = true
}
</s> remove Context.dnsServer.WriteDiskConfig(&c)
</s> add s.WriteDiskConfig(&c) | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep | <mask> func (s *Server) WriteDiskConfig(c *FilteringConfig) {
<mask> s.RLock()
<mask> sc := s.conf.FilteringConfig
<mask> *c = sc
<mask> c.RatelimitWhitelist = stringArrayDup(sc.RatelimitWhitelist)
<mask> c.BootstrapDNS = stringArrayDup(sc.BootstrapDNS)
<mask> c.AllowedClients = stringArrayDup(sc.AllowedClients)
<mask> c.DisallowedClients = stringArrayDup(sc.DisallowedClients)
<mask> c.BlockedHosts = stringArrayDup(sc.BlockedHosts)
<mask> c.UpstreamDNS = stringArrayDup(sc.UpstreamDNS)
<mask> s.RUnlock()
<mask> }
<mask>
<mask> // Resolve - get IP addresses by host name from an upstream server.
<mask> // No request/response filtering is performed.
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> add // RDNSSettings returns the copy of actual RDNS configuration.
func (s *Server) RDNSSettings() (localPTRResolvers []string, resolveClients bool) {
s.RLock()
defer s.RUnlock()
return aghstrings.CloneSlice(s.conf.LocalPTRResolvers), s.conf.ResolveClients
}
</s> remove // Exchange - send DNS request to an upstream server and receive response
// No request/response filtering is performed.
// Query log and Stats are not updated.
// This method may be called before Start().
func (s *Server) Exchange(req *dns.Msg) (*dns.Msg, error) {
</s> add // RDNSExchanger is a resolver for clients' addresses.
type RDNSExchanger interface {
// Exchange tries to resolve the ip in a suitable way, e.g. either as
// local or as external.
Exchange(ip net.IP) (host string, err error)
}
const (
// rDNSEmptyAnswerErr is returned by Exchange method when the answer
// section of respond is empty.
rDNSEmptyAnswerErr agherr.Error = "the answer section is empty"
// rDNSNotPTRErr is returned by Exchange method when the response is not
// of PTR type.
rDNSNotPTRErr agherr.Error = "the response is not a ptr"
)
// Exchange implements the RDNSExchanger interface for *Server.
func (s *Server) Exchange(ip net.IP) (host string, err error) { </s> remove // No need to check this DNS server
</s> add // No need to check this DNS server. </s> add err = s.setupResolvers(s.conf.LocalPTRResolvers)
if err != nil {
return fmt.Errorf("setting up resolvers: %w", err)
}
</s> remove upstreams := stringArrayDup(s.conf.UpstreamDNS)
</s> add defer s.RUnlock()
upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> remove // separate upstream from domains list
input, useDefault, err := separateUpstream(input)
if err != nil {
</s> add // Separate upstream from domains list.
var useDefault bool
if input, useDefault, err = separateUpstream(input); err != nil { | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
keep add keep keep keep keep keep | <mask> }
<mask>
<mask> // Resolve - get IP addresses by host name from an upstream server.
<mask> // No request/response filtering is performed.
<mask> // Query log and Stats are not updated.
<mask> // This method may be called before Start().
<mask> func (s *Server) Resolve(host string) ([]net.IPAddr, error) {
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove // Exchange - send DNS request to an upstream server and receive response
// No request/response filtering is performed.
// Query log and Stats are not updated.
// This method may be called before Start().
func (s *Server) Exchange(req *dns.Msg) (*dns.Msg, error) {
</s> add // RDNSExchanger is a resolver for clients' addresses.
type RDNSExchanger interface {
// Exchange tries to resolve the ip in a suitable way, e.g. either as
// local or as external.
Exchange(ip net.IP) (host string, err error)
}
const (
// rDNSEmptyAnswerErr is returned by Exchange method when the answer
// section of respond is empty.
rDNSEmptyAnswerErr agherr.Error = "the answer section is empty"
// rDNSNotPTRErr is returned by Exchange method when the response is not
// of PTR type.
rDNSNotPTRErr agherr.Error = "the response is not a ptr"
)
// Exchange implements the RDNSExchanger interface for *Server.
func (s *Server) Exchange(ip net.IP) (host string, err error) { </s> remove c.RatelimitWhitelist = stringArrayDup(sc.RatelimitWhitelist)
c.BootstrapDNS = stringArrayDup(sc.BootstrapDNS)
c.AllowedClients = stringArrayDup(sc.AllowedClients)
c.DisallowedClients = stringArrayDup(sc.DisallowedClients)
c.BlockedHosts = stringArrayDup(sc.BlockedHosts)
c.UpstreamDNS = stringArrayDup(sc.UpstreamDNS)
</s> add c.RatelimitWhitelist = aghstrings.CloneSlice(sc.RatelimitWhitelist)
c.BootstrapDNS = aghstrings.CloneSlice(sc.BootstrapDNS)
c.AllowedClients = aghstrings.CloneSlice(sc.AllowedClients)
c.DisallowedClients = aghstrings.CloneSlice(sc.DisallowedClients)
c.BlockedHosts = aghstrings.CloneSlice(sc.BlockedHosts)
c.UpstreamDNS = aghstrings.CloneSlice(sc.UpstreamDNS) </s> remove // ValidateUpstreams validates each upstream and returns an error if any upstream is invalid or if there are no default upstreams specified
</s> add // ValidateUpstreams validates each upstream and returns an error if any
// upstream is invalid or if there are no default upstreams specified.
//
// TODO(e.burkov): Move into aghnet or even into dnsproxy. </s> remove Upstreams []string `json:"upstream_dns"` // Upstreams
BootstrapDNS []string `json:"bootstrap_dns"` // Bootstrap DNS
</s> add Upstreams []string `json:"upstream_dns"`
BootstrapDNS []string `json:"bootstrap_dns"`
PrivateUpstreams []string `json:"private_upstream"` </s> remove const (
// rDNSEmptyAnswerErr is returned by RDNS resolve method when the answer
// section of respond is empty.
rDNSEmptyAnswerErr agherr.Error = "the answer section is empty"
// rDNSNotPTRErr is returned by RDNS resolve method when the response is
// not of PTR type.
rDNSNotPTRErr agherr.Error = "the response is not a ptr"
)
// resolve tries to resolve the ip in a suitable way.
func (r *RDNS) resolve(ip net.IP) (host string, err error) {
log.Tracef("rdns: resolving host for %q", ip)
arpa := dns.Fqdn(aghnet.ReverseAddr(ip))
msg := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Compress: true,
Question: []dns.Question{{
Name: arpa,
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
}},
}
var resp *dns.Msg
if r.subnetDetector.IsLocallyServedNetwork(ip) {
resp, err = r.localResolvers.Exchange(msg)
} else {
resp, err = r.dnsServer.Exchange(msg)
}
if err != nil {
return "", fmt.Errorf("performing lookup for %q: %w", arpa, err)
}
if len(resp.Answer) == 0 {
return "", fmt.Errorf("lookup for %q: %w", arpa, rDNSEmptyAnswerErr)
}
ptr, ok := resp.Answer[0].(*dns.PTR)
if !ok {
return "", fmt.Errorf("type checking: %w", rDNSNotPTRErr)
}
log.Tracef("rdns: ptr response for %q: %s", ip, ptr.String())
return strings.TrimSuffix(ptr.Ptr, "."), nil
}
</s> add </s> remove LocalResolvers aghnet.Exchanger
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
keep keep keep replace replace replace replace replace keep keep keep replace replace replace replace | <mask> return s.internalProxy.LookupIPAddr(host)
<mask> }
<mask>
<mask> // Exchange - send DNS request to an upstream server and receive response
<mask> // No request/response filtering is performed.
<mask> // Query log and Stats are not updated.
<mask> // This method may be called before Start().
<mask> func (s *Server) Exchange(req *dns.Msg) (*dns.Msg, error) {
<mask> s.RLock()
<mask> defer s.RUnlock()
<mask>
<mask> ctx := &proxy.DNSContext{
<mask> Proto: "udp",
<mask> Req: req,
<mask> StartTime: time.Now(),
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> add // RDNSSettings returns the copy of actual RDNS configuration.
func (s *Server) RDNSSettings() (localPTRResolvers []string, resolveClients bool) {
s.RLock()
defer s.RUnlock()
return aghstrings.CloneSlice(s.conf.LocalPTRResolvers), s.conf.ResolveClients
}
</s> remove err := s.internalProxy.Resolve(ctx)
</s> add </s> remove c.RatelimitWhitelist = stringArrayDup(sc.RatelimitWhitelist)
c.BootstrapDNS = stringArrayDup(sc.BootstrapDNS)
c.AllowedClients = stringArrayDup(sc.AllowedClients)
c.DisallowedClients = stringArrayDup(sc.DisallowedClients)
c.BlockedHosts = stringArrayDup(sc.BlockedHosts)
c.UpstreamDNS = stringArrayDup(sc.UpstreamDNS)
</s> add c.RatelimitWhitelist = aghstrings.CloneSlice(sc.RatelimitWhitelist)
c.BootstrapDNS = aghstrings.CloneSlice(sc.BootstrapDNS)
c.AllowedClients = aghstrings.CloneSlice(sc.AllowedClients)
c.DisallowedClients = aghstrings.CloneSlice(sc.DisallowedClients)
c.BlockedHosts = aghstrings.CloneSlice(sc.BlockedHosts)
c.UpstreamDNS = aghstrings.CloneSlice(sc.UpstreamDNS) </s> remove // ValidateUpstreams validates each upstream and returns an error if any upstream is invalid or if there are no default upstreams specified
</s> add // ValidateUpstreams validates each upstream and returns an error if any
// upstream is invalid or if there are no default upstreams specified.
//
// TODO(e.burkov): Move into aghnet or even into dnsproxy. </s> remove Upstreams []string `json:"upstream_dns"` // Upstreams
BootstrapDNS []string `json:"bootstrap_dns"` // Bootstrap DNS
</s> add Upstreams []string `json:"upstream_dns"`
BootstrapDNS []string `json:"bootstrap_dns"`
PrivateUpstreams []string `json:"private_upstream"` | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
keep keep keep keep replace keep replace keep keep | <mask> Proto: "udp",
<mask> Req: req,
<mask> StartTime: time.Now(),
<mask> }
<mask> err := s.internalProxy.Resolve(ctx)
<mask> if err != nil {
<mask> return nil, err
<mask> }
<mask> return ctx.Res, nil
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove ctx := &proxy.DNSContext{
Proto: "udp",
Req: req,
StartTime: time.Now(),
</s> add if !s.conf.ResolveClients {
return "", nil
}
arpa := dns.Fqdn(aghnet.ReverseAddr(ip))
req := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Compress: true,
Question: []dns.Question{{
Name: arpa,
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
}},
}
var resp *dns.Msg
if s.subnetDetector.IsLocallyServedNetwork(ip) {
resp, err = s.localResolvers.Exchange(req)
} else {
ctx := &proxy.DNSContext{
Proto: "udp",
Req: req,
StartTime: time.Now(),
}
err = s.internalProxy.Resolve(ctx)
resp = ctx.Res </s> remove return ctx.Res, nil
</s> add if len(resp.Answer) == 0 {
return "", fmt.Errorf("lookup for %q: %w", arpa, rDNSEmptyAnswerErr)
}
ptr, ok := resp.Answer[0].(*dns.PTR)
if !ok {
return "", fmt.Errorf("type checking: %w", rDNSNotPTRErr)
}
return strings.TrimSuffix(ptr.Ptr, "."), nil </s> remove setupResolvers()
</s> add </s> remove // No need to check this DNS server
</s> add // No need to check this DNS server. </s> remove for _, host := range req.Upstreams {
err = checkDNS(host, req.BootstrapDNS)
if err != nil {
log.Info("%v", err)
result[host] = err.Error()
} else {
result[host] = "OK"
</s> add if t, ok := reply.Answer[0].(*dns.A); ok {
if !net.IPv4(8, 8, 8, 8).Equal(t.A) {
return fmt.Errorf("wrong response") | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
keep keep keep keep replace keep keep keep keep keep | <mask> err := s.internalProxy.Resolve(ctx)
<mask> if err != nil {
<mask> return nil, err
<mask> }
<mask> return ctx.Res, nil
<mask> }
<mask>
<mask> // Start starts the DNS server.
<mask> func (s *Server) Start() error {
<mask> s.Lock()
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove return nil, err
</s> add return "", err </s> add err = s.setupResolvers(s.conf.LocalPTRResolvers)
if err != nil {
return fmt.Errorf("setting up resolvers: %w", err)
}
</s> remove err := s.internalProxy.Resolve(ctx)
</s> add </s> remove // No need to check this DNS server
</s> add // No need to check this DNS server. </s> remove ctx := &proxy.DNSContext{
Proto: "udp",
Req: req,
StartTime: time.Now(),
</s> add if !s.conf.ResolveClients {
return "", nil
}
arpa := dns.Fqdn(aghnet.ReverseAddr(ip))
req := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Compress: true,
Question: []dns.Question{{
Name: arpa,
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
}},
}
var resp *dns.Msg
if s.subnetDetector.IsLocallyServedNetwork(ip) {
resp, err = s.localResolvers.Exchange(req)
} else {
ctx := &proxy.DNSContext{
Proto: "udp",
Req: req,
StartTime: time.Now(),
}
err = s.internalProxy.Resolve(ctx)
resp = ctx.Res </s> remove const defaultLocalTimeout = 5 * time.Second
// stringsSetSubtract subtracts b from a interpreted as sets.
//
// TODO(e.burkov): Move into our internal package for working with strings.
func stringsSetSubtract(a, b []string) (c []string) {
// unit is an object to be used as value in set.
type unit = struct{}
cSet := make(map[string]unit)
for _, k := range a {
cSet[k] = unit{}
}
for _, k := range b {
delete(cSet, k)
}
c = make([]string, len(cSet))
i := 0
for k := range cSet {
c[i] = k
i++
}
return c
}
// collectAllIfacesAddrs returns the slice of all network interfaces IP
// addresses without port number.
func collectAllIfacesAddrs() (addrs []string, err error) {
var ifaces []net.Interface
ifaces, err = net.Interfaces()
if err != nil {
return nil, fmt.Errorf("getting network interfaces: %w", err)
}
for _, iface := range ifaces {
var ifaceAddrs []net.Addr
ifaceAddrs, err = iface.Addrs()
if err != nil {
return nil, fmt.Errorf("getting addresses for %q: %w", iface.Name, err)
}
for _, addr := range ifaceAddrs {
cidr := addr.String()
var ip net.IP
ip, _, err = net.ParseCIDR(cidr)
if err != nil {
return nil, fmt.Errorf("parsing %q as cidr: %w", cidr, err)
}
addrs = append(addrs, ip.String())
}
}
return addrs, nil
}
// collectDNSIPAddrs returns the slice of IP addresses without port number which
// we are listening on.
func collectDNSIPaddrs() (addrs []string, err error) {
addrs = make([]string, len(config.DNS.BindHosts))
for i, bh := range config.DNS.BindHosts {
if bh.IsUnspecified() {
return collectAllIfacesAddrs()
}
addrs[i] = bh.String()
}
return addrs, nil
}
func setupResolvers() {
// TODO(e.burkov): Enhance when the config will contain local resolvers
// addresses.
sysRes, err := aghnet.NewSystemResolvers(0, nil)
if err != nil {
log.Fatal(err)
}
Context.systemResolvers = sysRes
var ourAddrs []string
ourAddrs, err = collectDNSIPaddrs()
if err != nil {
log.Fatal(err)
}
// TODO(e.burkov): The approach of subtracting sets of strings is not
// 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.
addrs := stringsSetSubtract(sysRes.Get(), ourAddrs)
Context.localResolvers, err = aghnet.NewMultiAddrExchanger(addrs, defaultLocalTimeout)
if err != nil {
log.Fatal(err)
}
}
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
keep keep keep add keep keep keep keep keep keep | <mask>
<mask> // Create the main DNS proxy instance
<mask> // --
<mask> s.dnsProxy = &proxy.Proxy{Config: proxyConfig}
<mask> return nil
<mask> }
<mask>
<mask> // Stop stops the DNS server.
<mask> func (s *Server) Stop() error {
<mask> s.Lock()
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove return ctx.Res, nil
</s> add if len(resp.Answer) == 0 {
return "", fmt.Errorf("lookup for %q: %w", arpa, rDNSEmptyAnswerErr)
}
ptr, ok := resp.Answer[0].(*dns.PTR)
if !ok {
return "", fmt.Errorf("type checking: %w", rDNSNotPTRErr)
}
return strings.TrimSuffix(ptr.Ptr, "."), nil </s> remove return nil, err
</s> add return "", err </s> add // RDNSSettings returns the copy of actual RDNS configuration.
func (s *Server) RDNSSettings() (localPTRResolvers []string, resolveClients bool) {
s.RLock()
defer s.RUnlock()
return aghstrings.CloneSlice(s.conf.LocalPTRResolvers), s.conf.ResolveClients
}
</s> remove // No need to check this DNS server
</s> add // No need to check this DNS server. </s> remove // filterDNSRequest applies the dnsFilter and sets d.Res if the request
// was filtered.
</s> add // filterDNSRequest applies the dnsFilter and sets d.Res if the request was
// filtered. </s> remove // Exchange - send DNS request to an upstream server and receive response
// No request/response filtering is performed.
// Query log and Stats are not updated.
// This method may be called before Start().
func (s *Server) Exchange(req *dns.Msg) (*dns.Msg, error) {
</s> add // RDNSExchanger is a resolver for clients' addresses.
type RDNSExchanger interface {
// Exchange tries to resolve the ip in a suitable way, e.g. either as
// local or as external.
Exchange(ip net.IP) (host string, err error)
}
const (
// rDNSEmptyAnswerErr is returned by Exchange method when the answer
// section of respond is empty.
rDNSEmptyAnswerErr agherr.Error = "the answer section is empty"
// rDNSNotPTRErr is returned by Exchange method when the response is not
// of PTR type.
rDNSNotPTRErr agherr.Error = "the response is not a ptr"
)
// Exchange implements the RDNSExchanger interface for *Server.
func (s *Server) Exchange(ip net.IP) (host string, err error) { | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
keep keep add keep keep keep keep keep keep | <mask> "testing"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghtest"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dhcpd"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsfilter"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/util"
<mask> "github.com/AdguardTeam/dnsproxy/proxy"
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
</s> add </s> add "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add "github.com/AdguardTeam/AdGuardHome/internal/agherr" </s> add "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
"github.com/AdguardTeam/dnsproxy/proxy"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util"
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> var s *Server
<mask> s, err = NewServer(DNSCreateParams{
<mask> DNSFilter: f,
<mask> SubnetDetector: snd,
<mask> LocalResolvers: &aghtest.Exchanger{},
<mask> })
<mask> require.NoError(t, err)
<mask>
<mask> s.conf = forwardConf
<mask>
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> add func loadTestData(t *testing.T, casesFileName string, cases interface{}) {
t.Helper()
var f *os.File
f, err := os.Open(filepath.Join("testdata", casesFileName))
require.NoError(t, err)
t.Cleanup(func() {
require.NoError(t, f.Close())
})
err = json.NewDecoder(f).Decode(cases)
require.NoError(t, err)
}
const jsonExt = ".json"
</s> remove LocalResolvers: Context.localResolvers,
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward_test.go |
keep keep add keep keep keep keep keep keep | <mask> err = s.Prepare(nil)
<mask> require.NoError(t, err)
<mask>
<mask> return s
<mask> }
<mask>
<mask> func createServerTLSConfig(t *testing.T) (*tls.Config, []byte, []byte) {
<mask> t.Helper()
<mask>
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> add func loadTestData(t *testing.T, casesFileName string, cases interface{}) {
t.Helper()
var f *os.File
f, err := os.Open(filepath.Join("testdata", casesFileName))
require.NoError(t, err)
t.Cleanup(func() {
require.NoError(t, f.Close())
})
err = json.NewDecoder(f).Decode(cases)
require.NoError(t, err)
}
const jsonExt = ".json"
</s> remove e, err = NewMultiAddrExchanger([]string{"www.example.com"}, 0)
</s> add e, err = NewMultiAddrExchanger([]string{"www.example.com"}, nil, 0) </s> remove e, err = NewMultiAddrExchanger([]string{}, 0)
</s> add e, err = NewMultiAddrExchanger([]string{}, nil, 0) </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> var s *Server
<mask> s, err = NewServer(DNSCreateParams{
<mask> DNSFilter: dnsfilter.New(&dnsfilter.Config{}, filters),
<mask> SubnetDetector: snd,
<mask> LocalResolvers: &aghtest.Exchanger{},
<mask> })
<mask> require.NoError(t, err)
<mask>
<mask> conf := &ServerConfig{
<mask> UDPListenAddrs: []*net.UDPAddr{{}},
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: Context.localResolvers,
</s> add </s> remove e, err = NewMultiAddrExchanger([]string{}, 0)
</s> add e, err = NewMultiAddrExchanger([]string{}, nil, 0) | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> var s *Server
<mask> s, err = NewServer(DNSCreateParams{
<mask> DNSFilter: f,
<mask> SubnetDetector: snd,
<mask> LocalResolvers: &aghtest.Exchanger{},
<mask> })
<mask> require.NoError(t, err)
<mask>
<mask> assert.NoError(t, s.Prepare(&ServerConfig{
<mask> UDPListenAddrs: []*net.UDPAddr{{}},
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> add func loadTestData(t *testing.T, casesFileName string, cases interface{}) {
t.Helper()
var f *os.File
f, err := os.Open(filepath.Join("testdata", casesFileName))
require.NoError(t, err)
t.Cleanup(func() {
require.NoError(t, f.Close())
})
err = json.NewDecoder(f).Decode(cases)
require.NoError(t, err)
}
const jsonExt = ".json"
</s> remove LocalResolvers: Context.localResolvers,
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> s, err = NewServer(DNSCreateParams{
<mask> DNSFilter: dnsfilter.New(&dnsfilter.Config{}, nil),
<mask> DHCPServer: &testDHCP{},
<mask> SubnetDetector: snd,
<mask> LocalResolvers: &aghtest.Exchanger{},
<mask> })
<mask> require.NoError(t, err)
<mask>
<mask> s.conf.UDPListenAddrs = []*net.UDPAddr{{}}
<mask> s.conf.TCPListenAddrs = []*net.TCPAddr{{}}
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: Context.localResolvers,
</s> add </s> remove e, err = NewMultiAddrExchanger([]string{"www.example.com"}, 0)
</s> add e, err = NewMultiAddrExchanger([]string{"www.example.com"}, nil, 0) | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> var s *Server
<mask> s, err = NewServer(DNSCreateParams{
<mask> DNSFilter: dnsfilter.New(&c, nil),
<mask> SubnetDetector: snd,
<mask> LocalResolvers: &aghtest.Exchanger{},
<mask> })
<mask> require.NoError(t, err)
<mask>
<mask> s.conf.UDPListenAddrs = []*net.UDPAddr{{}}
<mask> s.conf.TCPListenAddrs = []*net.TCPAddr{{}}
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: Context.localResolvers,
</s> add </s> remove e, err = NewMultiAddrExchanger([]string{}, 0)
</s> add e, err = NewMultiAddrExchanger([]string{}, nil, 0) | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward_test.go |
keep keep keep keep replace replace keep keep keep keep keep | <mask>
<mask> return &setts
<mask> }
<mask>
<mask> // filterDNSRequest applies the dnsFilter and sets d.Res if the request
<mask> // was filtered.
<mask> func (s *Server) filterDNSRequest(ctx *dnsContext) (*dnsfilter.Result, error) {
<mask> d := ctx.proxyCtx
<mask> // TODO(e.burkov): Consistently use req instead of d.Req since it is
<mask> // declared.
<mask> req := d.Req
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove res, err := s.dnsFilter.CheckHost(host, d.Req.Question[0].Qtype, ctx.setts)
</s> add res, err := s.dnsFilter.CheckHost(host, req.Question[0].Qtype, ctx.setts) </s> remove // Exchange - send DNS request to an upstream server and receive response
// No request/response filtering is performed.
// Query log and Stats are not updated.
// This method may be called before Start().
func (s *Server) Exchange(req *dns.Msg) (*dns.Msg, error) {
</s> add // RDNSExchanger is a resolver for clients' addresses.
type RDNSExchanger interface {
// Exchange tries to resolve the ip in a suitable way, e.g. either as
// local or as external.
Exchange(ip net.IP) (host string, err error)
}
const (
// rDNSEmptyAnswerErr is returned by Exchange method when the answer
// section of respond is empty.
rDNSEmptyAnswerErr agherr.Error = "the answer section is empty"
// rDNSNotPTRErr is returned by Exchange method when the response is not
// of PTR type.
rDNSNotPTRErr agherr.Error = "the response is not a ptr"
)
// Exchange implements the RDNSExchanger interface for *Server.
func (s *Server) Exchange(ip net.IP) (host string, err error) { </s> remove func (s *Server) handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
req := upstreamJSON{}
err := json.NewDecoder(r.Body).Decode(&req)
</s> add // excFunc is a signature of function to check if upstream exchanges correctly.
type excFunc func(u upstream.Upstream) (err error)
// checkDNSUpstreamExc checks if the DNS upstream exchanges correctly.
func checkDNSUpstreamExc(u upstream.Upstream) (err error) {
req := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Question: []dns.Question{{
Name: "google-public-dns-a.google.com.",
Qtype: dns.TypeA,
Qclass: dns.ClassINET,
}},
}
var reply *dns.Msg
reply, err = u.Exchange(req) </s> add // RDNSSettings returns the copy of actual RDNS configuration.
func (s *Server) RDNSSettings() (localPTRResolvers []string, resolveClients bool) {
s.RLock()
defer s.RUnlock()
return aghstrings.CloneSlice(s.conf.LocalPTRResolvers), s.conf.ResolveClients
}
</s> add err = s.setupResolvers(s.conf.LocalPTRResolvers)
if err != nil {
return fmt.Errorf("setting up resolvers: %w", err)
}
</s> remove const defaultLocalTimeout = 5 * time.Second
// stringsSetSubtract subtracts b from a interpreted as sets.
//
// TODO(e.burkov): Move into our internal package for working with strings.
func stringsSetSubtract(a, b []string) (c []string) {
// unit is an object to be used as value in set.
type unit = struct{}
cSet := make(map[string]unit)
for _, k := range a {
cSet[k] = unit{}
}
for _, k := range b {
delete(cSet, k)
}
c = make([]string, len(cSet))
i := 0
for k := range cSet {
c[i] = k
i++
}
return c
}
// collectAllIfacesAddrs returns the slice of all network interfaces IP
// addresses without port number.
func collectAllIfacesAddrs() (addrs []string, err error) {
var ifaces []net.Interface
ifaces, err = net.Interfaces()
if err != nil {
return nil, fmt.Errorf("getting network interfaces: %w", err)
}
for _, iface := range ifaces {
var ifaceAddrs []net.Addr
ifaceAddrs, err = iface.Addrs()
if err != nil {
return nil, fmt.Errorf("getting addresses for %q: %w", iface.Name, err)
}
for _, addr := range ifaceAddrs {
cidr := addr.String()
var ip net.IP
ip, _, err = net.ParseCIDR(cidr)
if err != nil {
return nil, fmt.Errorf("parsing %q as cidr: %w", cidr, err)
}
addrs = append(addrs, ip.String())
}
}
return addrs, nil
}
// collectDNSIPAddrs returns the slice of IP addresses without port number which
// we are listening on.
func collectDNSIPaddrs() (addrs []string, err error) {
addrs = make([]string, len(config.DNS.BindHosts))
for i, bh := range config.DNS.BindHosts {
if bh.IsUnspecified() {
return collectAllIfacesAddrs()
}
addrs[i] = bh.String()
}
return addrs, nil
}
func setupResolvers() {
// TODO(e.burkov): Enhance when the config will contain local resolvers
// addresses.
sysRes, err := aghnet.NewSystemResolvers(0, nil)
if err != nil {
log.Fatal(err)
}
Context.systemResolvers = sysRes
var ourAddrs []string
ourAddrs, err = collectDNSIPaddrs()
if err != nil {
log.Fatal(err)
}
// TODO(e.burkov): The approach of subtracting sets of strings is not
// 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.
addrs := stringsSetSubtract(sysRes.Get(), ourAddrs)
Context.localResolvers, err = aghnet.NewMultiAddrExchanger(addrs, defaultLocalTimeout)
if err != nil {
log.Fatal(err)
}
}
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/filter.go |
keep keep keep keep replace keep keep keep keep keep | <mask> // TODO(e.burkov): Consistently use req instead of d.Req since it is
<mask> // declared.
<mask> req := d.Req
<mask> host := strings.TrimSuffix(req.Question[0].Name, ".")
<mask> res, err := s.dnsFilter.CheckHost(host, d.Req.Question[0].Qtype, ctx.setts)
<mask> if err != nil {
<mask> // Return immediately if there's an error
<mask> return nil, fmt.Errorf("dnsfilter failed to check host %q: %w", host, err)
<mask> } else if res.IsFiltered {
<mask> log.Tracef("Host %s is filtered, reason - %q, matched rule: %q", host, res.Reason, res.Rules[0].Text)
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove // filterDNSRequest applies the dnsFilter and sets d.Res if the request
// was filtered.
</s> add // filterDNSRequest applies the dnsFilter and sets d.Res if the request was
// filtered. </s> remove // Don't handle any errors since AddHost doesn't return non-nil
// errors for now.
_, _ = r.clients.AddHost(ip.String(), host, ClientSourceRDNS)
</s> add if host != "" {
// Don't handle any errors since AddHost doesn't return non-nil
// errors for now.
_, _ = r.clients.AddHost(ip.String(), host, ClientSourceRDNS)
} </s> remove const (
// rDNSEmptyAnswerErr is returned by RDNS resolve method when the answer
// section of respond is empty.
rDNSEmptyAnswerErr agherr.Error = "the answer section is empty"
// rDNSNotPTRErr is returned by RDNS resolve method when the response is
// not of PTR type.
rDNSNotPTRErr agherr.Error = "the response is not a ptr"
)
// resolve tries to resolve the ip in a suitable way.
func (r *RDNS) resolve(ip net.IP) (host string, err error) {
log.Tracef("rdns: resolving host for %q", ip)
arpa := dns.Fqdn(aghnet.ReverseAddr(ip))
msg := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Compress: true,
Question: []dns.Question{{
Name: arpa,
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
}},
}
var resp *dns.Msg
if r.subnetDetector.IsLocallyServedNetwork(ip) {
resp, err = r.localResolvers.Exchange(msg)
} else {
resp, err = r.dnsServer.Exchange(msg)
}
if err != nil {
return "", fmt.Errorf("performing lookup for %q: %w", arpa, err)
}
if len(resp.Answer) == 0 {
return "", fmt.Errorf("lookup for %q: %w", arpa, rDNSEmptyAnswerErr)
}
ptr, ok := resp.Answer[0].(*dns.PTR)
if !ok {
return "", fmt.Errorf("type checking: %w", rDNSNotPTRErr)
}
log.Tracef("rdns: ptr response for %q: %s", ip, ptr.String())
return strings.TrimSuffix(ptr.Ptr, "."), nil
}
</s> add </s> remove host, err := r.resolve(ip)
</s> add host, err := r.exchanger.Exchange(ip) </s> remove if t, ok := reply.Answer[0].(*dns.A); ok {
if !net.IPv4(8, 8, 8, 8).Equal(t.A) {
return fmt.Errorf("dns server %s returned wrong answer: %v", input, t.A)
</s> add for _, host := range req.PrivateUpstreams {
err = checkDNS(host, bootstraps, checkPrivateUpstreamExc)
if err != nil {
log.Info("%v", err)
// TODO(e.burkov): If passed upstream have already
// written an error above, we rewriting the error for
// it. These cases should be handled properly instead.
result[host] = err.Error()
continue </s> remove // No need to check this DNS server
</s> add // No need to check this DNS server. | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/filter.go |
keep keep keep keep replace replace keep keep keep keep keep | <mask> len(res.IPList) == 0 {
<mask> // Resolve the new canonical name, not the original host
<mask> // name. The original question is readded in
<mask> // processFilteringAfterResponse.
<mask> ctx.origQuestion = d.Req.Question[0]
<mask> d.Req.Question[0].Name = dns.Fqdn(res.CanonName)
<mask> } else if res.Reason == dnsfilter.RewrittenAutoHosts && len(res.ReverseHosts) != 0 {
<mask> resp := s.makeResponse(req)
<mask> for _, h := range res.ReverseHosts {
<mask> hdr := dns.RR_Header{
<mask> Name: req.Question[0].Name,
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove } else if res.Reason == dnsfilter.Rewritten || res.Reason == dnsfilter.RewrittenAutoHosts {
</s> add } else if res.Reason.In(dnsfilter.Rewritten, dnsfilter.RewrittenAutoHosts) { </s> remove // inStr checks if string is in the slice of strings.
func inStr(strs []string, str string) (ok bool) {
for _, s := range strs {
if s == str {
return true
}
}
return false
}
</s> add </s> remove const (
// rDNSEmptyAnswerErr is returned by RDNS resolve method when the answer
// section of respond is empty.
rDNSEmptyAnswerErr agherr.Error = "the answer section is empty"
// rDNSNotPTRErr is returned by RDNS resolve method when the response is
// not of PTR type.
rDNSNotPTRErr agherr.Error = "the response is not a ptr"
)
// resolve tries to resolve the ip in a suitable way.
func (r *RDNS) resolve(ip net.IP) (host string, err error) {
log.Tracef("rdns: resolving host for %q", ip)
arpa := dns.Fqdn(aghnet.ReverseAddr(ip))
msg := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Compress: true,
Question: []dns.Question{{
Name: arpa,
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
}},
}
var resp *dns.Msg
if r.subnetDetector.IsLocallyServedNetwork(ip) {
resp, err = r.localResolvers.Exchange(msg)
} else {
resp, err = r.dnsServer.Exchange(msg)
}
if err != nil {
return "", fmt.Errorf("performing lookup for %q: %w", arpa, err)
}
if len(resp.Answer) == 0 {
return "", fmt.Errorf("lookup for %q: %w", arpa, rDNSEmptyAnswerErr)
}
ptr, ok := resp.Answer[0].(*dns.PTR)
if !ok {
return "", fmt.Errorf("type checking: %w", rDNSNotPTRErr)
}
log.Tracef("rdns: ptr response for %q: %s", ip, ptr.String())
return strings.TrimSuffix(ptr.Ptr, "."), nil
}
</s> add </s> remove // SplitNext - split string by a byte and return the first chunk
// Skip empty chunks
// Whitespace is trimmed
func SplitNext(str *string, splitBy byte) string {
i := strings.IndexByte(*str, splitBy)
s := ""
if i != -1 {
s = (*str)[0:i]
*str = (*str)[i+1:]
k := 0
ch := rune(0)
for k, ch = range *str {
if byte(ch) != splitBy {
break
}
}
*str = (*str)[k:]
} else {
s = *str
*str = ""
}
return strings.TrimSpace(s)
}
</s> add </s> remove if !Context.subnetDetector.IsLocallyServedNetwork(ip) {
</s> add if config.DNS.ResolveClients && !ip.IsLoopback() { </s> remove writeStrings(b, nl, vFmtDepsHdr)
</s> add aghstrings.WriteToBuilder(b, nl, vFmtDepsHdr) | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/filter.go |
keep keep keep keep replace keep keep keep keep keep | <mask> resp.Answer = append(resp.Answer, ptr)
<mask> }
<mask>
<mask> d.Res = resp
<mask> } else if res.Reason == dnsfilter.Rewritten || res.Reason == dnsfilter.RewrittenAutoHosts {
<mask> resp := s.makeResponse(req)
<mask>
<mask> name := host
<mask> if len(res.CanonName) != 0 {
<mask> resp.Answer = append(resp.Answer, s.genAnswerCNAME(req, res.CanonName))
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove ctx.origQuestion = d.Req.Question[0]
d.Req.Question[0].Name = dns.Fqdn(res.CanonName)
</s> add ctx.origQuestion = req.Question[0]
req.Question[0].Name = dns.Fqdn(res.CanonName) </s> remove ln := util.SplitNext(&data, '\n')
</s> add ln := aghstrings.SplitNext(&data, '\n') </s> remove ctx := &proxy.DNSContext{
Proto: "udp",
Req: req,
StartTime: time.Now(),
</s> add if !s.conf.ResolveClients {
return "", nil
}
arpa := dns.Fqdn(aghnet.ReverseAddr(ip))
req := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Compress: true,
Question: []dns.Question{{
Name: arpa,
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
}},
}
var resp *dns.Msg
if s.subnetDetector.IsLocallyServedNetwork(ip) {
resp, err = s.localResolvers.Exchange(req)
} else {
ctx := &proxy.DNSContext{
Proto: "udp",
Req: req,
StartTime: time.Now(),
}
err = s.internalProxy.Resolve(ctx)
resp = ctx.Res </s> remove writeStrings(b, nl, vFmtDepsHdr)
</s> add aghstrings.WriteToBuilder(b, nl, vFmtDepsHdr) </s> remove // inStr checks if string is in the slice of strings.
func inStr(strs []string, str string) (ok bool) {
for _, s := range strs {
if s == str {
return true
}
}
return false
}
</s> add </s> remove writeStrings(b, nl, vFmtMainHdr, nltb, fmtModule(&info.Main))
</s> add aghstrings.WriteToBuilder(b, nl, vFmtMainHdr, nltb, fmtModule(&info.Main)) | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/filter.go |
keep keep keep add keep keep keep keep keep | <mask> "strings"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/agherr"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/dnsproxy/proxy"
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/miekg/dns"
<mask> )
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
"github.com/AdguardTeam/dnsproxy/proxy"
</s> add </s> add "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util"
</s> add </s> add "github.com/miekg/dns" </s> add "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep replace keep keep keep | <mask> Upstreams *[]string `json:"upstream_dns"`
<mask> UpstreamsFile *string `json:"upstream_dns_file"`
<mask> Bootstraps *[]string `json:"bootstrap_dns"`
<mask>
<mask> ProtectionEnabled *bool `json:"protection_enabled"`
<mask> RateLimit *uint32 `json:"ratelimit"`
<mask> BlockingMode *string `json:"blocking_mode"`
<mask> BlockingIPv4 net.IP `json:"blocking_ipv4"`
<mask> BlockingIPv6 net.IP `json:"blocking_ipv6"`
<mask> EDNSCSEnabled *bool `json:"edns_cs_enabled"`
<mask> DNSSECEnabled *bool `json:"dnssec_enabled"`
<mask> DisableIPv6 *bool `json:"disable_ipv6"`
<mask> UpstreamMode *string `json:"upstream_mode"`
<mask> CacheSize *uint32 `json:"cache_size"`
<mask> CacheMinTTL *uint32 `json:"cache_ttl_min"`
<mask> CacheMaxTTL *uint32 `json:"cache_ttl_max"`
<mask> }
<mask>
<mask> func (s *Server) getDNSConfig() dnsConfig {
<mask> s.RLock()
<mask> upstreams := stringArrayDup(s.conf.UpstreamDNS)
<mask> upstreamFile := s.conf.UpstreamDNSFileName
<mask> bootstraps := stringArrayDup(s.conf.BootstrapDNS)
<mask> protectionEnabled := s.conf.ProtectionEnabled
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove bootstraps := stringArrayDup(s.conf.BootstrapDNS)
</s> add bootstraps := aghstrings.CloneSliceOrEmpty(s.conf.BootstrapDNS) </s> remove BlockingIPv4 := s.conf.BlockingIPv4
BlockingIPv6 := s.conf.BlockingIPv6
Ratelimit := s.conf.Ratelimit
EnableEDNSClientSubnet := s.conf.EnableEDNSClientSubnet
EnableDNSSEC := s.conf.EnableDNSSEC
AAAADisabled := s.conf.AAAADisabled
CacheSize := s.conf.CacheSize
CacheMinTTL := s.conf.CacheMinTTL
CacheMaxTTL := s.conf.CacheMaxTTL
</s> add blockingIPv4 := s.conf.BlockingIPv4
blockingIPv6 := s.conf.BlockingIPv6
ratelimit := s.conf.Ratelimit
enableEDNSClientSubnet := s.conf.EnableEDNSClientSubnet
enableDNSSEC := s.conf.EnableDNSSEC
aaaaDisabled := s.conf.AAAADisabled
cacheSize := s.conf.CacheSize
cacheMinTTL := s.conf.CacheMinTTL
cacheMaxTTL := s.conf.CacheMaxTTL
resolveClients := s.conf.ResolveClients
localPTRUpstreams := aghstrings.CloneSliceOrEmpty(s.conf.LocalPTRResolvers) </s> remove Upstreams []string `json:"upstream_dns"` // Upstreams
BootstrapDNS []string `json:"bootstrap_dns"` // Bootstrap DNS
</s> add Upstreams []string `json:"upstream_dns"`
BootstrapDNS []string `json:"bootstrap_dns"`
PrivateUpstreams []string `json:"private_upstream"` </s> add // upstreamJSON is a request body for handleTestUpstreamDNS endpoint. </s> remove // ValidateUpstreams validates each upstream and returns an error if any upstream is invalid or if there are no default upstreams specified
</s> add // ValidateUpstreams validates each upstream and returns an error if any
// upstream is invalid or if there are no default upstreams specified.
//
// TODO(e.burkov): Move into aghnet or even into dnsproxy. | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep keep replace keep keep replace replace replace replace replace replace replace replace replace | <mask> func (s *Server) getDNSConfig() dnsConfig {
<mask> s.RLock()
<mask> upstreams := stringArrayDup(s.conf.UpstreamDNS)
<mask> upstreamFile := s.conf.UpstreamDNSFileName
<mask> bootstraps := stringArrayDup(s.conf.BootstrapDNS)
<mask> protectionEnabled := s.conf.ProtectionEnabled
<mask> blockingMode := s.conf.BlockingMode
<mask> BlockingIPv4 := s.conf.BlockingIPv4
<mask> BlockingIPv6 := s.conf.BlockingIPv6
<mask> Ratelimit := s.conf.Ratelimit
<mask> EnableEDNSClientSubnet := s.conf.EnableEDNSClientSubnet
<mask> EnableDNSSEC := s.conf.EnableDNSSEC
<mask> AAAADisabled := s.conf.AAAADisabled
<mask> CacheSize := s.conf.CacheSize
<mask> CacheMinTTL := s.conf.CacheMinTTL
<mask> CacheMaxTTL := s.conf.CacheMaxTTL
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove upstreams := stringArrayDup(s.conf.UpstreamDNS)
</s> add defer s.RUnlock()
upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> remove ProtectionEnabled *bool `json:"protection_enabled"`
RateLimit *uint32 `json:"ratelimit"`
BlockingMode *string `json:"blocking_mode"`
BlockingIPv4 net.IP `json:"blocking_ipv4"`
BlockingIPv6 net.IP `json:"blocking_ipv6"`
EDNSCSEnabled *bool `json:"edns_cs_enabled"`
DNSSECEnabled *bool `json:"dnssec_enabled"`
DisableIPv6 *bool `json:"disable_ipv6"`
UpstreamMode *string `json:"upstream_mode"`
CacheSize *uint32 `json:"cache_size"`
CacheMinTTL *uint32 `json:"cache_ttl_min"`
CacheMaxTTL *uint32 `json:"cache_ttl_max"`
</s> add ProtectionEnabled *bool `json:"protection_enabled"`
RateLimit *uint32 `json:"ratelimit"`
BlockingMode *string `json:"blocking_mode"`
BlockingIPv4 net.IP `json:"blocking_ipv4"`
BlockingIPv6 net.IP `json:"blocking_ipv6"`
EDNSCSEnabled *bool `json:"edns_cs_enabled"`
DNSSECEnabled *bool `json:"dnssec_enabled"`
DisableIPv6 *bool `json:"disable_ipv6"`
UpstreamMode *string `json:"upstream_mode"`
CacheSize *uint32 `json:"cache_size"`
CacheMinTTL *uint32 `json:"cache_ttl_min"`
CacheMaxTTL *uint32 `json:"cache_ttl_max"`
ResolveClients *bool `json:"resolve_clients"`
LocalPTRUpstreams *[]string `json:"local_ptr_upstreams"` </s> add ResolveClients: &resolveClients,
LocalPTRUpstreams: &localPTRUpstreams, </s> remove httpError(r, w, http.StatusBadRequest, "Failed to read request body: %s", err)
return
</s> add return fmt.Errorf("couldn't communicate with upstream: %w", err) </s> remove ctx := &proxy.DNSContext{
Proto: "udp",
Req: req,
StartTime: time.Now(),
</s> add if !s.conf.ResolveClients {
return "", nil
}
arpa := dns.Fqdn(aghnet.ReverseAddr(ip))
req := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Compress: true,
Question: []dns.Question{{
Name: arpa,
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
}},
}
var resp *dns.Msg
if s.subnetDetector.IsLocallyServedNetwork(ip) {
resp, err = s.localResolvers.Exchange(req)
} else {
ctx := &proxy.DNSContext{
Proto: "udp",
Req: req,
StartTime: time.Now(),
}
err = s.internalProxy.Resolve(ctx)
resp = ctx.Res | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep keep replace keep keep keep keep keep | <mask> upstreamMode = "fastest_addr"
<mask> } else if s.conf.AllServers {
<mask> upstreamMode = "parallel"
<mask> }
<mask> s.RUnlock()
<mask> return dnsConfig{
<mask> Upstreams: &upstreams,
<mask> UpstreamsFile: &upstreamFile,
<mask> Bootstraps: &bootstraps,
<mask> ProtectionEnabled: &protectionEnabled,
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove BlockingIPv4: BlockingIPv4,
BlockingIPv6: BlockingIPv6,
RateLimit: &Ratelimit,
EDNSCSEnabled: &EnableEDNSClientSubnet,
DNSSECEnabled: &EnableDNSSEC,
DisableIPv6: &AAAADisabled,
CacheSize: &CacheSize,
CacheMinTTL: &CacheMinTTL,
CacheMaxTTL: &CacheMaxTTL,
</s> add BlockingIPv4: blockingIPv4,
BlockingIPv6: blockingIPv6,
RateLimit: &ratelimit,
EDNSCSEnabled: &enableEDNSClientSubnet,
DNSSECEnabled: &enableDNSSEC,
DisableIPv6: &aaaaDisabled,
CacheSize: &cacheSize,
CacheMinTTL: &cacheMinTTL,
CacheMaxTTL: &cacheMaxTTL, </s> remove BlockingIPv4 := s.conf.BlockingIPv4
BlockingIPv6 := s.conf.BlockingIPv6
Ratelimit := s.conf.Ratelimit
EnableEDNSClientSubnet := s.conf.EnableEDNSClientSubnet
EnableDNSSEC := s.conf.EnableDNSSEC
AAAADisabled := s.conf.AAAADisabled
CacheSize := s.conf.CacheSize
CacheMinTTL := s.conf.CacheMinTTL
CacheMaxTTL := s.conf.CacheMaxTTL
</s> add blockingIPv4 := s.conf.BlockingIPv4
blockingIPv6 := s.conf.BlockingIPv6
ratelimit := s.conf.Ratelimit
enableEDNSClientSubnet := s.conf.EnableEDNSClientSubnet
enableDNSSEC := s.conf.EnableDNSSEC
aaaaDisabled := s.conf.AAAADisabled
cacheSize := s.conf.CacheSize
cacheMinTTL := s.conf.CacheMinTTL
cacheMaxTTL := s.conf.CacheMaxTTL
resolveClients := s.conf.ResolveClients
localPTRUpstreams := aghstrings.CloneSliceOrEmpty(s.conf.LocalPTRResolvers) </s> add if dc.ResolveClients != nil {
s.conf.ResolveClients = *dc.ResolveClients
}
</s> remove ctx := &proxy.DNSContext{
Proto: "udp",
Req: req,
StartTime: time.Now(),
</s> add if !s.conf.ResolveClients {
return "", nil
}
arpa := dns.Fqdn(aghnet.ReverseAddr(ip))
req := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Compress: true,
Question: []dns.Question{{
Name: arpa,
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
}},
}
var resp *dns.Msg
if s.subnetDetector.IsLocallyServedNetwork(ip) {
resp, err = s.localResolvers.Exchange(req)
} else {
ctx := &proxy.DNSContext{
Proto: "udp",
Req: req,
StartTime: time.Now(),
}
err = s.internalProxy.Resolve(ctx)
resp = ctx.Res </s> remove } else if res.Reason == dnsfilter.Rewritten || res.Reason == dnsfilter.RewrittenAutoHosts {
</s> add } else if res.Reason.In(dnsfilter.Rewritten, dnsfilter.RewrittenAutoHosts) { </s> remove ctx.setts = s.getClientRequestFilteringSettings(ctx)
</s> add if ctx.setts == nil {
ctx.setts = s.getClientRequestFilteringSettings(ctx)
} | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep keep replace replace replace replace replace replace replace replace replace keep keep keep keep keep | <mask> UpstreamsFile: &upstreamFile,
<mask> Bootstraps: &bootstraps,
<mask> ProtectionEnabled: &protectionEnabled,
<mask> BlockingMode: &blockingMode,
<mask> BlockingIPv4: BlockingIPv4,
<mask> BlockingIPv6: BlockingIPv6,
<mask> RateLimit: &Ratelimit,
<mask> EDNSCSEnabled: &EnableEDNSClientSubnet,
<mask> DNSSECEnabled: &EnableDNSSEC,
<mask> DisableIPv6: &AAAADisabled,
<mask> CacheSize: &CacheSize,
<mask> CacheMinTTL: &CacheMinTTL,
<mask> CacheMaxTTL: &CacheMaxTTL,
<mask> UpstreamMode: &upstreamMode,
<mask> }
<mask> }
<mask>
<mask> func (s *Server) handleGetConfig(w http.ResponseWriter, r *http.Request) {
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> add ResolveClients: &resolveClients,
LocalPTRUpstreams: &localPTRUpstreams, </s> remove s.RUnlock()
</s> add </s> remove httpError(r, w, http.StatusBadRequest, "Failed to read request body: %s", err)
return
</s> add return fmt.Errorf("couldn't communicate with upstream: %w", err) </s> remove reply, err := u.Exchange(&req)
</s> add log.Debug("dns %s works OK", input)
return nil
}
func (s *Server) handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
req := &upstreamJSON{}
err := json.NewDecoder(r.Body).Decode(req) </s> remove func (s *Server) handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
req := upstreamJSON{}
err := json.NewDecoder(r.Body).Decode(&req)
</s> add // excFunc is a signature of function to check if upstream exchanges correctly.
type excFunc func(u upstream.Upstream) (err error)
// checkDNSUpstreamExc checks if the DNS upstream exchanges correctly.
func checkDNSUpstreamExc(u upstream.Upstream) (err error) {
req := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Question: []dns.Question{{
Name: "google-public-dns-a.google.com.",
Qtype: dns.TypeA,
Qclass: dns.ClassINET,
}},
}
var reply *dns.Msg
reply, err = u.Exchange(req) </s> add // RDNSSettings returns the copy of actual RDNS configuration.
func (s *Server) RDNSSettings() (localPTRResolvers []string, resolveClients bool) {
s.RLock()
defer s.RUnlock()
return aghstrings.CloneSlice(s.conf.LocalPTRResolvers), s.conf.ResolveClients
}
| https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep add keep keep keep keep keep keep | <mask> CacheMaxTTL: &cacheMaxTTL,
<mask> UpstreamMode: &upstreamMode,
<mask> }
<mask> }
<mask>
<mask> func (s *Server) handleGetConfig(w http.ResponseWriter, r *http.Request) {
<mask> resp := s.getDNSConfig()
<mask>
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove BlockingIPv4: BlockingIPv4,
BlockingIPv6: BlockingIPv6,
RateLimit: &Ratelimit,
EDNSCSEnabled: &EnableEDNSClientSubnet,
DNSSECEnabled: &EnableDNSSEC,
DisableIPv6: &AAAADisabled,
CacheSize: &CacheSize,
CacheMinTTL: &CacheMinTTL,
CacheMaxTTL: &CacheMaxTTL,
</s> add BlockingIPv4: blockingIPv4,
BlockingIPv6: blockingIPv6,
RateLimit: &ratelimit,
EDNSCSEnabled: &enableEDNSClientSubnet,
DNSSECEnabled: &enableDNSSEC,
DisableIPv6: &aaaaDisabled,
CacheSize: &cacheSize,
CacheMinTTL: &cacheMinTTL,
CacheMaxTTL: &cacheMaxTTL, </s> remove httpError(r, w, http.StatusBadRequest, "Failed to read request body: %s", err)
return
</s> add return fmt.Errorf("couldn't communicate with upstream: %w", err) </s> remove reply, err := u.Exchange(&req)
</s> add log.Debug("dns %s works OK", input)
return nil
}
func (s *Server) handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
req := &upstreamJSON{}
err := json.NewDecoder(r.Body).Decode(req) </s> remove func (s *Server) handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
req := upstreamJSON{}
err := json.NewDecoder(r.Body).Decode(&req)
</s> add // excFunc is a signature of function to check if upstream exchanges correctly.
type excFunc func(u upstream.Upstream) (err error)
// checkDNSUpstreamExc checks if the DNS upstream exchanges correctly.
func checkDNSUpstreamExc(u upstream.Upstream) (err error) {
req := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Question: []dns.Question{{
Name: "google-public-dns-a.google.com.",
Qtype: dns.TypeA,
Qclass: dns.ClassINET,
}},
}
var reply *dns.Msg
reply, err = u.Exchange(req) </s> remove ctx := &proxy.DNSContext{
Proto: "udp",
Req: req,
StartTime: time.Now(),
</s> add if !s.conf.ResolveClients {
return "", nil
}
arpa := dns.Fqdn(aghnet.ReverseAddr(ip))
req := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Compress: true,
Question: []dns.Question{{
Name: arpa,
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
}},
}
var resp *dns.Msg
if s.subnetDetector.IsLocallyServedNetwork(ip) {
resp, err = s.localResolvers.Exchange(req)
} else {
ctx := &proxy.DNSContext{
Proto: "udp",
Req: req,
StartTime: time.Now(),
}
err = s.internalProxy.Resolve(ctx)
resp = ctx.Res </s> remove upstreams := stringArrayDup(s.conf.UpstreamDNS)
</s> add defer s.RUnlock()
upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS) | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep add keep keep keep keep keep keep | <mask> s.conf.UpstreamDNS = *dc.Upstreams
<mask> restart = true
<mask> }
<mask>
<mask> if dc.UpstreamsFile != nil {
<mask> s.conf.UpstreamDNSFileName = *dc.UpstreamsFile
<mask> restart = true
<mask> }
<mask>
<mask> if dc.Bootstraps != nil {
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req := dns.Msg{}
req.Id = dns.Id()
req.RecursionDesired = true
req.Question = []dns.Question{
{Name: "google-public-dns-a.google.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET},
</s> add if err = ef(u); err != nil {
return fmt.Errorf("upstream %q fails to exchange: %w", input, err) </s> remove if ct == ctFilteringStatus && !inStr(filteringStatusValues, c.value) {
</s> add if ct == ctFilteringStatus && !aghstrings.InSlice(filteringStatusValues, c.value) { </s> remove setupResolvers()
</s> add </s> remove reply, err := u.Exchange(&req)
</s> add log.Debug("dns %s works OK", input)
return nil
}
func (s *Server) handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
req := &upstreamJSON{}
err := json.NewDecoder(r.Body).Decode(req) </s> remove Context.dnsServer.WriteDiskConfig(&c)
</s> add s.WriteDiskConfig(&c) </s> remove ctx.setts = s.getClientRequestFilteringSettings(ctx)
</s> add if ctx.setts == nil {
ctx.setts = s.getClientRequestFilteringSettings(ctx)
} | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep add keep keep keep keep | <mask> s.conf.AllServers = *dc.UpstreamMode == "parallel"
<mask> s.conf.FastestAddr = *dc.UpstreamMode == "fastest_addr"
<mask> }
<mask>
<mask> return s.setConfigRestartable(dc)
<mask> }
<mask>
<mask> // upstreamJSON is a request body for handleTestUpstreamDNS endpoint.
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> add // upstreamJSON is a request body for handleTestUpstreamDNS endpoint. </s> remove s.RUnlock()
</s> add </s> remove Upstreams []string `json:"upstream_dns"` // Upstreams
BootstrapDNS []string `json:"bootstrap_dns"` // Bootstrap DNS
</s> add Upstreams []string `json:"upstream_dns"`
BootstrapDNS []string `json:"bootstrap_dns"`
PrivateUpstreams []string `json:"private_upstream"` </s> remove // inStr checks if string is in the slice of strings.
func inStr(strs []string, str string) (ok bool) {
for _, s := range strs {
if s == str {
return true
}
}
return false
}
</s> add </s> remove BlockingIPv4 := s.conf.BlockingIPv4
BlockingIPv6 := s.conf.BlockingIPv6
Ratelimit := s.conf.Ratelimit
EnableEDNSClientSubnet := s.conf.EnableEDNSClientSubnet
EnableDNSSEC := s.conf.EnableDNSSEC
AAAADisabled := s.conf.AAAADisabled
CacheSize := s.conf.CacheSize
CacheMinTTL := s.conf.CacheMinTTL
CacheMaxTTL := s.conf.CacheMaxTTL
</s> add blockingIPv4 := s.conf.BlockingIPv4
blockingIPv6 := s.conf.BlockingIPv6
ratelimit := s.conf.Ratelimit
enableEDNSClientSubnet := s.conf.EnableEDNSClientSubnet
enableDNSSEC := s.conf.EnableDNSSEC
aaaaDisabled := s.conf.AAAADisabled
cacheSize := s.conf.CacheSize
cacheMinTTL := s.conf.CacheMinTTL
cacheMaxTTL := s.conf.CacheMaxTTL
resolveClients := s.conf.ResolveClients
localPTRUpstreams := aghstrings.CloneSliceOrEmpty(s.conf.LocalPTRResolvers) </s> remove func (lr *Exchanger) Exchange(req *dns.Msg) (resp *dns.Msg, err error) {
if lr.Ups == nil {
lr.Ups = &TestErrUpstream{}
</s> add func (e *Exchanger) Exchange(req *dns.Msg) (resp *dns.Msg, err error) {
if e.Ups == nil {
e.Ups = &TestErrUpstream{} | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep add keep keep keep keep | <mask>
<mask> return s.setConfigRestartable(dc)
<mask> }
<mask>
<mask> type upstreamJSON struct {
<mask> Upstreams []string `json:"upstream_dns"`
<mask> BootstrapDNS []string `json:"bootstrap_dns"`
<mask> PrivateUpstreams []string `json:"private_upstream"`
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove Upstreams []string `json:"upstream_dns"` // Upstreams
BootstrapDNS []string `json:"bootstrap_dns"` // Bootstrap DNS
</s> add Upstreams []string `json:"upstream_dns"`
BootstrapDNS []string `json:"bootstrap_dns"`
PrivateUpstreams []string `json:"private_upstream"` </s> remove // ValidateUpstreams validates each upstream and returns an error if any upstream is invalid or if there are no default upstreams specified
</s> add // ValidateUpstreams validates each upstream and returns an error if any
// upstream is invalid or if there are no default upstreams specified.
//
// TODO(e.burkov): Move into aghnet or even into dnsproxy. </s> add // ResolveClients enables and disables resolving clients with RDNS.
ResolveClients bool `yaml:"resolve_clients"`
// LocalPTRResolvers is the slice of addresses to be used as upstreams
// for PTR queries for locally-served networks.
LocalPTRResolvers []string `yaml:"local_ptr_upstreams"` </s> remove func stringArrayDup(a []string) []string {
a2 := make([]string, len(a))
copy(a2, a)
return a2
}
</s> add </s> add if dc.ResolveClients != nil {
s.conf.ResolveClients = *dc.ResolveClients
}
</s> add "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep keep replace replace keep keep replace keep keep keep keep | <mask> return s.setConfigRestartable(dc)
<mask> }
<mask>
<mask> type upstreamJSON struct {
<mask> Upstreams []string `json:"upstream_dns"` // Upstreams
<mask> BootstrapDNS []string `json:"bootstrap_dns"` // Bootstrap DNS
<mask> }
<mask>
<mask> // ValidateUpstreams validates each upstream and returns an error if any upstream is invalid or if there are no default upstreams specified
<mask> func ValidateUpstreams(upstreams []string) (err error) {
<mask> // No need to validate comments
<mask> upstreams = filterOutComments(upstreams)
<mask>
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> add // upstreamJSON is a request body for handleTestUpstreamDNS endpoint. </s> remove // No need to check this DNS server
</s> add // No need to check this DNS server. </s> remove func checkDNS(input string, bootstrap []string) error {
</s> add func checkDNS(input string, bootstrap []string, ef excFunc) (err error) { </s> add // ResolveClients signals if the RDNS should resolve clients' addresses.
ResolveClients bool
// LocalPTRResolvers is a slice of addresses to be used as upstreams for
// resolving PTR queries for local addresses.
LocalPTRResolvers []string </s> remove // separate upstream from domains list
input, useDefault, err := separateUpstream(input)
if err != nil {
</s> add // Separate upstream from domains list.
var useDefault bool
if input, useDefault, err = separateUpstream(input); err != nil { | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep keep replace replace replace keep replace replace keep keep | <mask>
<mask> return nil
<mask> }
<mask>
<mask> func (s *Server) handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
<mask> req := upstreamJSON{}
<mask> err := json.NewDecoder(r.Body).Decode(&req)
<mask> if err != nil {
<mask> httpError(r, w, http.StatusBadRequest, "Failed to read request body: %s", err)
<mask> return
<mask> }
<mask>
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove result := map[string]string{}
</s> add if len(reply.Answer) != 1 {
return fmt.Errorf("wrong response")
} </s> remove return fmt.Errorf("couldn't communicate with dns server %s: %w", input, err)
</s> add httpError(r, w, http.StatusBadRequest, "Failed to read request body: %s", err)
return </s> remove w.Header().Set("Content-Type", "application/json")
_, err = w.Write(jsonVal)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Couldn't write body: %s", err)
return
</s> add if _, err = u.Exchange(req); err != nil {
return fmt.Errorf("couldn't communicate with upstream: %w", err) </s> remove reply, err := u.Exchange(&req)
</s> add log.Debug("dns %s works OK", input)
return nil
}
func (s *Server) handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
req := &upstreamJSON{}
err := json.NewDecoder(r.Body).Decode(req) </s> remove log.Debug("dns %s works OK", input)
return nil
</s> add jsonVal, err := json.Marshal(result)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Unable to marshal status json: %s", err)
return
}
w.Header().Set("Content-Type", "application/json")
_, err = w.Write(jsonVal)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Couldn't write body: %s", err)
return
} | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep replace keep replace replace replace replace replace replace replace keep keep keep | <mask> }
<mask>
<mask> result := map[string]string{}
<mask>
<mask> for _, host := range req.Upstreams {
<mask> err = checkDNS(host, req.BootstrapDNS)
<mask> if err != nil {
<mask> log.Info("%v", err)
<mask> result[host] = err.Error()
<mask> } else {
<mask> result[host] = "OK"
<mask> }
<mask> }
<mask>
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove if len(reply.Answer) != 1 {
return fmt.Errorf("dns server %s returned wrong answer", input)
</s> add result := map[string]string{}
bootstraps := req.BootstrapDNS
for _, host := range req.Upstreams {
err = checkDNS(host, bootstraps, checkDNSUpstreamExc)
if err != nil {
log.Info("%v", err)
result[host] = err.Error()
continue
}
result[host] = "OK" </s> add result[host] = "OK" </s> remove if t, ok := reply.Answer[0].(*dns.A); ok {
if !net.IPv4(8, 8, 8, 8).Equal(t.A) {
return fmt.Errorf("dns server %s returned wrong answer: %v", input, t.A)
</s> add for _, host := range req.PrivateUpstreams {
err = checkDNS(host, bootstraps, checkPrivateUpstreamExc)
if err != nil {
log.Info("%v", err)
// TODO(e.burkov): If passed upstream have already
// written an error above, we rewriting the error for
// it. These cases should be handled properly instead.
result[host] = err.Error()
continue </s> remove httpError(r, w, http.StatusBadRequest, "Failed to read request body: %s", err)
return
</s> add return fmt.Errorf("couldn't communicate with upstream: %w", err) </s> remove jsonVal, err := json.Marshal(result)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Unable to marshal status json: %s", err)
return
</s> add return nil
}
// checkPrivateUpstreamExc checks if the upstream for resolving private
// addresses exchanges correctly.
func checkPrivateUpstreamExc(u upstream.Upstream) (err error) {
req := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Question: []dns.Question{{
Name: "1.0.0.127.in-addr.arpa.",
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
}}, | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep replace replace replace replace keep keep replace replace replace replace replace keep keep keep | <mask> }
<mask>
<mask> jsonVal, err := json.Marshal(result)
<mask> if err != nil {
<mask> httpError(r, w, http.StatusInternalServerError, "Unable to marshal status json: %s", err)
<mask> return
<mask> }
<mask>
<mask> w.Header().Set("Content-Type", "application/json")
<mask> _, err = w.Write(jsonVal)
<mask> if err != nil {
<mask> httpError(r, w, http.StatusInternalServerError, "Couldn't write body: %s", err)
<mask> return
<mask> }
<mask> }
<mask>
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove log.Debug("dns %s works OK", input)
return nil
</s> add jsonVal, err := json.Marshal(result)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Unable to marshal status json: %s", err)
return
}
w.Header().Set("Content-Type", "application/json")
_, err = w.Write(jsonVal)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Couldn't write body: %s", err)
return
} </s> add result[host] = "OK" </s> remove result := map[string]string{}
</s> add if len(reply.Answer) != 1 {
return fmt.Errorf("wrong response")
} </s> remove httpError(r, w, http.StatusBadRequest, "Failed to read request body: %s", err)
return
</s> add return fmt.Errorf("couldn't communicate with upstream: %w", err) </s> remove return fmt.Errorf("couldn't communicate with dns server %s: %w", input, err)
</s> add httpError(r, w, http.StatusBadRequest, "Failed to read request body: %s", err)
return | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep add keep keep keep keep | <mask>
<mask> if _, err = u.Exchange(req); err != nil {
<mask> return fmt.Errorf("couldn't communicate with upstream: %w", err)
<mask> }
<mask> }
<mask>
<mask> func checkDNS(input string, bootstrap []string, ef excFunc) (err error) {
<mask> if !isUpstream(input) {
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove func checkDNS(input string, bootstrap []string) error {
</s> add func checkDNS(input string, bootstrap []string, ef excFunc) (err error) { </s> remove w.Header().Set("Content-Type", "application/json")
_, err = w.Write(jsonVal)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Couldn't write body: %s", err)
return
</s> add if _, err = u.Exchange(req); err != nil {
return fmt.Errorf("couldn't communicate with upstream: %w", err) </s> remove httpError(r, w, http.StatusBadRequest, "Failed to read request body: %s", err)
return
</s> add return fmt.Errorf("couldn't communicate with upstream: %w", err) </s> remove req := dns.Msg{}
req.Id = dns.Id()
req.RecursionDesired = true
req.Question = []dns.Question{
{Name: "google-public-dns-a.google.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET},
</s> add if err = ef(u); err != nil {
return fmt.Errorf("upstream %q fails to exchange: %w", input, err) </s> remove return fmt.Errorf("couldn't communicate with dns server %s: %w", input, err)
</s> add httpError(r, w, http.StatusBadRequest, "Failed to read request body: %s", err)
return </s> remove if len(reply.Answer) != 1 {
return fmt.Errorf("dns server %s returned wrong answer", input)
</s> add result := map[string]string{}
bootstraps := req.BootstrapDNS
for _, host := range req.Upstreams {
err = checkDNS(host, bootstraps, checkDNSUpstreamExc)
if err != nil {
log.Info("%v", err)
result[host] = err.Error()
continue
}
result[host] = "OK" | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep replace keep keep keep keep replace replace replace keep keep keep keep | <mask> }
<mask> }
<mask>
<mask> func checkDNS(input string, bootstrap []string) error {
<mask> if !isUpstream(input) {
<mask> return nil
<mask> }
<mask>
<mask> // separate upstream from domains list
<mask> input, useDefault, err := separateUpstream(input)
<mask> if err != nil {
<mask> return fmt.Errorf("wrong upstream format: %w", err)
<mask> }
<mask>
<mask> // No need to check this DNS server
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove // No need to check this DNS server
</s> add // No need to check this DNS server. </s> remove w.Header().Set("Content-Type", "application/json")
_, err = w.Write(jsonVal)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Couldn't write body: %s", err)
return
</s> add if _, err = u.Exchange(req); err != nil {
return fmt.Errorf("couldn't communicate with upstream: %w", err) </s> add return nil </s> remove req := dns.Msg{}
req.Id = dns.Id()
req.RecursionDesired = true
req.Question = []dns.Question{
{Name: "google-public-dns-a.google.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET},
</s> add if err = ef(u); err != nil {
return fmt.Errorf("upstream %q fails to exchange: %w", input, err) </s> remove Upstreams []string `json:"upstream_dns"` // Upstreams
BootstrapDNS []string `json:"bootstrap_dns"` // Bootstrap DNS
</s> add Upstreams []string `json:"upstream_dns"`
BootstrapDNS []string `json:"bootstrap_dns"`
PrivateUpstreams []string `json:"private_upstream"` | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep keep replace keep keep keep keep keep | <mask> if err != nil {
<mask> return fmt.Errorf("wrong upstream format: %w", err)
<mask> }
<mask>
<mask> // No need to check this DNS server
<mask> if !useDefault {
<mask> return nil
<mask> }
<mask>
<mask> if _, err = validateUpstream(input); err != nil {
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove // separate upstream from domains list
input, useDefault, err := separateUpstream(input)
if err != nil {
</s> add // Separate upstream from domains list.
var useDefault bool
if input, useDefault, err = separateUpstream(input); err != nil { </s> remove req := dns.Msg{}
req.Id = dns.Id()
req.RecursionDesired = true
req.Question = []dns.Question{
{Name: "google-public-dns-a.google.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET},
</s> add if err = ef(u); err != nil {
return fmt.Errorf("upstream %q fails to exchange: %w", input, err) </s> remove w.Header().Set("Content-Type", "application/json")
_, err = w.Write(jsonVal)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Couldn't write body: %s", err)
return
</s> add if _, err = u.Exchange(req); err != nil {
return fmt.Errorf("couldn't communicate with upstream: %w", err) </s> remove result := map[string]string{}
</s> add if len(reply.Answer) != 1 {
return fmt.Errorf("wrong response")
} </s> add return nil </s> remove for _, host := range req.Upstreams {
err = checkDNS(host, req.BootstrapDNS)
if err != nil {
log.Info("%v", err)
result[host] = err.Error()
} else {
result[host] = "OK"
</s> add if t, ok := reply.Answer[0].(*dns.A); ok {
if !net.IPv4(8, 8, 8, 8).Equal(t.A) {
return fmt.Errorf("wrong response") | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep keep replace replace keep keep keep keep keep | <mask> if len(bootstrap) == 0 {
<mask> bootstrap = defaultBootstrap
<mask> }
<mask>
<mask> log.Debug("checking if dns %s works...", input)
<mask> u, err := upstream.AddressToUpstream(input, upstream.Options{Bootstrap: bootstrap, Timeout: DefaultTimeout})
<mask> if err != nil {
<mask> return fmt.Errorf("failed to choose upstream for %s: %w", input, err)
<mask> }
<mask>
<mask> req := dns.Msg{}
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove return fmt.Errorf("failed to choose upstream for %s: %w", input, err)
</s> add return fmt.Errorf("failed to choose upstream for %q: %w", input, err) </s> remove req := dns.Msg{}
req.Id = dns.Id()
req.RecursionDesired = true
req.Question = []dns.Question{
{Name: "google-public-dns-a.google.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET},
</s> add if err = ef(u); err != nil {
return fmt.Errorf("upstream %q fails to exchange: %w", input, err) </s> remove reply, err := u.Exchange(&req)
</s> add log.Debug("dns %s works OK", input)
return nil
}
func (s *Server) handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
req := &upstreamJSON{}
err := json.NewDecoder(r.Body).Decode(req) </s> remove return fmt.Errorf("couldn't communicate with dns server %s: %w", input, err)
</s> add httpError(r, w, http.StatusBadRequest, "Failed to read request body: %s", err)
return </s> remove if len(reply.Answer) != 1 {
return fmt.Errorf("dns server %s returned wrong answer", input)
</s> add result := map[string]string{}
bootstraps := req.BootstrapDNS
for _, host := range req.Upstreams {
err = checkDNS(host, bootstraps, checkDNSUpstreamExc)
if err != nil {
log.Info("%v", err)
result[host] = err.Error()
continue
}
result[host] = "OK" </s> remove // separate upstream from domains list
input, useDefault, err := separateUpstream(input)
if err != nil {
</s> add // Separate upstream from domains list.
var useDefault bool
if input, useDefault, err = separateUpstream(input); err != nil { | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep replace keep keep replace replace replace replace replace keep keep keep keep | <mask> u, err := upstream.AddressToUpstream(input, upstream.Options{Bootstrap: bootstrap, Timeout: DefaultTimeout})
<mask> if err != nil {
<mask> return fmt.Errorf("failed to choose upstream for %s: %w", input, err)
<mask> }
<mask>
<mask> req := dns.Msg{}
<mask> req.Id = dns.Id()
<mask> req.RecursionDesired = true
<mask> req.Question = []dns.Question{
<mask> {Name: "google-public-dns-a.google.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET},
<mask> }
<mask> reply, err := u.Exchange(&req)
<mask> if err != nil {
<mask> return fmt.Errorf("couldn't communicate with dns server %s: %w", input, err)
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove reply, err := u.Exchange(&req)
</s> add log.Debug("dns %s works OK", input)
return nil
}
func (s *Server) handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
req := &upstreamJSON{}
err := json.NewDecoder(r.Body).Decode(req) </s> remove log.Debug("checking if dns %s works...", input)
u, err := upstream.AddressToUpstream(input, upstream.Options{Bootstrap: bootstrap, Timeout: DefaultTimeout})
</s> add log.Debug("checking if dns server %q works...", input)
var u upstream.Upstream
u, err = upstream.AddressToUpstream(input, upstream.Options{
Bootstrap: bootstrap,
Timeout: DefaultTimeout,
}) </s> remove return fmt.Errorf("couldn't communicate with dns server %s: %w", input, err)
</s> add httpError(r, w, http.StatusBadRequest, "Failed to read request body: %s", err)
return </s> remove if len(reply.Answer) != 1 {
return fmt.Errorf("dns server %s returned wrong answer", input)
</s> add result := map[string]string{}
bootstraps := req.BootstrapDNS
for _, host := range req.Upstreams {
err = checkDNS(host, bootstraps, checkDNSUpstreamExc)
if err != nil {
log.Info("%v", err)
result[host] = err.Error()
continue
}
result[host] = "OK" </s> remove // separate upstream from domains list
input, useDefault, err := separateUpstream(input)
if err != nil {
</s> add // Separate upstream from domains list.
var useDefault bool
if input, useDefault, err = separateUpstream(input); err != nil { | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep keep replace keep replace keep keep keep | <mask> req.RecursionDesired = true
<mask> req.Question = []dns.Question{
<mask> {Name: "google-public-dns-a.google.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET},
<mask> }
<mask> reply, err := u.Exchange(&req)
<mask> if err != nil {
<mask> return fmt.Errorf("couldn't communicate with dns server %s: %w", input, err)
<mask> }
<mask> if len(reply.Answer) != 1 {
<mask> return fmt.Errorf("dns server %s returned wrong answer", input)
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req := dns.Msg{}
req.Id = dns.Id()
req.RecursionDesired = true
req.Question = []dns.Question{
{Name: "google-public-dns-a.google.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET},
</s> add if err = ef(u); err != nil {
return fmt.Errorf("upstream %q fails to exchange: %w", input, err) </s> remove if len(reply.Answer) != 1 {
return fmt.Errorf("dns server %s returned wrong answer", input)
</s> add result := map[string]string{}
bootstraps := req.BootstrapDNS
for _, host := range req.Upstreams {
err = checkDNS(host, bootstraps, checkDNSUpstreamExc)
if err != nil {
log.Info("%v", err)
result[host] = err.Error()
continue
}
result[host] = "OK" </s> remove if t, ok := reply.Answer[0].(*dns.A); ok {
if !net.IPv4(8, 8, 8, 8).Equal(t.A) {
return fmt.Errorf("dns server %s returned wrong answer: %v", input, t.A)
</s> add for _, host := range req.PrivateUpstreams {
err = checkDNS(host, bootstraps, checkPrivateUpstreamExc)
if err != nil {
log.Info("%v", err)
// TODO(e.burkov): If passed upstream have already
// written an error above, we rewriting the error for
// it. These cases should be handled properly instead.
result[host] = err.Error()
continue </s> remove return fmt.Errorf("failed to choose upstream for %s: %w", input, err)
</s> add return fmt.Errorf("failed to choose upstream for %q: %w", input, err) </s> remove log.Debug("dns %s works OK", input)
return nil
</s> add jsonVal, err := json.Marshal(result)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Unable to marshal status json: %s", err)
return
}
w.Header().Set("Content-Type", "application/json")
_, err = w.Write(jsonVal)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Couldn't write body: %s", err)
return
} | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep keep replace replace keep keep keep keep keep | <mask> reply, err := u.Exchange(&req)
<mask> if err != nil {
<mask> return fmt.Errorf("couldn't communicate with dns server %s: %w", input, err)
<mask> }
<mask> if len(reply.Answer) != 1 {
<mask> return fmt.Errorf("dns server %s returned wrong answer", input)
<mask> }
<mask> if t, ok := reply.Answer[0].(*dns.A); ok {
<mask> if !net.IPv4(8, 8, 8, 8).Equal(t.A) {
<mask> return fmt.Errorf("dns server %s returned wrong answer: %v", input, t.A)
<mask> }
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove return fmt.Errorf("couldn't communicate with dns server %s: %w", input, err)
</s> add httpError(r, w, http.StatusBadRequest, "Failed to read request body: %s", err)
return </s> remove if t, ok := reply.Answer[0].(*dns.A); ok {
if !net.IPv4(8, 8, 8, 8).Equal(t.A) {
return fmt.Errorf("dns server %s returned wrong answer: %v", input, t.A)
</s> add for _, host := range req.PrivateUpstreams {
err = checkDNS(host, bootstraps, checkPrivateUpstreamExc)
if err != nil {
log.Info("%v", err)
// TODO(e.burkov): If passed upstream have already
// written an error above, we rewriting the error for
// it. These cases should be handled properly instead.
result[host] = err.Error()
continue </s> remove reply, err := u.Exchange(&req)
</s> add log.Debug("dns %s works OK", input)
return nil
}
func (s *Server) handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
req := &upstreamJSON{}
err := json.NewDecoder(r.Body).Decode(req) </s> remove log.Debug("dns %s works OK", input)
return nil
</s> add jsonVal, err := json.Marshal(result)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Unable to marshal status json: %s", err)
return
}
w.Header().Set("Content-Type", "application/json")
_, err = w.Write(jsonVal)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Couldn't write body: %s", err)
return
} </s> remove req := dns.Msg{}
req.Id = dns.Id()
req.RecursionDesired = true
req.Question = []dns.Question{
{Name: "google-public-dns-a.google.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET},
</s> add if err = ef(u); err != nil {
return fmt.Errorf("upstream %q fails to exchange: %w", input, err) </s> remove for _, host := range req.Upstreams {
err = checkDNS(host, req.BootstrapDNS)
if err != nil {
log.Info("%v", err)
result[host] = err.Error()
} else {
result[host] = "OK"
</s> add if t, ok := reply.Answer[0].(*dns.A); ok {
if !net.IPv4(8, 8, 8, 8).Equal(t.A) {
return fmt.Errorf("wrong response") | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep keep replace replace replace keep keep keep keep keep | <mask> }
<mask> if len(reply.Answer) != 1 {
<mask> return fmt.Errorf("dns server %s returned wrong answer", input)
<mask> }
<mask> if t, ok := reply.Answer[0].(*dns.A); ok {
<mask> if !net.IPv4(8, 8, 8, 8).Equal(t.A) {
<mask> return fmt.Errorf("dns server %s returned wrong answer: %v", input, t.A)
<mask> }
<mask> }
<mask>
<mask> log.Debug("dns %s works OK", input)
<mask> return nil
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove if len(reply.Answer) != 1 {
return fmt.Errorf("dns server %s returned wrong answer", input)
</s> add result := map[string]string{}
bootstraps := req.BootstrapDNS
for _, host := range req.Upstreams {
err = checkDNS(host, bootstraps, checkDNSUpstreamExc)
if err != nil {
log.Info("%v", err)
result[host] = err.Error()
continue
}
result[host] = "OK" </s> remove return fmt.Errorf("couldn't communicate with dns server %s: %w", input, err)
</s> add httpError(r, w, http.StatusBadRequest, "Failed to read request body: %s", err)
return </s> remove reply, err := u.Exchange(&req)
</s> add log.Debug("dns %s works OK", input)
return nil
}
func (s *Server) handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
req := &upstreamJSON{}
err := json.NewDecoder(r.Body).Decode(req) </s> remove log.Debug("dns %s works OK", input)
return nil
</s> add jsonVal, err := json.Marshal(result)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Unable to marshal status json: %s", err)
return
}
w.Header().Set("Content-Type", "application/json")
_, err = w.Write(jsonVal)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Couldn't write body: %s", err)
return
} </s> remove for _, host := range req.Upstreams {
err = checkDNS(host, req.BootstrapDNS)
if err != nil {
log.Info("%v", err)
result[host] = err.Error()
} else {
result[host] = "OK"
</s> add if t, ok := reply.Answer[0].(*dns.A); ok {
if !net.IPv4(8, 8, 8, 8).Equal(t.A) {
return fmt.Errorf("wrong response") </s> remove log.Debug("checking if dns %s works...", input)
u, err := upstream.AddressToUpstream(input, upstream.Options{Bootstrap: bootstrap, Timeout: DefaultTimeout})
</s> add log.Debug("checking if dns server %q works...", input)
var u upstream.Upstream
u, err = upstream.AddressToUpstream(input, upstream.Options{
Bootstrap: bootstrap,
Timeout: DefaultTimeout,
}) | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep add keep keep keep keep keep keep | <mask> result[host] = err.Error()
<mask>
<mask> continue
<mask> }
<mask> }
<mask>
<mask> jsonVal, err := json.Marshal(result)
<mask> if err != nil {
<mask> httpError(r, w, http.StatusInternalServerError, "Unable to marshal status json: %s", err)
<mask>
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove log.Debug("dns %s works OK", input)
return nil
</s> add jsonVal, err := json.Marshal(result)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Unable to marshal status json: %s", err)
return
}
w.Header().Set("Content-Type", "application/json")
_, err = w.Write(jsonVal)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Couldn't write body: %s", err)
return
} </s> remove w.Header().Set("Content-Type", "application/json")
_, err = w.Write(jsonVal)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Couldn't write body: %s", err)
return
</s> add if _, err = u.Exchange(req); err != nil {
return fmt.Errorf("couldn't communicate with upstream: %w", err) </s> remove jsonVal, err := json.Marshal(result)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Unable to marshal status json: %s", err)
return
</s> add return nil
}
// checkPrivateUpstreamExc checks if the upstream for resolving private
// addresses exchanges correctly.
func checkPrivateUpstreamExc(u upstream.Upstream) (err error) {
req := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Question: []dns.Question{{
Name: "1.0.0.127.in-addr.arpa.",
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
}}, </s> remove for _, host := range req.Upstreams {
err = checkDNS(host, req.BootstrapDNS)
if err != nil {
log.Info("%v", err)
result[host] = err.Error()
} else {
result[host] = "OK"
</s> add if t, ok := reply.Answer[0].(*dns.A); ok {
if !net.IPv4(8, 8, 8, 8).Equal(t.A) {
return fmt.Errorf("wrong response") </s> remove result := map[string]string{}
</s> add if len(reply.Answer) != 1 {
return fmt.Errorf("wrong response")
} </s> remove if len(reply.Answer) != 1 {
return fmt.Errorf("dns server %s returned wrong answer", input)
</s> add result := map[string]string{}
bootstraps := req.BootstrapDNS
for _, host := range req.Upstreams {
err = checkDNS(host, bootstraps, checkDNSUpstreamExc)
if err != nil {
log.Info("%v", err)
result[host] = err.Error()
continue
}
result[host] = "OK" | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep keep keep replace replace keep keep keep keep keep | <mask> return fmt.Errorf("dns server %s returned wrong answer: %v", input, t.A)
<mask> }
<mask> }
<mask>
<mask> log.Debug("dns %s works OK", input)
<mask> return nil
<mask> }
<mask>
<mask> // Control flow:
<mask> // web
<mask> // -> dnsforward.handleDOH -> dnsforward.ServeHTTP
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove if t, ok := reply.Answer[0].(*dns.A); ok {
if !net.IPv4(8, 8, 8, 8).Equal(t.A) {
return fmt.Errorf("dns server %s returned wrong answer: %v", input, t.A)
</s> add for _, host := range req.PrivateUpstreams {
err = checkDNS(host, bootstraps, checkPrivateUpstreamExc)
if err != nil {
log.Info("%v", err)
// TODO(e.burkov): If passed upstream have already
// written an error above, we rewriting the error for
// it. These cases should be handled properly instead.
result[host] = err.Error()
continue </s> remove reply, err := u.Exchange(&req)
</s> add log.Debug("dns %s works OK", input)
return nil
}
func (s *Server) handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
req := &upstreamJSON{}
err := json.NewDecoder(r.Body).Decode(req) </s> remove if len(reply.Answer) != 1 {
return fmt.Errorf("dns server %s returned wrong answer", input)
</s> add result := map[string]string{}
bootstraps := req.BootstrapDNS
for _, host := range req.Upstreams {
err = checkDNS(host, bootstraps, checkDNSUpstreamExc)
if err != nil {
log.Info("%v", err)
result[host] = err.Error()
continue
}
result[host] = "OK" </s> remove return fmt.Errorf("couldn't communicate with dns server %s: %w", input, err)
</s> add httpError(r, w, http.StatusBadRequest, "Failed to read request body: %s", err)
return </s> remove log.Debug("checking if dns %s works...", input)
u, err := upstream.AddressToUpstream(input, upstream.Options{Bootstrap: bootstrap, Timeout: DefaultTimeout})
</s> add log.Debug("checking if dns server %q works...", input)
var u upstream.Upstream
u, err = upstream.AddressToUpstream(input, upstream.Options{
Bootstrap: bootstrap,
Timeout: DefaultTimeout,
}) </s> remove return fmt.Errorf("failed to choose upstream for %s: %w", input, err)
</s> add return fmt.Errorf("failed to choose upstream for %q: %w", input, err) | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
keep keep add keep keep keep keep keep | <mask> package dnsforward
<mask>
<mask> import (
<mask> "io/ioutil"
<mask> "net"
<mask> "net/http"
<mask> "net/http/httptest"
<mask> "os"
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove "strings"
</s> add "os"
"path/filepath" </s> remove "fmt"
</s> add </s> remove "strings"
</s> add </s> add "strings" </s> remove import { renderRadioField, renderTextareaField } from '../../../../helpers/form';
</s> add import { renderRadioField, renderTextareaField, CheckboxField } from '../../../../helpers/form'; </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util"
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> "io/ioutil"
<mask> "net"
<mask> "net/http"
<mask> "net/http/httptest"
<mask> "strings"
<mask> "testing"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsfilter"
<mask> "github.com/stretchr/testify/assert"
<mask> "github.com/stretchr/testify/require"
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> add "bytes"
"encoding/json" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
"github.com/AdguardTeam/dnsproxy/proxy"
</s> add </s> add "github.com/AdguardTeam/AdGuardHome/internal/agherr" </s> remove "github.com/stretchr/testify/require"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util"
</s> add </s> remove "fmt"
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep add keep keep keep keep keep | <mask> )
<mask>
<mask> func TestDNSForwardHTTTP_handleGetConfig(t *testing.T) {
<mask> filterConf := &dnsfilter.Config{
<mask> SafeBrowsingEnabled: true,
<mask> SafeBrowsingCacheSize: 1000,
<mask> SafeSearchEnabled: true,
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> add "github.com/miekg/dns" </s> remove dnsServer: dnsServer,
clients: clients,
subnetDetector: snd,
localResolvers: lr,
</s> add exchanger: exchanger,
clients: clients, </s> remove "github.com/stretchr/testify/require"
</s> add </s> add ResolveClients: true, </s> remove ctx := &proxy.DNSContext{
Proto: "udp",
Req: req,
StartTime: time.Now(),
</s> add if !s.conf.ResolveClients {
return "", nil
}
arpa := dns.Fqdn(aghnet.ReverseAddr(ip))
req := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Compress: true,
Question: []dns.Question{{
Name: arpa,
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
}},
}
var resp *dns.Msg
if s.subnetDetector.IsLocallyServedNetwork(ip) {
resp, err = s.localResolvers.Exchange(req)
} else {
ctx := &proxy.DNSContext{
Proto: "udp",
Req: req,
StartTime: time.Now(),
}
err = s.internalProxy.Resolve(ctx)
resp = ctx.Res </s> remove RulesText: buf.String(),
</s> add RulesText: b.String(), | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep replace keep replace keep keep | <mask>
<mask> testCases := []struct {
<mask> name string
<mask> conf func() ServerConfig
<mask> want string
<mask> }{{
<mask> name: "all_right",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove name: "all_right",
</s> add </s> remove req string
</s> add </s> remove wantGet string
</s> add </s> add ups upstream.Upstream </s> remove want: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add name: "all_right", | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep replace keep keep keep replace | <mask> conf func() ServerConfig
<mask> want string
<mask> }{{
<mask> name: "all_right",
<mask> conf: func() ServerConfig {
<mask> return defaultConf
<mask> },
<mask> want: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove want string
</s> add name string </s> remove name string
</s> add </s> remove name: "fastest_addr",
</s> add </s> remove name: "parallel",
</s> add </s> remove want: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"fastest_addr\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add name: "fastest_addr", | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> return defaultConf
<mask> },
<mask> want: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "fastest_addr",
<mask> conf: func() ServerConfig {
<mask> conf := defaultConf
<mask> conf.FastestAddr = true
<mask>
<mask> return conf
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove want: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add name: "all_right", </s> remove want: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"fastest_addr\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add name: "fastest_addr", </s> remove name: "parallel",
</s> add </s> remove name: "all_right",
</s> add </s> remove want string
</s> add name string </s> remove name string
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep replace keep replace keep | <mask>
<mask> return conf
<mask> },
<mask> want: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"fastest_addr\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "parallel",
<mask> conf: func() ServerConfig {
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove want: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add name: "all_right", </s> remove name: "all_right",
</s> add </s> remove name: "fastest_addr",
</s> add </s> remove want string
</s> add name string </s> remove name string
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> conf.AllServers = true
<mask>
<mask> return conf
<mask> },
<mask> want: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"parallel\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }}
<mask>
<mask> for _, tc := range testCases {
<mask> t.Run(tc.name, func(t *testing.T) {
<mask> t.Cleanup(w.Body.Reset)
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> add var data map[string]json.RawMessage
loadTestData(t, t.Name()+jsonExt, &data)
</s> add caseWant, ok := data[tc.name]
require.True(t, ok)
</s> remove wantGet: defaultConfJSON,
</s> add }, {
name: "local_ptr_upstreams_good",
wantSet: "",
}, {
name: "local_ptr_upstreams_null",
wantSet: "", </s> add var data map[string]struct {
Req json.RawMessage `json:"req"`
Want json.RawMessage `json:"want"`
}
loadTestData(t, t.Name()+jsonExt, &data)
</s> remove name: "parallel",
</s> add </s> remove want: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"fastest_addr\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add name: "fastest_addr", | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep add keep keep keep keep keep | <mask> },
<mask> name: "parallel",
<mask> }}
<mask>
<mask> for _, tc := range testCases {
<mask> caseWant, ok := data[tc.name]
<mask> require.True(t, ok)
<mask>
<mask> t.Run(tc.name, func(t *testing.T) {
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> add caseWant, ok := data[tc.name]
require.True(t, ok)
</s> add var data map[string]struct {
Req json.RawMessage `json:"req"`
Want json.RawMessage `json:"want"`
}
loadTestData(t, t.Name()+jsonExt, &data)
</s> add caseData, ok := data[tc.name]
require.True(t, ok)
</s> remove want: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"parallel\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add name: "parallel", </s> remove wantGet: defaultConfJSON,
</s> add }, {
name: "local_ptr_upstreams_good",
wantSet: "",
}, {
name: "local_ptr_upstreams_null",
wantSet: "", </s> remove for _, tc := range testCases {
rdns := NewRDNS(dns, cc, snd, &aghtest.Exchanger{
Ups: tc.locUpstream,
})
</s> add resp, err := e.Exchanger.Exchange(req)
if err != nil {
return "", err
} | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep add keep keep keep keep keep | <mask> var data map[string]json.RawMessage
<mask> loadTestData(t, t.Name()+jsonExt, &data)
<mask>
<mask> for _, tc := range testCases {
<mask> t.Run(tc.name, func(t *testing.T) {
<mask> t.Cleanup(w.Body.Reset)
<mask>
<mask> s.conf = tc.conf()
<mask> s.handleGetConfig(w, nil)
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> add var data map[string]json.RawMessage
loadTestData(t, t.Name()+jsonExt, &data)
</s> add caseData, ok := data[tc.name]
require.True(t, ok)
</s> add var data map[string]struct {
Req json.RawMessage `json:"req"`
Want json.RawMessage `json:"want"`
}
loadTestData(t, t.Name()+jsonExt, &data)
</s> remove want: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"parallel\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add name: "parallel", </s> remove assert.Equal(t, tc.want, w.Body.String())
</s> add assert.JSONEq(t, string(caseWant), w.Body.String()) </s> remove wantGet: defaultConfJSON,
</s> add }, {
name: "local_ptr_upstreams_good",
wantSet: "",
}, {
name: "local_ptr_upstreams_null",
wantSet: "", | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> s.conf = tc.conf()
<mask> s.handleGetConfig(w, nil)
<mask>
<mask> assert.Equal(t, "application/json", w.Header().Get("Content-Type"))
<mask> assert.Equal(t, tc.want, w.Body.String())
<mask> })
<mask> }
<mask> }
<mask>
<mask> func TestDNSForwardHTTTP_handleSetConfig(t *testing.T) {
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove assert.Equal(t, tc.wantGet, w.Body.String())
</s> add assert.JSONEq(t, string(caseData.Want), w.Body.String()) </s> remove t.Run(tc.name, func(t *testing.T) {
r, rerr := rdns.resolve(tc.req)
require.ErrorIs(t, rerr, tc.wantErr)
assert.Equal(t, tc.want, r)
})
</s> add if len(resp.Answer) == 0 {
return "", nil </s> add caseWant, ok := data[tc.name]
require.True(t, ok)
</s> remove for _, tc := range testCases {
rdns := NewRDNS(dns, cc, snd, &aghtest.Exchanger{
Ups: tc.locUpstream,
})
</s> add resp, err := e.Exchanger.Exchange(req)
if err != nil {
return "", err
} </s> add caseData, ok := data[tc.name]
require.True(t, ok)
</s> remove e, err = NewMultiAddrExchanger([]string{"invalid-proto://www.example.com"}, 0)
</s> add e, err = NewMultiAddrExchanger([]string{"invalid-proto://www.example.com"}, nil, 0) | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep replace keep replace keep | <mask> assert.Nil(t, err)
<mask> defer func() {
<mask> assert.Nil(t, s.Stop())
<mask> }()
<mask>
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove e, err = NewMultiAddrExchanger([]string{"invalid-proto://www.example.com"}, 0)
</s> add e, err = NewMultiAddrExchanger([]string{"invalid-proto://www.example.com"}, nil, 0) </s> remove name string
</s> add </s> remove name: "all_right",
</s> add </s> remove want string
</s> add name string </s> remove want: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add name: "all_right", | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep replace keep keep replace keep | <mask> w := httptest.NewRecorder()
<mask>
<mask> const defaultConfJSON = "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n"
<mask> testCases := []struct {
<mask> name string
<mask> req string
<mask> wantSet string
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove wantGet string
</s> add </s> remove name string
</s> add </s> remove }()
</s> add }) </s> add ups upstream.Upstream </s> remove want string
</s> add name string | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep replace keep keep replace keep | <mask> name string
<mask> req string
<mask> wantSet string
<mask> wantGet string
<mask> }{{
<mask> name: "upstream_dns",
<mask> req: "{\"upstream_dns\":[\"8.8.8.8:77\",\"8.8.4.4:77\"]}",
<mask> wantSet: "",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req string
</s> add </s> remove const defaultConfJSON = "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n"
</s> add </s> remove want string
</s> add name string </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:77\",\"8.8.4.4:77\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> add ups upstream.Upstream | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> }{{
<mask> name: "upstream_dns",
<mask> req: "{\"upstream_dns\":[\"8.8.8.8:77\",\"8.8.4.4:77\"]}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:77\",\"8.8.4.4:77\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "bootstraps",
<mask> req: "{\"bootstrap_dns\":[\"9.9.9.10\"]}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req: "{\"upstream_dns\":[\"8.8.8.8:77\",\"8.8.4.4:77\"]}",
</s> add </s> remove req: "{\"bootstrap_dns\":[\"9.9.9.10\"]}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet string
</s> add </s> remove req: "{\"blocking_mode\":\"refused\"}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":6,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:77\",\"8.8.4.4:77\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "bootstraps",
<mask> req: "{\"bootstrap_dns\":[\"9.9.9.10\"]}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "blocking_mode_good",
<mask> req: "{\"blocking_mode\":\"refused\"}",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:77\",\"8.8.4.4:77\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"blocking_mode\":\"refused\"}",
</s> add </s> remove req: "{\"upstream_dns\":[\"8.8.8.8:77\",\"8.8.4.4:77\"]}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"refused\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":6,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> }, {
<mask> name: "bootstraps",
<mask> req: "{\"bootstrap_dns\":[\"9.9.9.10\"]}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "blocking_mode_good",
<mask> req: "{\"blocking_mode\":\"refused\"}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"refused\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req: "{\"bootstrap_dns\":[\"9.9.9.10\"]}",
</s> add </s> remove req: "{\"blocking_mode\":\"refused\"}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:77\",\"8.8.4.4:77\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"refused\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"upstream_dns\":[\"8.8.8.8:77\",\"8.8.4.4:77\"]}",
</s> add </s> remove req: "{\"blocking_mode\":\"custom_ip\"}",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "blocking_mode_good",
<mask> req: "{\"blocking_mode\":\"refused\"}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"refused\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "blocking_mode_bad",
<mask> req: "{\"blocking_mode\":\"custom_ip\"}",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"refused\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"bootstrap_dns\":[\"9.9.9.10\"]}",
</s> add </s> remove req: "{\"blocking_mode\":\"custom_ip\"}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:77\",\"8.8.4.4:77\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep replace keep keep keep keep | <mask> }, {
<mask> name: "blocking_mode_good",
<mask> req: "{\"blocking_mode\":\"refused\"}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"refused\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "blocking_mode_bad",
<mask> req: "{\"blocking_mode\":\"custom_ip\"}",
<mask> wantSet: "blocking_mode: incorrect value\n",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "ratelimit",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"blocking_mode\":\"refused\"}",
</s> add </s> remove req: "{\"ratelimit\":6}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"bootstrap_dns\":[\"9.9.9.10\"]}",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep replace keep keep replace keep | <mask> name: "blocking_mode_bad",
<mask> req: "{\"blocking_mode\":\"custom_ip\"}",
<mask> wantSet: "blocking_mode: incorrect value\n",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "ratelimit",
<mask> req: "{\"ratelimit\":6}",
<mask> wantSet: "",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req: "{\"blocking_mode\":\"custom_ip\"}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"refused\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"blocking_mode\":\"refused\"}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":6,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: defaultConfJSON,
</s> add }, {
name: "local_ptr_upstreams_good",
wantSet: "",
}, {
name: "local_ptr_upstreams_null",
wantSet: "", | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> }, {
<mask> name: "ratelimit",
<mask> req: "{\"ratelimit\":6}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":6,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "edns_cs_enabled",
<mask> req: "{\"edns_cs_enabled\":true}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":true,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req: "{\"ratelimit\":6}",
</s> add </s> remove req: "{\"edns_cs_enabled\":true}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":true,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"blocking_mode\":\"custom_ip\"}",
</s> add </s> remove req: "{\"dnssec_enabled\":true}",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":6,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "edns_cs_enabled",
<mask> req: "{\"edns_cs_enabled\":true}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":true,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "dnssec_enabled",
<mask> req: "{\"dnssec_enabled\":true}",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":true,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":6,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"dnssec_enabled\":true}",
</s> add </s> remove req: "{\"ratelimit\":6}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":true,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> }, {
<mask> name: "edns_cs_enabled",
<mask> req: "{\"edns_cs_enabled\":true}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":true,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "dnssec_enabled",
<mask> req: "{\"dnssec_enabled\":true}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":true,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req: "{\"edns_cs_enabled\":true}",
</s> add </s> remove req: "{\"dnssec_enabled\":true}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":true,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":6,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"ratelimit\":6}",
</s> add </s> remove req: "{\"cache_size\":1024}",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":true,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "dnssec_enabled",
<mask> req: "{\"dnssec_enabled\":true}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":true,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "cache_size",
<mask> req: "{\"cache_size\":1024}",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":true,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":true,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"cache_size\":1024}",
</s> add </s> remove req: "{\"edns_cs_enabled\":true}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":1024,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":6,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> }, {
<mask> name: "dnssec_enabled",
<mask> req: "{\"dnssec_enabled\":true}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":true,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "cache_size",
<mask> req: "{\"cache_size\":1024}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":1024,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req: "{\"dnssec_enabled\":true}",
</s> add </s> remove req: "{\"cache_size\":1024}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":1024,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":true,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"edns_cs_enabled\":true}",
</s> add </s> remove req: "{\"upstream_mode\":\"parallel\"}",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":true,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "cache_size",
<mask> req: "{\"cache_size\":1024}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":1024,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "upstream_mode_parallel",
<mask> req: "{\"upstream_mode\":\"parallel\"}",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":1024,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":true,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"upstream_mode\":\"parallel\"}",
</s> add </s> remove req: "{\"dnssec_enabled\":true}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"parallel\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":true,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> }, {
<mask> name: "cache_size",
<mask> req: "{\"cache_size\":1024}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":1024,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "upstream_mode_parallel",
<mask> req: "{\"upstream_mode\":\"parallel\"}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"parallel\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req: "{\"cache_size\":1024}",
</s> add </s> remove req: "{\"upstream_mode\":\"parallel\"}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":true,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"parallel\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"dnssec_enabled\":true}",
</s> add </s> remove req: "{\"upstream_mode\":\"fastest_addr\"}",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":1024,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "upstream_mode_parallel",
<mask> req: "{\"upstream_mode\":\"parallel\"}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"parallel\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "upstream_mode_fastest_addr",
<mask> req: "{\"upstream_mode\":\"fastest_addr\"}",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"parallel\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":1024,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"cache_size\":1024}",
</s> add </s> remove req: "{\"upstream_mode\":\"fastest_addr\"}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"fastest_addr\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":true,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> }, {
<mask> name: "upstream_mode_parallel",
<mask> req: "{\"upstream_mode\":\"parallel\"}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"parallel\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "upstream_mode_fastest_addr",
<mask> req: "{\"upstream_mode\":\"fastest_addr\"}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"fastest_addr\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req: "{\"upstream_mode\":\"parallel\"}",
</s> add </s> remove req: "{\"upstream_mode\":\"fastest_addr\"}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":1024,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"cache_size\":1024}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"fastest_addr\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"upstream_dns\":[\"\"]}",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"parallel\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "upstream_mode_fastest_addr",
<mask> req: "{\"upstream_mode\":\"fastest_addr\"}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"fastest_addr\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "upstream_dns_bad",
<mask> req: "{\"upstream_dns\":[\"\"]}",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"parallel\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"fastest_addr\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"upstream_mode\":\"parallel\"}",
</s> add </s> remove req: "{\"upstream_dns\":[\"\"]}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":1024,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"blocking_mode\":\"refused\"}",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep replace keep | <mask> }, {
<mask> name: "upstream_mode_fastest_addr",
<mask> req: "{\"upstream_mode\":\"fastest_addr\"}",
<mask> wantSet: "",
<mask> wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"fastest_addr\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "upstream_dns_bad",
<mask> req: "{\"upstream_dns\":[\"\"]}",
<mask> wantSet: "wrong upstreams specification: missing port in address\n",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req: "{\"upstream_mode\":\"fastest_addr\"}",
</s> add </s> remove wantGet: defaultConfJSON,
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"parallel\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove req: "{\"bootstrap_dns\":[\"a\"]}",
</s> add </s> remove req: "{\"upstream_mode\":\"parallel\"}",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep replace keep keep replace | <mask> wantSet: "wrong upstreams specification: missing port in address\n",
<mask> wantGet: defaultConfJSON,
<mask> }, {
<mask> name: "bootstraps_bad",
<mask> req: "{\"bootstrap_dns\":[\"a\"]}",
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req: "{\"upstream_dns\":[\"\"]}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"fastest_addr\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add </s> remove wantGet: defaultConfJSON,
</s> add </s> remove wantGet: defaultConfJSON,
</s> add </s> remove req: "{\"upstream_mode\":\"somethingelse\"}",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep replace keep keep replace keep keep | <mask> name: "bootstraps_bad",
<mask> req: "{\"bootstrap_dns\":[\"a\"]}",
<mask> wantSet: "a can not be used as bootstrap dns cause: invalid bootstrap server address: Resolver a is not eligible to be a bootstrap DNS server\n",
<mask> wantGet: defaultConfJSON,
<mask> }, {
<mask> name: "cache_bad_ttl",
<mask> req: "{\"cache_ttl_min\":1024,\"cache_ttl_max\":512}",
<mask> wantSet: "cache_ttl_min must be less or equal than cache_ttl_max\n",
<mask> wantGet: defaultConfJSON,
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req: "{\"bootstrap_dns\":[\"a\"]}",
</s> add </s> remove wantGet: defaultConfJSON,
</s> add </s> remove wantGet: defaultConfJSON,
</s> add </s> remove req: "{\"upstream_mode\":\"somethingelse\"}",
</s> add </s> remove req: "{\"upstream_dns\":[\"\"]}",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep replace keep keep keep | <mask> }, {
<mask> name: "cache_bad_ttl",
<mask> req: "{\"cache_ttl_min\":1024,\"cache_ttl_max\":512}",
<mask> wantSet: "cache_ttl_min must be less or equal than cache_ttl_max\n",
<mask> wantGet: defaultConfJSON,
<mask> }, {
<mask> name: "upstream_mode_bad",
<mask> req: "{\"upstream_mode\":\"somethingelse\"}",
<mask> wantSet: "upstream_mode: incorrect value\n",
<mask> wantGet: defaultConfJSON,
<mask> }}
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req: "{\"cache_ttl_min\":1024,\"cache_ttl_max\":512}",
</s> add </s> remove wantGet: defaultConfJSON,
</s> add </s> remove wantGet: defaultConfJSON,
</s> add }, {
name: "local_ptr_upstreams_good",
wantSet: "",
}, {
name: "local_ptr_upstreams_null",
wantSet: "", </s> remove req: "{\"bootstrap_dns\":[\"a\"]}",
</s> add </s> remove wantGet: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"refused\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> }, {
<mask> name: "upstream_mode_bad",
<mask> req: "{\"upstream_mode\":\"somethingelse\"}",
<mask> wantSet: "upstream_mode: incorrect value\n",
<mask> wantGet: defaultConfJSON,
<mask> }}
<mask>
<mask> for _, tc := range testCases {
<mask> t.Run(tc.name, func(t *testing.T) {
<mask> t.Cleanup(func() {
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req: "{\"upstream_mode\":\"somethingelse\"}",
</s> add </s> remove wantGet: defaultConfJSON,
</s> add </s> remove want: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"parallel\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add name: "parallel", </s> add var data map[string]json.RawMessage
loadTestData(t, t.Name()+jsonExt, &data)
</s> add var data map[string]struct {
Req json.RawMessage `json:"req"`
Want json.RawMessage `json:"want"`
}
loadTestData(t, t.Name()+jsonExt, &data)
</s> add caseData, ok := data[tc.name]
require.True(t, ok)
| https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep add keep keep keep keep keep keep | <mask> }}
<mask>
<mask> for _, tc := range testCases {
<mask> caseData, ok := data[tc.name]
<mask> require.True(t, ok)
<mask>
<mask> t.Run(tc.name, func(t *testing.T) {
<mask> t.Cleanup(func() {
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> add caseData, ok := data[tc.name]
require.True(t, ok)
</s> add var data map[string]json.RawMessage
loadTestData(t, t.Name()+jsonExt, &data)
</s> add caseWant, ok := data[tc.name]
require.True(t, ok)
</s> remove wantGet: defaultConfJSON,
</s> add }, {
name: "local_ptr_upstreams_good",
wantSet: "",
}, {
name: "local_ptr_upstreams_null",
wantSet: "", </s> remove want: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"parallel\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add name: "parallel", </s> remove for _, tc := range testCases {
rdns := NewRDNS(dns, cc, snd, &aghtest.Exchanger{
Ups: tc.locUpstream,
})
</s> add resp, err := e.Exchanger.Exchange(req)
if err != nil {
return "", err
} | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep add keep keep keep keep keep | <mask> }
<mask> loadTestData(t, t.Name()+jsonExt, &data)
<mask>
<mask> for _, tc := range testCases {
<mask> t.Run(tc.name, func(t *testing.T) {
<mask> t.Cleanup(func() {
<mask> s.conf = defaultConf
<mask> })
<mask>
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> add caseWant, ok := data[tc.name]
require.True(t, ok)
</s> add var data map[string]struct {
Req json.RawMessage `json:"req"`
Want json.RawMessage `json:"want"`
}
loadTestData(t, t.Name()+jsonExt, &data)
</s> add var data map[string]json.RawMessage
loadTestData(t, t.Name()+jsonExt, &data)
</s> remove wantGet: defaultConfJSON,
</s> add }, {
name: "local_ptr_upstreams_good",
wantSet: "",
}, {
name: "local_ptr_upstreams_null",
wantSet: "", </s> remove want: "{\"upstream_dns\":[\"8.8.8.8:53\",\"8.8.4.4:53\"],\"upstream_dns_file\":\"\",\"bootstrap_dns\":[\"9.9.9.10\",\"149.112.112.10\",\"2620:fe::10\",\"2620:fe::fe:10\"],\"protection_enabled\":true,\"ratelimit\":0,\"blocking_mode\":\"\",\"blocking_ipv4\":\"\",\"blocking_ipv6\":\"\",\"edns_cs_enabled\":false,\"dnssec_enabled\":false,\"disable_ipv6\":false,\"upstream_mode\":\"parallel\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add name: "parallel", </s> remove for _, tc := range testCases {
rdns := NewRDNS(dns, cc, snd, &aghtest.Exchanger{
Ups: tc.locUpstream,
})
</s> add resp, err := e.Exchanger.Exchange(req)
if err != nil {
return "", err
} | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> t.Cleanup(func() {
<mask> s.conf = defaultConf
<mask> })
<mask>
<mask> rBody := ioutil.NopCloser(strings.NewReader(tc.req))
<mask> var r *http.Request
<mask> r, err = http.NewRequest(http.MethodPost, "http://example.com", rBody)
<mask> require.Nil(t, err)
<mask>
<mask> s.handleSetConfig(w, r)
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove defer func() {
</s> add t.Cleanup(func() { </s> add caseData, ok := data[tc.name]
require.True(t, ok)
</s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove t.Run(tc.name, func(t *testing.T) {
r, rerr := rdns.resolve(tc.req)
require.ErrorIs(t, rerr, tc.wantErr)
assert.Equal(t, tc.want, r)
})
</s> add if len(resp.Answer) == 0 {
return "", nil </s> remove for _, tc := range testCases {
rdns := NewRDNS(dns, cc, snd, &aghtest.Exchanger{
Ups: tc.locUpstream,
})
</s> add resp, err := e.Exchanger.Exchange(req)
if err != nil {
return "", err
} </s> add func loadTestData(t *testing.T, casesFileName string, cases interface{}) {
t.Helper()
var f *os.File
f, err := os.Open(filepath.Join("testdata", casesFileName))
require.NoError(t, err)
t.Cleanup(func() {
require.NoError(t, f.Close())
})
err = json.NewDecoder(f).Decode(cases)
require.NoError(t, err)
}
const jsonExt = ".json"
| https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> assert.Equal(t, tc.wantSet, w.Body.String())
<mask> w.Body.Reset()
<mask>
<mask> s.handleGetConfig(w, nil)
<mask> assert.Equal(t, tc.wantGet, w.Body.String())
<mask> w.Body.Reset()
<mask> })
<mask> }
<mask> }
<mask>
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove assert.Equal(t, tc.want, w.Body.String())
</s> add assert.JSONEq(t, string(caseWant), w.Body.String()) </s> remove t.Run(tc.name, func(t *testing.T) {
r, rerr := rdns.resolve(tc.req)
require.ErrorIs(t, rerr, tc.wantErr)
assert.Equal(t, tc.want, r)
})
</s> add if len(resp.Answer) == 0 {
return "", nil </s> remove for _, tc := range testCases {
rdns := NewRDNS(dns, cc, snd, &aghtest.Exchanger{
Ups: tc.locUpstream,
})
</s> add resp, err := e.Exchanger.Exchange(req)
if err != nil {
return "", err
} </s> add caseWant, ok := data[tc.name]
require.True(t, ok)
</s> remove e, err = NewMultiAddrExchanger([]string{"invalid-proto://www.example.com"}, 0)
</s> add e, err = NewMultiAddrExchanger([]string{"invalid-proto://www.example.com"}, nil, 0) </s> remove func TestRDNS_Resolve(t *testing.T) {
extUpstream := &aghtest.TestUpstream{
Reverse: map[string][]string{
"1.1.1.1.in-addr.arpa.": {"one.one.one.one"},
},
}
locUpstream := &aghtest.TestUpstream{
Reverse: map[string][]string{
"1.1.168.192.in-addr.arpa.": {"local.domain"},
"2.1.168.192.in-addr.arpa.": {},
},
}
upstreamErr := errors.New("upstream error")
errUpstream := &aghtest.TestErrUpstream{
Err: upstreamErr,
}
nonPtrUpstream := &aghtest.TestBlockUpstream{
Hostname: "some-host",
Block: true,
}
dns := dnsforward.NewCustomServer(&proxy.Proxy{
Config: proxy.Config{
UpstreamConfig: &proxy.UpstreamConfig{
Upstreams: []upstream.Upstream{extUpstream},
},
},
})
cc := &clientsContainer{}
snd, err := aghnet.NewSubnetDetector()
require.NoError(t, err)
</s> add // rDNSExchanger is a mock dnsforward.RDNSExchanger implementation for tests.
type rDNSExchanger struct {
aghtest.Exchanger
} | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep | <mask>
<mask> return ""
<mask> }
<mask>
<mask> func stringArrayDup(a []string) []string {
<mask> a2 := make([]string, len(a))
<mask> copy(a2, a)
<mask> return a2
<mask> }
<mask>
<mask> // Find value in a sorted array
<mask> func findSorted(ar []string, val string) int {
<mask> i := sort.SearchStrings(ar, val)
<mask> if i == len(ar) || ar[i] != val {
<mask> return -1
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove // inStr checks if string is in the slice of strings.
func inStr(strs []string, str string) (ok bool) {
for _, s := range strs {
if s == str {
return true
}
}
return false
}
</s> add </s> remove // SplitNext - split string by a byte and return the first chunk
// Skip empty chunks
// Whitespace is trimmed
func SplitNext(str *string, splitBy byte) string {
i := strings.IndexByte(*str, splitBy)
s := ""
if i != -1 {
s = (*str)[0:i]
*str = (*str)[i+1:]
k := 0
ch := rune(0)
for k, ch = range *str {
if byte(ch) != splitBy {
break
}
}
*str = (*str)[k:]
} else {
s = *str
*str = ""
}
return strings.TrimSpace(s)
}
</s> add </s> remove func checkDNS(input string, bootstrap []string) error {
</s> add func checkDNS(input string, bootstrap []string, ef excFunc) (err error) { </s> remove func copyStrings(a []string) (b []string) {
return append(b, a...)
}
</s> add </s> remove const defaultLocalTimeout = 5 * time.Second
// stringsSetSubtract subtracts b from a interpreted as sets.
//
// TODO(e.burkov): Move into our internal package for working with strings.
func stringsSetSubtract(a, b []string) (c []string) {
// unit is an object to be used as value in set.
type unit = struct{}
cSet := make(map[string]unit)
for _, k := range a {
cSet[k] = unit{}
}
for _, k := range b {
delete(cSet, k)
}
c = make([]string, len(cSet))
i := 0
for k := range cSet {
c[i] = k
i++
}
return c
}
// collectAllIfacesAddrs returns the slice of all network interfaces IP
// addresses without port number.
func collectAllIfacesAddrs() (addrs []string, err error) {
var ifaces []net.Interface
ifaces, err = net.Interfaces()
if err != nil {
return nil, fmt.Errorf("getting network interfaces: %w", err)
}
for _, iface := range ifaces {
var ifaceAddrs []net.Addr
ifaceAddrs, err = iface.Addrs()
if err != nil {
return nil, fmt.Errorf("getting addresses for %q: %w", iface.Name, err)
}
for _, addr := range ifaceAddrs {
cidr := addr.String()
var ip net.IP
ip, _, err = net.ParseCIDR(cidr)
if err != nil {
return nil, fmt.Errorf("parsing %q as cidr: %w", cidr, err)
}
addrs = append(addrs, ip.String())
}
}
return addrs, nil
}
// collectDNSIPAddrs returns the slice of IP addresses without port number which
// we are listening on.
func collectDNSIPaddrs() (addrs []string, err error) {
addrs = make([]string, len(config.DNS.BindHosts))
for i, bh := range config.DNS.BindHosts {
if bh.IsUnspecified() {
return collectAllIfacesAddrs()
}
addrs[i] = bh.String()
}
return addrs, nil
}
func setupResolvers() {
// TODO(e.burkov): Enhance when the config will contain local resolvers
// addresses.
sysRes, err := aghnet.NewSystemResolvers(0, nil)
if err != nil {
log.Fatal(err)
}
Context.systemResolvers = sysRes
var ourAddrs []string
ourAddrs, err = collectDNSIPaddrs()
if err != nil {
log.Fatal(err)
}
// TODO(e.burkov): The approach of subtracting sets of strings is not
// 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.
addrs := stringsSetSubtract(sysRes.Get(), ourAddrs)
Context.localResolvers, err = aghnet.NewMultiAddrExchanger(addrs, defaultLocalTimeout)
if err != nil {
log.Fatal(err)
}
}
</s> add </s> remove _, _ = b.WriteString(suffix)
</s> add aghstrings.WriteToBuilder(b, suffix) | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/util.go |
keep keep keep add keep keep keep keep | <mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/agherr"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dhcpd"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsfilter"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/querylog"
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> add "github.com/AdguardTeam/AdGuardHome/internal/agherr" </s> add "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add "github.com/AdguardTeam/AdGuardHome/internal/agherr" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
</s> add </s> remove "strings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/clients.go |
keep keep keep keep replace replace replace replace keep keep keep keep keep | <mask> SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
<mask> UseGlobalBlockedServices: !cli.UseOwnBlockedServices,
<mask> }
<mask>
<mask> cy.Tags = copyStrings(cli.Tags)
<mask> cy.IDs = copyStrings(cli.IDs)
<mask> cy.BlockedServices = copyStrings(cli.BlockedServices)
<mask> cy.Upstreams = copyStrings(cli.Upstreams)
<mask>
<mask> *objects = append(*objects, cy)
<mask> }
<mask> clients.lock.Unlock()
<mask> }
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> add func loadTestData(t *testing.T, casesFileName string, cases interface{}) {
t.Helper()
var f *os.File
f, err := os.Open(filepath.Join("testdata", casesFileName))
require.NoError(t, err)
t.Cleanup(func() {
require.NoError(t, f.Close())
})
err = json.NewDecoder(f).Decode(cases)
require.NoError(t, err)
}
const jsonExt = ".json"
</s> add if (Object.prototype.hasOwnProperty.call(data, 'local_ptr_upstreams')) {
data.local_ptr_upstreams = splitByNewLine(config.local_ptr_upstreams);
hasDnsSettings = true;
} </s> add if dc.LocalPTRUpstreams != nil {
s.conf.LocalPTRResolvers = *dc.LocalPTRUpstreams
restart = true
}
</s> add if dc.ResolveClients != nil {
s.conf.ResolveClients = *dc.ResolveClients
}
</s> remove return lr.Ups.Exchange(req)
</s> add return e.Ups.Exchange(req) </s> remove Context.rdns = NewRDNS(Context.dnsServer, &Context.clients, Context.subnetDetector, Context.localResolvers)
</s> add Context.rdns = NewRDNS(Context.dnsServer, &Context.clients) | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/clients.go |
keep keep keep keep replace replace replace replace keep keep keep keep keep | <mask> // Return false if the new source has higher priority.
<mask> return source <= rc.Source
<mask> }
<mask>
<mask> func copyStrings(a []string) (b []string) {
<mask> return append(b, a...)
<mask> }
<mask>
<mask> func toQueryLogWhois(wi *RuntimeClientWhoisInfo) (cw *querylog.ClientWhois) {
<mask> if wi == nil {
<mask> return &querylog.ClientWhois{}
<mask> }
<mask>
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove func checkDNS(input string, bootstrap []string) error {
</s> add func checkDNS(input string, bootstrap []string, ef excFunc) (err error) { </s> remove // inStr checks if string is in the slice of strings.
func inStr(strs []string, str string) (ok bool) {
for _, s := range strs {
if s == str {
return true
}
}
return false
}
</s> add </s> remove func stringArrayDup(a []string) []string {
a2 := make([]string, len(a))
copy(a2, a)
return a2
}
</s> add </s> remove return ctx.Res, nil
</s> add if len(resp.Answer) == 0 {
return "", fmt.Errorf("lookup for %q: %w", arpa, rDNSEmptyAnswerErr)
}
ptr, ok := resp.Answer[0].(*dns.PTR)
if !ok {
return "", fmt.Errorf("type checking: %w", rDNSNotPTRErr)
}
return strings.TrimSuffix(ptr.Ptr, "."), nil </s> remove w.Header().Set("Content-Type", "application/json")
_, err = w.Write(jsonVal)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Couldn't write body: %s", err)
return
</s> add if _, err = u.Exchange(req); err != nil {
return fmt.Errorf("couldn't communicate with upstream: %w", err) </s> remove func (lr *Exchanger) Exchange(req *dns.Msg) (resp *dns.Msg, err error) {
if lr.Ups == nil {
lr.Ups = &TestErrUpstream{}
</s> add func (e *Exchanger) Exchange(req *dns.Msg) (resp *dns.Msg, err error) {
if e.Ups == nil {
e.Ups = &TestErrUpstream{} | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/clients.go |
keep keep keep keep replace replace replace replace keep keep keep keep keep | <mask> if !ok {
<mask> return nil, false
<mask> }
<mask>
<mask> c.IDs = copyStrings(c.IDs)
<mask> c.Tags = copyStrings(c.Tags)
<mask> c.BlockedServices = copyStrings(c.BlockedServices)
<mask> c.Upstreams = copyStrings(c.Upstreams)
<mask> return c, true
<mask> }
<mask>
<mask> // FindUpstreams looks for upstreams configured for the client
<mask> // If no client found for this IP, or if no custom upstreams are configured,
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove // ValidateUpstreams validates each upstream and returns an error if any upstream is invalid or if there are no default upstreams specified
</s> add // ValidateUpstreams validates each upstream and returns an error if any
// upstream is invalid or if there are no default upstreams specified.
//
// TODO(e.burkov): Move into aghnet or even into dnsproxy. </s> remove Upstreams []string `json:"upstream_dns"` // Upstreams
BootstrapDNS []string `json:"bootstrap_dns"` // Bootstrap DNS
</s> add Upstreams []string `json:"upstream_dns"`
BootstrapDNS []string `json:"bootstrap_dns"`
PrivateUpstreams []string `json:"private_upstream"` </s> remove // inStr checks if string is in the slice of strings.
func inStr(strs []string, str string) (ok bool) {
for _, s := range strs {
if s == str {
return true
}
}
return false
}
</s> add </s> add // ResolveClients signals if the RDNS should resolve clients' addresses.
ResolveClients bool
// LocalPTRResolvers is a slice of addresses to be used as upstreams for
// resolving PTR queries for local addresses.
LocalPTRResolvers []string </s> remove return ctx.Res, nil
</s> add if len(resp.Answer) == 0 {
return "", fmt.Errorf("lookup for %q: %w", arpa, rDNSEmptyAnswerErr)
}
ptr, ok := resp.Answer[0].(*dns.PTR)
if !ok {
return "", fmt.Errorf("type checking: %w", rDNSNotPTRErr)
}
return strings.TrimSuffix(ptr.Ptr, "."), nil </s> remove if ct == ctFilteringStatus && !inStr(filteringStatusValues, c.value) {
</s> add if ct == ctFilteringStatus && !aghstrings.InSlice(filteringStatusValues, c.value) { | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/clients.go |
keep add keep keep keep keep | <mask> // "myhost.lan" when AutohostTLD is "lan".
<mask> AutohostTLD string `yaml:"autohost_tld"`
<mask> }
<mask>
<mask> type tlsConfigSettings struct {
<mask> Enabled bool `yaml:"enabled" json:"enabled"` // Enabled is the encryption (DOT/DOH/HTTPS) status
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove LocalResolvers aghnet.Exchanger
</s> add </s> remove // Exchange - send DNS request to an upstream server and receive response
// No request/response filtering is performed.
// Query log and Stats are not updated.
// This method may be called before Start().
func (s *Server) Exchange(req *dns.Msg) (*dns.Msg, error) {
</s> add // RDNSExchanger is a resolver for clients' addresses.
type RDNSExchanger interface {
// Exchange tries to resolve the ip in a suitable way, e.g. either as
// local or as external.
Exchange(ip net.IP) (host string, err error)
}
const (
// rDNSEmptyAnswerErr is returned by Exchange method when the answer
// section of respond is empty.
rDNSEmptyAnswerErr agherr.Error = "the answer section is empty"
// rDNSNotPTRErr is returned by Exchange method when the response is not
// of PTR type.
rDNSNotPTRErr agherr.Error = "the response is not a ptr"
)
// Exchange implements the RDNSExchanger interface for *Server.
func (s *Server) Exchange(ip net.IP) (host string, err error) { </s> add // upstreamJSON is a request body for handleTestUpstreamDNS endpoint. </s> remove CustomResolver Resolver
</s> add CustomResolver Resolver `yaml:"-"` </s> remove // SplitNext - split string by a byte and return the first chunk
// Skip empty chunks
// Whitespace is trimmed
func SplitNext(str *string, splitBy byte) string {
i := strings.IndexByte(*str, splitBy)
s := ""
if i != -1 {
s = (*str)[0:i]
*str = (*str)[i+1:]
k := 0
ch := rune(0)
for k, ch = range *str {
if byte(ch) != splitBy {
break
}
}
*str = (*str)[k:]
} else {
s = *str
*str = ""
}
return strings.TrimSpace(s)
}
</s> add </s> remove const (
// rDNSEmptyAnswerErr is returned by RDNS resolve method when the answer
// section of respond is empty.
rDNSEmptyAnswerErr agherr.Error = "the answer section is empty"
// rDNSNotPTRErr is returned by RDNS resolve method when the response is
// not of PTR type.
rDNSNotPTRErr agherr.Error = "the response is not a ptr"
)
// resolve tries to resolve the ip in a suitable way.
func (r *RDNS) resolve(ip net.IP) (host string, err error) {
log.Tracef("rdns: resolving host for %q", ip)
arpa := dns.Fqdn(aghnet.ReverseAddr(ip))
msg := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Compress: true,
Question: []dns.Question{{
Name: arpa,
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
}},
}
var resp *dns.Msg
if r.subnetDetector.IsLocallyServedNetwork(ip) {
resp, err = r.localResolvers.Exchange(msg)
} else {
resp, err = r.dnsServer.Exchange(msg)
}
if err != nil {
return "", fmt.Errorf("performing lookup for %q: %w", arpa, err)
}
if len(resp.Answer) == 0 {
return "", fmt.Errorf("lookup for %q: %w", arpa, rDNSEmptyAnswerErr)
}
ptr, ok := resp.Answer[0].(*dns.PTR)
if !ok {
return "", fmt.Errorf("type checking: %w", rDNSNotPTRErr)
}
log.Tracef("rdns: ptr response for %q: %s", ip, ptr.String())
return strings.TrimSuffix(ptr.Ptr, "."), nil
}
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/config.go |
keep keep add keep keep keep keep keep keep | <mask> FilteringEnabled: true, // whether or not use filter lists
<mask> FiltersUpdateIntervalHours: 24,
<mask> AutohostTLD: "lan",
<mask> },
<mask> TLS: tlsConfigSettings{
<mask> PortHTTPS: 443,
<mask> PortDNSOverTLS: 853, // needs to be passed through to dnsproxy
<mask> PortDNSOverQUIC: 784,
<mask> },
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove wantGet: defaultConfJSON,
</s> add </s> remove req: "{\"cache_ttl_min\":1024,\"cache_ttl_max\":512}",
</s> add </s> remove wantGet: defaultConfJSON,
</s> add </s> remove req: "{\"bootstrap_dns\":[\"a\"]}",
</s> add </s> remove // ValidateUpstreams validates each upstream and returns an error if any upstream is invalid or if there are no default upstreams specified
</s> add // ValidateUpstreams validates each upstream and returns an error if any
// upstream is invalid or if there are no default upstreams specified.
//
// TODO(e.burkov): Move into aghnet or even into dnsproxy. </s> remove dnsServer *dnsforward.Server
clients *clientsContainer
subnetDetector *aghnet.SubnetDetector
localResolvers aghnet.Exchanger
</s> add exchanger dnsforward.RDNSExchanger
clients *clientsContainer | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/config.go |
keep keep keep keep replace keep keep keep keep keep keep keep replace keep | <mask> Context.dnsFilter.WriteDiskConfig(&c)
<mask> config.DNS.DnsfilterConf = c
<mask> }
<mask>
<mask> if Context.dnsServer != nil {
<mask> c := dnsforward.FilteringConfig{}
<mask> Context.dnsServer.WriteDiskConfig(&c)
<mask> config.DNS.FilteringConfig = c
<mask> }
<mask>
<mask> if Context.dnsServer != nil {
<mask> c := dnsforward.FilteringConfig{}
<mask> Context.dnsServer.WriteDiskConfig(&c)
<mask> config.DNS.FilteringConfig = c
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> add config.DNS.LocalPTRResolvers, config.DNS.ResolveClients = s.RDNSSettings() </s> remove const defaultLocalTimeout = 5 * time.Second
// stringsSetSubtract subtracts b from a interpreted as sets.
//
// TODO(e.burkov): Move into our internal package for working with strings.
func stringsSetSubtract(a, b []string) (c []string) {
// unit is an object to be used as value in set.
type unit = struct{}
cSet := make(map[string]unit)
for _, k := range a {
cSet[k] = unit{}
}
for _, k := range b {
delete(cSet, k)
}
c = make([]string, len(cSet))
i := 0
for k := range cSet {
c[i] = k
i++
}
return c
}
// collectAllIfacesAddrs returns the slice of all network interfaces IP
// addresses without port number.
func collectAllIfacesAddrs() (addrs []string, err error) {
var ifaces []net.Interface
ifaces, err = net.Interfaces()
if err != nil {
return nil, fmt.Errorf("getting network interfaces: %w", err)
}
for _, iface := range ifaces {
var ifaceAddrs []net.Addr
ifaceAddrs, err = iface.Addrs()
if err != nil {
return nil, fmt.Errorf("getting addresses for %q: %w", iface.Name, err)
}
for _, addr := range ifaceAddrs {
cidr := addr.String()
var ip net.IP
ip, _, err = net.ParseCIDR(cidr)
if err != nil {
return nil, fmt.Errorf("parsing %q as cidr: %w", cidr, err)
}
addrs = append(addrs, ip.String())
}
}
return addrs, nil
}
// collectDNSIPAddrs returns the slice of IP addresses without port number which
// we are listening on.
func collectDNSIPaddrs() (addrs []string, err error) {
addrs = make([]string, len(config.DNS.BindHosts))
for i, bh := range config.DNS.BindHosts {
if bh.IsUnspecified() {
return collectAllIfacesAddrs()
}
addrs[i] = bh.String()
}
return addrs, nil
}
func setupResolvers() {
// TODO(e.burkov): Enhance when the config will contain local resolvers
// addresses.
sysRes, err := aghnet.NewSystemResolvers(0, nil)
if err != nil {
log.Fatal(err)
}
Context.systemResolvers = sysRes
var ourAddrs []string
ourAddrs, err = collectDNSIPaddrs()
if err != nil {
log.Fatal(err)
}
// TODO(e.burkov): The approach of subtracting sets of strings is not
// 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.
addrs := stringsSetSubtract(sysRes.Get(), ourAddrs)
Context.localResolvers, err = aghnet.NewMultiAddrExchanger(addrs, defaultLocalTimeout)
if err != nil {
log.Fatal(err)
}
}
</s> add </s> add if dc.LocalPTRUpstreams != nil {
s.conf.LocalPTRResolvers = *dc.LocalPTRUpstreams
restart = true
}
</s> remove setupResolvers()
</s> add </s> remove ctx.setts = s.getClientRequestFilteringSettings(ctx)
</s> add if ctx.setts == nil {
ctx.setts = s.getClientRequestFilteringSettings(ctx)
} | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/config.go |
keep add keep keep keep keep keep | <mask> s.WriteDiskConfig(&c)
<mask> config.DNS.FilteringConfig = c
<mask> }
<mask>
<mask> if Context.dhcpServer != nil {
<mask> c := dhcpd.ServerConfig{}
<mask> Context.dhcpServer.WriteDiskConfig(&c)
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove Context.dnsServer.WriteDiskConfig(&c)
</s> add s.WriteDiskConfig(&c) </s> remove if Context.dnsServer != nil {
</s> add if s := Context.dnsServer; s != nil { </s> remove LocalResolvers: Context.localResolvers,
</s> add </s> remove const defaultLocalTimeout = 5 * time.Second
// stringsSetSubtract subtracts b from a interpreted as sets.
//
// TODO(e.burkov): Move into our internal package for working with strings.
func stringsSetSubtract(a, b []string) (c []string) {
// unit is an object to be used as value in set.
type unit = struct{}
cSet := make(map[string]unit)
for _, k := range a {
cSet[k] = unit{}
}
for _, k := range b {
delete(cSet, k)
}
c = make([]string, len(cSet))
i := 0
for k := range cSet {
c[i] = k
i++
}
return c
}
// collectAllIfacesAddrs returns the slice of all network interfaces IP
// addresses without port number.
func collectAllIfacesAddrs() (addrs []string, err error) {
var ifaces []net.Interface
ifaces, err = net.Interfaces()
if err != nil {
return nil, fmt.Errorf("getting network interfaces: %w", err)
}
for _, iface := range ifaces {
var ifaceAddrs []net.Addr
ifaceAddrs, err = iface.Addrs()
if err != nil {
return nil, fmt.Errorf("getting addresses for %q: %w", iface.Name, err)
}
for _, addr := range ifaceAddrs {
cidr := addr.String()
var ip net.IP
ip, _, err = net.ParseCIDR(cidr)
if err != nil {
return nil, fmt.Errorf("parsing %q as cidr: %w", cidr, err)
}
addrs = append(addrs, ip.String())
}
}
return addrs, nil
}
// collectDNSIPAddrs returns the slice of IP addresses without port number which
// we are listening on.
func collectDNSIPaddrs() (addrs []string, err error) {
addrs = make([]string, len(config.DNS.BindHosts))
for i, bh := range config.DNS.BindHosts {
if bh.IsUnspecified() {
return collectAllIfacesAddrs()
}
addrs[i] = bh.String()
}
return addrs, nil
}
func setupResolvers() {
// TODO(e.burkov): Enhance when the config will contain local resolvers
// addresses.
sysRes, err := aghnet.NewSystemResolvers(0, nil)
if err != nil {
log.Fatal(err)
}
Context.systemResolvers = sysRes
var ourAddrs []string
ourAddrs, err = collectDNSIPaddrs()
if err != nil {
log.Fatal(err)
}
// TODO(e.burkov): The approach of subtracting sets of strings is not
// 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.
addrs := stringsSetSubtract(sysRes.Get(), ourAddrs)
Context.localResolvers, err = aghnet.NewMultiAddrExchanger(addrs, defaultLocalTimeout)
if err != nil {
log.Fatal(err)
}
}
</s> add </s> remove setupResolvers()
</s> add </s> add if dc.LocalPTRUpstreams != nil {
s.conf.LocalPTRResolvers = *dc.LocalPTRUpstreams
restart = true
}
| https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/config.go |
keep keep keep keep replace keep keep keep keep keep | <mask> DNSFilter: Context.dnsFilter,
<mask> Stats: Context.stats,
<mask> QueryLog: Context.queryLog,
<mask> SubnetDetector: Context.subnetDetector,
<mask> LocalResolvers: Context.localResolvers,
<mask> AutohostTLD: config.DNS.AutohostTLD,
<mask> }
<mask> if Context.dhcpServer != nil {
<mask> p.DHCPServer = Context.dhcpServer
<mask> }
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove Context.dnsServer.WriteDiskConfig(&c)
</s> add s.WriteDiskConfig(&c) </s> add config.DNS.LocalPTRResolvers, config.DNS.ResolveClients = s.RDNSSettings() </s> remove localResolvers: p.LocalResolvers,
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add </s> remove LocalResolvers: &aghtest.Exchanger{},
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/dns.go |
keep keep keep keep replace keep keep keep keep keep | <mask> closeDNSServer()
<mask> return fmt.Errorf("dnsServer.Prepare: %w", err)
<mask> }
<mask>
<mask> Context.rdns = NewRDNS(Context.dnsServer, &Context.clients, Context.subnetDetector, Context.localResolvers)
<mask> Context.whois = initWhois(&Context.clients)
<mask>
<mask> Context.filters.Init()
<mask> return nil
<mask> }
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req := dns.Msg{}
req.Id = dns.Id()
req.RecursionDesired = true
req.Question = []dns.Question{
{Name: "google-public-dns-a.google.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET},
</s> add if err = ef(u); err != nil {
return fmt.Errorf("upstream %q fails to exchange: %w", input, err) </s> add return nil </s> remove LocalResolvers: Context.localResolvers,
</s> add </s> remove w.Header().Set("Content-Type", "application/json")
_, err = w.Write(jsonVal)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Couldn't write body: %s", err)
return
</s> add if _, err = u.Exchange(req); err != nil {
return fmt.Errorf("couldn't communicate with upstream: %w", err) </s> remove // No need to check this DNS server
</s> add // No need to check this DNS server. </s> add err = s.setupResolvers(s.conf.LocalPTRResolvers)
if err != nil {
return fmt.Errorf("setting up resolvers: %w", err)
}
| https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/dns.go |
keep keep keep keep replace keep keep keep keep keep | <mask> // This would be quite weird if we get here.
<mask> return
<mask> }
<mask>
<mask> if !ip.IsLoopback() {
<mask> Context.rdns.Begin(ip)
<mask> }
<mask> if !Context.subnetDetector.IsSpecialNetwork(ip) {
<mask> Context.whois.Begin(ip)
<mask> }
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove if !Context.subnetDetector.IsLocallyServedNetwork(ip) {
</s> add if config.DNS.ResolveClients && !ip.IsLoopback() { </s> remove if t, ok := reply.Answer[0].(*dns.A); ok {
if !net.IPv4(8, 8, 8, 8).Equal(t.A) {
return fmt.Errorf("dns server %s returned wrong answer: %v", input, t.A)
</s> add for _, host := range req.PrivateUpstreams {
err = checkDNS(host, bootstraps, checkPrivateUpstreamExc)
if err != nil {
log.Info("%v", err)
// TODO(e.burkov): If passed upstream have already
// written an error above, we rewriting the error for
// it. These cases should be handled properly instead.
result[host] = err.Error()
continue </s> add // RDNSSettings returns the copy of actual RDNS configuration.
func (s *Server) RDNSSettings() (localPTRResolvers []string, resolveClients bool) {
s.RLock()
defer s.RUnlock()
return aghstrings.CloneSlice(s.conf.LocalPTRResolvers), s.conf.ResolveClients
}
</s> remove const defaultLocalTimeout = 5 * time.Second
// stringsSetSubtract subtracts b from a interpreted as sets.
//
// TODO(e.burkov): Move into our internal package for working with strings.
func stringsSetSubtract(a, b []string) (c []string) {
// unit is an object to be used as value in set.
type unit = struct{}
cSet := make(map[string]unit)
for _, k := range a {
cSet[k] = unit{}
}
for _, k := range b {
delete(cSet, k)
}
c = make([]string, len(cSet))
i := 0
for k := range cSet {
c[i] = k
i++
}
return c
}
// collectAllIfacesAddrs returns the slice of all network interfaces IP
// addresses without port number.
func collectAllIfacesAddrs() (addrs []string, err error) {
var ifaces []net.Interface
ifaces, err = net.Interfaces()
if err != nil {
return nil, fmt.Errorf("getting network interfaces: %w", err)
}
for _, iface := range ifaces {
var ifaceAddrs []net.Addr
ifaceAddrs, err = iface.Addrs()
if err != nil {
return nil, fmt.Errorf("getting addresses for %q: %w", iface.Name, err)
}
for _, addr := range ifaceAddrs {
cidr := addr.String()
var ip net.IP
ip, _, err = net.ParseCIDR(cidr)
if err != nil {
return nil, fmt.Errorf("parsing %q as cidr: %w", cidr, err)
}
addrs = append(addrs, ip.String())
}
}
return addrs, nil
}
// collectDNSIPAddrs returns the slice of IP addresses without port number which
// we are listening on.
func collectDNSIPaddrs() (addrs []string, err error) {
addrs = make([]string, len(config.DNS.BindHosts))
for i, bh := range config.DNS.BindHosts {
if bh.IsUnspecified() {
return collectAllIfacesAddrs()
}
addrs[i] = bh.String()
}
return addrs, nil
}
func setupResolvers() {
// TODO(e.burkov): Enhance when the config will contain local resolvers
// addresses.
sysRes, err := aghnet.NewSystemResolvers(0, nil)
if err != nil {
log.Fatal(err)
}
Context.systemResolvers = sysRes
var ourAddrs []string
ourAddrs, err = collectDNSIPaddrs()
if err != nil {
log.Fatal(err)
}
// TODO(e.burkov): The approach of subtracting sets of strings is not
// 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.
addrs := stringsSetSubtract(sysRes.Get(), ourAddrs)
Context.localResolvers, err = aghnet.NewMultiAddrExchanger(addrs, defaultLocalTimeout)
if err != nil {
log.Fatal(err)
}
}
</s> add </s> remove func copyStrings(a []string) (b []string) {
return append(b, a...)
}
</s> add </s> remove func checkDNS(input string, bootstrap []string) error {
</s> add func checkDNS(input string, bootstrap []string, ef excFunc) (err error) { | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/dns.go |
keep add keep keep keep keep | <mask> newConf.GetCustomUpstreamByClient = Context.clients.FindUpstreams
<mask>
<mask> return newConf, nil
<mask> }
<mask>
<mask> func newDNSCrypt(hosts []net.IP, tlsConf tlsConfigSettings) (dnscc dnsforward.DNSCryptConfig, err error) {
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove func (lr *Exchanger) Exchange(req *dns.Msg) (resp *dns.Msg, err error) {
if lr.Ups == nil {
lr.Ups = &TestErrUpstream{}
</s> add func (e *Exchanger) Exchange(req *dns.Msg) (resp *dns.Msg, err error) {
if e.Ups == nil {
e.Ups = &TestErrUpstream{} </s> add return nil </s> remove func checkDNS(input string, bootstrap []string) error {
</s> add func checkDNS(input string, bootstrap []string, ef excFunc) (err error) { </s> remove func NewMultiAddrExchanger(addrs []string, timeout time.Duration) (e Exchanger, err error) {
</s> add func NewMultiAddrExchanger(
addrs []string,
bootstraps []string,
timeout time.Duration,
) (e Exchanger, err error) { </s> remove jsonVal, err := json.Marshal(result)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Unable to marshal status json: %s", err)
return
</s> add return nil
}
// checkPrivateUpstreamExc checks if the upstream for resolving private
// addresses exchanges correctly.
func checkPrivateUpstreamExc(u upstream.Upstream) (err error) {
req := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Question: []dns.Question{{
Name: "1.0.0.127.in-addr.arpa.",
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
}}, </s> remove func (s *Server) handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
req := upstreamJSON{}
err := json.NewDecoder(r.Body).Decode(&req)
</s> add // excFunc is a signature of function to check if upstream exchanges correctly.
type excFunc func(u upstream.Upstream) (err error)
// checkDNSUpstreamExc checks if the DNS upstream exchanges correctly.
func checkDNSUpstreamExc(u upstream.Upstream) (err error) {
req := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Question: []dns.Question{{
Name: "google-public-dns-a.google.com.",
Qtype: dns.TypeA,
Qclass: dns.ClassINET,
}},
}
var reply *dns.Msg
reply, err = u.Exchange(req) | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/dns.go |
keep keep keep keep replace keep keep keep keep keep | <mask> Context.queryLog.Start()
<mask>
<mask> const topClientsNumber = 100 // the number of clients to get
<mask> for _, ip := range Context.stats.GetTopClientsIP(topClientsNumber) {
<mask> if !Context.subnetDetector.IsLocallyServedNetwork(ip) {
<mask> Context.rdns.Begin(ip)
<mask> }
<mask> if !Context.subnetDetector.IsSpecialNetwork(ip) {
<mask> Context.whois.Begin(ip)
<mask> }
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove if !ip.IsLoopback() {
</s> add if config.DNS.ResolveClients && !ip.IsLoopback() { </s> remove const defaultLocalTimeout = 5 * time.Second
// stringsSetSubtract subtracts b from a interpreted as sets.
//
// TODO(e.burkov): Move into our internal package for working with strings.
func stringsSetSubtract(a, b []string) (c []string) {
// unit is an object to be used as value in set.
type unit = struct{}
cSet := make(map[string]unit)
for _, k := range a {
cSet[k] = unit{}
}
for _, k := range b {
delete(cSet, k)
}
c = make([]string, len(cSet))
i := 0
for k := range cSet {
c[i] = k
i++
}
return c
}
// collectAllIfacesAddrs returns the slice of all network interfaces IP
// addresses without port number.
func collectAllIfacesAddrs() (addrs []string, err error) {
var ifaces []net.Interface
ifaces, err = net.Interfaces()
if err != nil {
return nil, fmt.Errorf("getting network interfaces: %w", err)
}
for _, iface := range ifaces {
var ifaceAddrs []net.Addr
ifaceAddrs, err = iface.Addrs()
if err != nil {
return nil, fmt.Errorf("getting addresses for %q: %w", iface.Name, err)
}
for _, addr := range ifaceAddrs {
cidr := addr.String()
var ip net.IP
ip, _, err = net.ParseCIDR(cidr)
if err != nil {
return nil, fmt.Errorf("parsing %q as cidr: %w", cidr, err)
}
addrs = append(addrs, ip.String())
}
}
return addrs, nil
}
// collectDNSIPAddrs returns the slice of IP addresses without port number which
// we are listening on.
func collectDNSIPaddrs() (addrs []string, err error) {
addrs = make([]string, len(config.DNS.BindHosts))
for i, bh := range config.DNS.BindHosts {
if bh.IsUnspecified() {
return collectAllIfacesAddrs()
}
addrs[i] = bh.String()
}
return addrs, nil
}
func setupResolvers() {
// TODO(e.burkov): Enhance when the config will contain local resolvers
// addresses.
sysRes, err := aghnet.NewSystemResolvers(0, nil)
if err != nil {
log.Fatal(err)
}
Context.systemResolvers = sysRes
var ourAddrs []string
ourAddrs, err = collectDNSIPaddrs()
if err != nil {
log.Fatal(err)
}
// TODO(e.burkov): The approach of subtracting sets of strings is not
// 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.
addrs := stringsSetSubtract(sysRes.Get(), ourAddrs)
Context.localResolvers, err = aghnet.NewMultiAddrExchanger(addrs, defaultLocalTimeout)
if err != nil {
log.Fatal(err)
}
}
</s> add </s> remove // inStr checks if string is in the slice of strings.
func inStr(strs []string, str string) (ok bool) {
for _, s := range strs {
if s == str {
return true
}
}
return false
}
</s> add </s> remove // writeStrings is a convenient wrapper for strings.(*Builder).WriteString that
// deals with multiple strings and ignores errors that are guaranteed to be nil.
func writeStrings(b *strings.Builder, strs ...string) {
for _, s := range strs {
_, _ = b.WriteString(s)
}
}
</s> add </s> remove const (
// rDNSEmptyAnswerErr is returned by RDNS resolve method when the answer
// section of respond is empty.
rDNSEmptyAnswerErr agherr.Error = "the answer section is empty"
// rDNSNotPTRErr is returned by RDNS resolve method when the response is
// not of PTR type.
rDNSNotPTRErr agherr.Error = "the response is not a ptr"
)
// resolve tries to resolve the ip in a suitable way.
func (r *RDNS) resolve(ip net.IP) (host string, err error) {
log.Tracef("rdns: resolving host for %q", ip)
arpa := dns.Fqdn(aghnet.ReverseAddr(ip))
msg := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Compress: true,
Question: []dns.Question{{
Name: arpa,
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
}},
}
var resp *dns.Msg
if r.subnetDetector.IsLocallyServedNetwork(ip) {
resp, err = r.localResolvers.Exchange(msg)
} else {
resp, err = r.dnsServer.Exchange(msg)
}
if err != nil {
return "", fmt.Errorf("performing lookup for %q: %w", arpa, err)
}
if len(resp.Answer) == 0 {
return "", fmt.Errorf("lookup for %q: %w", arpa, rDNSEmptyAnswerErr)
}
ptr, ok := resp.Answer[0].(*dns.PTR)
if !ok {
return "", fmt.Errorf("type checking: %w", rDNSNotPTRErr)
}
log.Tracef("rdns: ptr response for %q: %s", ip, ptr.String())
return strings.TrimSuffix(ptr.Ptr, "."), nil
}
</s> add </s> remove result := map[string]string{}
</s> add if len(reply.Answer) != 1 {
return fmt.Errorf("wrong response")
} | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/dns.go |
keep keep keep keep replace replace replace keep keep keep keep keep | <mask> tls *TLSMod // TLS module
<mask> autoHosts util.AutoHosts // IP-hostname pairs taken from system configuration (e.g. /etc/hosts) files
<mask> updater *updater.Updater
<mask>
<mask> subnetDetector *aghnet.SubnetDetector
<mask> systemResolvers aghnet.SystemResolvers
<mask> localResolvers aghnet.Exchanger
<mask>
<mask> // mux is our custom http.ServeMux.
<mask> mux *http.ServeMux
<mask>
<mask> // Runtime properties
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove dnsServer *dnsforward.Server
clients *clientsContainer
subnetDetector *aghnet.SubnetDetector
localResolvers aghnet.Exchanger
</s> add exchanger dnsforward.RDNSExchanger
clients *clientsContainer </s> remove LocalResolvers aghnet.Exchanger
</s> add </s> add // ResolveClients signals if the RDNS should resolve clients' addresses.
ResolveClients bool
// LocalPTRResolvers is a slice of addresses to be used as upstreams for
// resolving PTR queries for local addresses.
LocalPTRResolvers []string </s> add // RDNSSettings returns the copy of actual RDNS configuration.
func (s *Server) RDNSSettings() (localPTRResolvers []string, resolveClients bool) {
s.RLock()
defer s.RUnlock()
return aghstrings.CloneSlice(s.conf.LocalPTRResolvers), s.conf.ResolveClients
}
</s> remove // writeStrings is a convenient wrapper for strings.(*Builder).WriteString that
// deals with multiple strings and ignores errors that are guaranteed to be nil.
func writeStrings(b *strings.Builder, strs ...string) {
for _, s := range strs {
_, _ = b.WriteString(s)
}
}
</s> add </s> remove // Exchange - send DNS request to an upstream server and receive response
// No request/response filtering is performed.
// Query log and Stats are not updated.
// This method may be called before Start().
func (s *Server) Exchange(req *dns.Msg) (*dns.Msg, error) {
</s> add // RDNSExchanger is a resolver for clients' addresses.
type RDNSExchanger interface {
// Exchange tries to resolve the ip in a suitable way, e.g. either as
// local or as external.
Exchange(ip net.IP) (host string, err error)
}
const (
// rDNSEmptyAnswerErr is returned by Exchange method when the answer
// section of respond is empty.
rDNSEmptyAnswerErr agherr.Error = "the answer section is empty"
// rDNSNotPTRErr is returned by Exchange method when the response is not
// of PTR type.
rDNSNotPTRErr agherr.Error = "the response is not a ptr"
)
// Exchange implements the RDNSExchanger interface for *Server.
func (s *Server) Exchange(ip net.IP) (host string, err error) { | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/home.go |
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep | <mask> Context.pidFileName = args.pidFile
<mask> }
<mask> }
<mask>
<mask> const defaultLocalTimeout = 5 * time.Second
<mask>
<mask> // stringsSetSubtract subtracts b from a interpreted as sets.
<mask> //
<mask> // TODO(e.burkov): Move into our internal package for working with strings.
<mask> func stringsSetSubtract(a, b []string) (c []string) {
<mask> // unit is an object to be used as value in set.
<mask> type unit = struct{}
<mask>
<mask> cSet := make(map[string]unit)
<mask> for _, k := range a {
<mask> cSet[k] = unit{}
<mask> }
<mask>
<mask> for _, k := range b {
<mask> delete(cSet, k)
<mask> }
<mask>
<mask> c = make([]string, len(cSet))
<mask> i := 0
<mask> for k := range cSet {
<mask> c[i] = k
<mask> i++
<mask> }
<mask>
<mask> return c
<mask> }
<mask>
<mask> // collectAllIfacesAddrs returns the slice of all network interfaces IP
<mask> // addresses without port number.
<mask> func collectAllIfacesAddrs() (addrs []string, err error) {
<mask> var ifaces []net.Interface
<mask> ifaces, err = net.Interfaces()
<mask> if err != nil {
<mask> return nil, fmt.Errorf("getting network interfaces: %w", err)
<mask> }
<mask>
<mask> for _, iface := range ifaces {
<mask> var ifaceAddrs []net.Addr
<mask> ifaceAddrs, err = iface.Addrs()
<mask> if err != nil {
<mask> return nil, fmt.Errorf("getting addresses for %q: %w", iface.Name, err)
<mask> }
<mask>
<mask> for _, addr := range ifaceAddrs {
<mask> cidr := addr.String()
<mask> var ip net.IP
<mask> ip, _, err = net.ParseCIDR(cidr)
<mask> if err != nil {
<mask> return nil, fmt.Errorf("parsing %q as cidr: %w", cidr, err)
<mask> }
<mask>
<mask> addrs = append(addrs, ip.String())
<mask> }
<mask> }
<mask>
<mask> return addrs, nil
<mask> }
<mask>
<mask> // collectDNSIPAddrs returns the slice of IP addresses without port number which
<mask> // we are listening on.
<mask> func collectDNSIPaddrs() (addrs []string, err error) {
<mask> addrs = make([]string, len(config.DNS.BindHosts))
<mask>
<mask> for i, bh := range config.DNS.BindHosts {
<mask> if bh.IsUnspecified() {
<mask> return collectAllIfacesAddrs()
<mask> }
<mask>
<mask> addrs[i] = bh.String()
<mask> }
<mask>
<mask> return addrs, nil
<mask> }
<mask>
<mask> func setupResolvers() {
<mask> // TODO(e.burkov): Enhance when the config will contain local resolvers
<mask> // addresses.
<mask>
<mask> sysRes, err := aghnet.NewSystemResolvers(0, nil)
<mask> if err != nil {
<mask> log.Fatal(err)
<mask> }
<mask>
<mask> Context.systemResolvers = sysRes
<mask>
<mask> var ourAddrs []string
<mask> ourAddrs, err = collectDNSIPaddrs()
<mask> if err != nil {
<mask> log.Fatal(err)
<mask> }
<mask>
<mask> // TODO(e.burkov): The approach of subtracting sets of strings is not
<mask> // really applicable here since in case of listening on all network
<mask> // interfaces we should check the whole interface's network to cut off
<mask> // all the loopback addresses as well.
<mask> addrs := stringsSetSubtract(sysRes.Get(), ourAddrs)
<mask>
<mask> Context.localResolvers, err = aghnet.NewMultiAddrExchanger(addrs, defaultLocalTimeout)
<mask> if err != nil {
<mask> log.Fatal(err)
<mask> }
<mask> }
<mask>
<mask> // run performs configurating and starts AdGuard Home.
<mask> func run(args options) {
<mask> // configure config filename
<mask> initConfigFilename(args)
<mask>
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove const (
// rDNSEmptyAnswerErr is returned by RDNS resolve method when the answer
// section of respond is empty.
rDNSEmptyAnswerErr agherr.Error = "the answer section is empty"
// rDNSNotPTRErr is returned by RDNS resolve method when the response is
// not of PTR type.
rDNSNotPTRErr agherr.Error = "the response is not a ptr"
)
// resolve tries to resolve the ip in a suitable way.
func (r *RDNS) resolve(ip net.IP) (host string, err error) {
log.Tracef("rdns: resolving host for %q", ip)
arpa := dns.Fqdn(aghnet.ReverseAddr(ip))
msg := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Compress: true,
Question: []dns.Question{{
Name: arpa,
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
}},
}
var resp *dns.Msg
if r.subnetDetector.IsLocallyServedNetwork(ip) {
resp, err = r.localResolvers.Exchange(msg)
} else {
resp, err = r.dnsServer.Exchange(msg)
}
if err != nil {
return "", fmt.Errorf("performing lookup for %q: %w", arpa, err)
}
if len(resp.Answer) == 0 {
return "", fmt.Errorf("lookup for %q: %w", arpa, rDNSEmptyAnswerErr)
}
ptr, ok := resp.Answer[0].(*dns.PTR)
if !ok {
return "", fmt.Errorf("type checking: %w", rDNSNotPTRErr)
}
log.Tracef("rdns: ptr response for %q: %s", ip, ptr.String())
return strings.TrimSuffix(ptr.Ptr, "."), nil
}
</s> add </s> remove return ctx.Res, nil
</s> add if len(resp.Answer) == 0 {
return "", fmt.Errorf("lookup for %q: %w", arpa, rDNSEmptyAnswerErr)
}
ptr, ok := resp.Answer[0].(*dns.PTR)
if !ok {
return "", fmt.Errorf("type checking: %w", rDNSNotPTRErr)
}
return strings.TrimSuffix(ptr.Ptr, "."), nil </s> remove func NewMultiAddrExchanger(addrs []string, timeout time.Duration) (e Exchanger, err error) {
</s> add func NewMultiAddrExchanger(
addrs []string,
bootstraps []string,
timeout time.Duration,
) (e Exchanger, err error) { </s> remove // inStr checks if string is in the slice of strings.
func inStr(strs []string, str string) (ok bool) {
for _, s := range strs {
if s == str {
return true
}
}
return false
}
</s> add </s> remove // No need to check this DNS server
</s> add // No need to check this DNS server. </s> remove jsonVal, err := json.Marshal(result)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Unable to marshal status json: %s", err)
return
</s> add return nil
}
// checkPrivateUpstreamExc checks if the upstream for resolving private
// addresses exchanges correctly.
func checkPrivateUpstreamExc(u upstream.Upstream) (err error) {
req := &dns.Msg{
MsgHdr: dns.MsgHdr{
Id: dns.Id(),
RecursionDesired: true,
},
Question: []dns.Question{{
Name: "1.0.0.127.in-addr.arpa.",
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
}}, | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/home.go |
keep keep keep keep replace replace keep keep keep keep keep | <mask> if err != nil {
<mask> log.Fatal(err)
<mask> }
<mask>
<mask> setupResolvers()
<mask>
<mask> if !Context.firstRun {
<mask> err = initDNSServer()
<mask> if err != nil {
<mask> log.Fatalf("%s", err)
<mask> }
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove for _, host := range req.Upstreams {
err = checkDNS(host, req.BootstrapDNS)
if err != nil {
log.Info("%v", err)
result[host] = err.Error()
} else {
result[host] = "OK"
</s> add if t, ok := reply.Answer[0].(*dns.A); ok {
if !net.IPv4(8, 8, 8, 8).Equal(t.A) {
return fmt.Errorf("wrong response") </s> remove // No need to check this DNS server
</s> add // No need to check this DNS server. </s> remove ctx.setts = s.getClientRequestFilteringSettings(ctx)
</s> add if ctx.setts == nil {
ctx.setts = s.getClientRequestFilteringSettings(ctx)
} </s> remove w.Header().Set("Content-Type", "application/json")
_, err = w.Write(jsonVal)
if err != nil {
httpError(r, w, http.StatusInternalServerError, "Couldn't write body: %s", err)
return
</s> add if _, err = u.Exchange(req); err != nil {
return fmt.Errorf("couldn't communicate with upstream: %w", err) </s> add return nil </s> remove req := dns.Msg{}
req.Id = dns.Id()
req.RecursionDesired = true
req.Question = []dns.Question{
{Name: "google-public-dns-a.google.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET},
</s> add if err = ef(u); err != nil {
return fmt.Errorf("upstream %q fails to exchange: %w", input, err) | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/home.go |
keep keep keep keep replace keep replace | <mask> package home
<mask>
<mask> import (
<mask> "encoding/binary"
<mask> "fmt"
<mask> "net"
<mask> "strings"
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> add "bytes"
"encoding/json" </s> remove "strings"
</s> add "os"
"path/filepath" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util"
</s> add "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> remove import { renderRadioField, renderTextareaField } from '../../../../helpers/form';
</s> add import { renderRadioField, renderTextareaField, CheckboxField } from '../../../../helpers/form'; | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/rdns.go |
keep keep keep keep replace keep keep keep replace keep keep keep | <mask> "strings"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/agherr"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
<mask> "github.com/AdguardTeam/golibs/cache"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/miekg/dns"
<mask> )
<mask>
<mask> // RDNS resolves clients' addresses to enrich their metadata.
</s> Pull request: 2704 local addresses vol.3
Merge in DNS/adguard-home from 2704-local-addresses-vol.3 to master
Updates #2704.
Updates #2829.
Updates #2928.
Squashed commit of the following:
commit 8c42355c0093a3ac6951f79a5211e7891800f93a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove dnsServer *dnsforward.Server
clients *clientsContainer
subnetDetector *aghnet.SubnetDetector
localResolvers aghnet.Exchanger
</s> add exchanger dnsforward.RDNSExchanger
clients *clientsContainer </s> add "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> remove "strings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
"github.com/AdguardTeam/dnsproxy/proxy"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util"
</s> add "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/home/rdns.go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.