docstring_tokens
stringlengths 0
76.5k
| code_tokens
stringlengths 75
1.81M
| label_window
sequencelengths 4
2.12k
| html_url
stringlengths 74
116
| file_name
stringlengths 3
311
|
---|---|---|---|---|
<mask> b := &strings.Builder{}
<mask> encoder := hex.NewEncoder(b)
<mask>
<mask> for hash := range c.hashToHost {
<mask> // Ignore errors, since strings.(*Buffer).Write never returns
<mask> // errors.
<mask> //
<mask> // TODO(e.burkov, a.garipov): Find out and document why exactly
<mask> // this slice.
<mask> _, _ = encoder.Write(hash[0:2])
<mask> _, _ = b.WriteRune('.')
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove _, _ = encoder.Write(hash[0:2])
_, _ = b.WriteRune('.')
</s> add aghstrings.WriteToBuilder(b, hex.EncodeToString(hash[0:2]), ".") </s> remove encoder := hex.NewEncoder(b)
</s> add </s> remove // errors.
</s> add // errors. We don't use aghstrings.WriteToBuilder here since
// this package should be importable for any other. </s> remove // See comment above.
_, _ = b.WriteString(pcTXTSuffix)
</s> add aghstrings.WriteToBuilder(b, pcTXTSuffix)
</s> remove // See comment above.
_, _ = b.WriteString(sbTXTSuffix)
</s> add aghstrings.WriteToBuilder(b, sbTXTSuffix)
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsfilter/safebrowsing.go |
|
aghstrings.WriteToBuilder(b, hex.EncodeToString(hash[0:2]), ".") | <mask> // errors.
<mask> //
<mask> // TODO(e.burkov, a.garipov): Find out and document why exactly
<mask> // this slice.
<mask> _, _ = encoder.Write(hash[0:2])
<mask> _, _ = b.WriteRune('.')
<mask> }
<mask>
<mask> if c.svc == "SafeBrowsing" {
<mask> // See comment above.
<mask> _, _ = b.WriteString(sbTXTSuffix)
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove // Ignore errors, since strings.(*Buffer).Write never returns
// errors.
//
</s> add </s> remove // See comment above.
_, _ = b.WriteString(sbTXTSuffix)
</s> add aghstrings.WriteToBuilder(b, sbTXTSuffix)
</s> remove // See comment above.
_, _ = b.WriteString(pcTXTSuffix)
</s> add aghstrings.WriteToBuilder(b, pcTXTSuffix)
</s> remove // errors.
</s> add // errors. We don't use aghstrings.WriteToBuilder here since
// this package should be importable for any other. </s> remove lByte, rByte := val&0xF, val>>4
_, _ = b.WriteString(strconv.FormatUint(uint64(lByte), 16))
_, _ = b.WriteRune('.')
_, _ = b.WriteString(strconv.FormatUint(uint64(rByte), 16))
_, _ = b.WriteRune('.')
</s> add aghstrings.WriteToBuilder(
b,
strconv.FormatUint(uint64(val&0xF), 16),
dot,
strconv.FormatUint(uint64(val>>4), 16),
dot,
) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsfilter/safebrowsing.go |
aghstrings.WriteToBuilder(b, sbTXTSuffix)
| <mask> _, _ = b.WriteRune('.')
<mask> }
<mask>
<mask> if c.svc == "SafeBrowsing" {
<mask> // See comment above.
<mask> _, _ = b.WriteString(sbTXTSuffix)
<mask> return b.String()
<mask> }
<mask>
<mask> // See comment above.
<mask> _, _ = b.WriteString(pcTXTSuffix)
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove _, _ = encoder.Write(hash[0:2])
_, _ = b.WriteRune('.')
</s> add aghstrings.WriteToBuilder(b, hex.EncodeToString(hash[0:2]), ".") </s> remove // See comment above.
_, _ = b.WriteString(pcTXTSuffix)
</s> add aghstrings.WriteToBuilder(b, pcTXTSuffix)
</s> remove // errors.
</s> add // errors. We don't use aghstrings.WriteToBuilder here since
// this package should be importable for any other. </s> remove lByte, rByte := val&0xF, val>>4
_, _ = b.WriteString(strconv.FormatUint(uint64(lByte), 16))
_, _ = b.WriteRune('.')
_, _ = b.WriteString(strconv.FormatUint(uint64(rByte), 16))
_, _ = b.WriteRune('.')
</s> add aghstrings.WriteToBuilder(
b,
strconv.FormatUint(uint64(val&0xF), 16),
dot,
strconv.FormatUint(uint64(val>>4), 16),
dot,
) </s> remove // Ignore errors, since strings.(*Buffer).Write never returns
// errors.
//
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsfilter/safebrowsing.go |
aghstrings.WriteToBuilder(b, pcTXTSuffix)
| <mask> _, _ = b.WriteString(sbTXTSuffix)
<mask> return b.String()
<mask> }
<mask>
<mask> // See comment above.
<mask> _, _ = b.WriteString(pcTXTSuffix)
<mask> return b.String()
<mask> }
<mask>
<mask> // Find the target hash in TXT response
<mask> func (c *sbCtx) processTXT(resp *dns.Msg) (bool, [][]byte) {
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove // See comment above.
_, _ = b.WriteString(sbTXTSuffix)
</s> add aghstrings.WriteToBuilder(b, sbTXTSuffix)
</s> remove _, _ = encoder.Write(hash[0:2])
_, _ = b.WriteRune('.')
</s> add aghstrings.WriteToBuilder(b, hex.EncodeToString(hash[0:2]), ".") </s> remove // errors.
</s> add // errors. We don't use aghstrings.WriteToBuilder here since
// this package should be importable for any other. </s> remove // Ignore errors, since strings.(*Buffer).Write never returns
// errors.
//
</s> add </s> remove _, _ = b.WriteString(suffix)
</s> add aghstrings.WriteToBuilder(b, suffix) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsfilter/safebrowsing.go |
"github.com/AdguardTeam/AdGuardHome/internal/aghstrings" | <mask> "net/http"
<mask> "strings"
<mask> "sync"
<mask>
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/AdguardTeam/urlfilter"
<mask> "github.com/AdguardTeam/urlfilter/filterlist"
<mask> )
<mask>
<mask> type accessCtx struct {
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove "github.com/miekg/dns"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/access.go |
b := &strings.Builder{} | <mask> if err != nil {
<mask> return err
<mask> }
<mask>
<mask> buf := strings.Builder{}
<mask> for _, s := range blockedHosts {
<mask> buf.WriteString(s)
<mask> buf.WriteString("\n")
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove buf.WriteString(s)
buf.WriteString("\n")
</s> add aghstrings.WriteToBuilder(b, s, "\n") </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" </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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/access.go |
aghstrings.WriteToBuilder(b, s, "\n") | <mask> }
<mask>
<mask> buf := strings.Builder{}
<mask> for _, s := range blockedHosts {
<mask> buf.WriteString(s)
<mask> buf.WriteString("\n")
<mask> }
<mask>
<mask> listArray := []filterlist.RuleList{}
<mask> list := &filterlist.StringRuleList{
<mask> ID: int(0),
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove buf := strings.Builder{}
</s> add b := &strings.Builder{} </s> remove RulesText: buf.String(),
</s> add RulesText: b.String(), </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, nltb, depStr)
</s> add aghstrings.WriteToBuilder(b, nltb, depStr) </s> remove s := util.SplitNext(&d, '\n')
</s> add s := aghstrings.SplitNext(&d, '\n') | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/access.go |
RulesText: b.String(), | <mask>
<mask> listArray := []filterlist.RuleList{}
<mask> list := &filterlist.StringRuleList{
<mask> ID: int(0),
<mask> RulesText: buf.String(),
<mask> IgnoreCosmetic: true,
<mask> }
<mask> listArray = append(listArray, list)
<mask> rulesStorage, err := filterlist.NewRuleStorage(listArray)
<mask> if 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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove buf.WriteString(s)
buf.WriteString("\n")
</s> add aghstrings.WriteToBuilder(b, s, "\n") </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 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 setupResolvers()
</s> add </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,
}}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/access.go |
"github.com/AdguardTeam/AdGuardHome/internal/aghstrings" | <mask> "sort"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsfilter"
<mask> "github.com/AdguardTeam/dnsproxy/proxy"
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/ameshkov/dnscrypt/v2"
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
"github.com/AdguardTeam/dnsproxy/proxy"
</s> add </s> remove "github.com/stretchr/testify/require"
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/config.go |
<mask> "net/http"
<mask> "sort"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsfilter"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/util"
<mask> "github.com/AdguardTeam/dnsproxy/proxy"
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/ameshkov/dnscrypt/v2"
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </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" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/config.go |
|
// 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 | <mask> // Register an HTTP handler
<mask> HTTPRegister func(string, string, func(http.ResponseWriter, *http.Request))
<mask> }
<mask>
<mask> // if any of ServerConfig values are zero, then default values from below are used
<mask> var defaultValues = 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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove CustomResolver Resolver
</s> add CustomResolver Resolver `yaml:"-"` </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 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) { | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/config.go |
s := aghstrings.SplitNext(&d, '\n') | <mask> return err
<mask> }
<mask> d := string(data)
<mask> for len(d) != 0 {
<mask> s := util.SplitNext(&d, '\n')
<mask> upstreams = append(upstreams, s)
<mask> }
<mask> log.Debug("dns: using %d upstream servers from file %s", len(upstreams), s.conf.UpstreamDNSFileName)
<mask> } else {
<mask> upstreams = s.conf.UpstreamDNS
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 ln := util.SplitNext(&data, '\n')
</s> add ln := aghstrings.SplitNext(&data, '\n') </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 buf := strings.Builder{}
</s> add b := &strings.Builder{} </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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/config.go |
// Disable redundant filtering.
filterSetts := s.getClientRequestFilteringSettings(ctx)
filterSetts.ParentalEnabled = false
filterSetts.SafeBrowsingEnabled = false
filterSetts.SafeSearchEnabled = false
filterSetts.ServicesRules = nil
ctx.setts = filterSetts
| <mask>
<mask> // Do not perform unreversing ever again.
<mask> ctx.unreversedReqIP = ip
<mask>
<mask> // Nothing to restrict.
<mask> return resultCodeSuccess
<mask> }
<mask>
<mask> // ipToHost tries to get a hostname leased by DHCP. It's safe for concurrent
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 if !Context.subnetDetector.IsLocallyServedNetwork(ip) {
</s> add if config.DNS.ResolveClients && !ip.IsLoopback() { </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 dnsServer *dnsforward.Server
clients *clientsContainer
subnetDetector *aghnet.SubnetDetector
localResolvers aghnet.Exchanger
</s> add exchanger dnsforward.RDNSExchanger
clients *clientsContainer | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dns.go |
if ctx.setts == nil {
ctx.setts = s.getClientRequestFilteringSettings(ctx)
} | <mask>
<mask> var err error
<mask> ctx.protectionEnabled = s.conf.ProtectionEnabled && s.dnsFilter != nil
<mask> if ctx.protectionEnabled {
<mask> ctx.setts = s.getClientRequestFilteringSettings(ctx)
<mask> ctx.result, err = s.filterDNSRequest(ctx)
<mask> }
<mask> s.RUnlock()
<mask>
<mask> if 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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove setupResolvers()
</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 // 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 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. | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dns.go |
"strings" | <mask> "net/http"
<mask> "os"
<mask> "runtime"
<mask> "sync"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/agherr"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
"github.com/AdguardTeam/AdGuardHome/internal/agherr" | <mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dhcpd"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsfilter"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/querylog"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/stats"
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
"github.com/AdguardTeam/AdGuardHome/internal/aghstrings" | <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/querylog"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/stats"
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove writeStrings(
</s> add aghstrings.WriteToBuilder( </s> remove func stringArrayDup(a []string) []string {
a2 := make([]string, len(a))
copy(a2, a)
return a2
}
</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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
|
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
|
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) | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 // No need to check this DNS server
</s> add // No need to check this DNS server. </s> remove upstreams := stringArrayDup(s.conf.UpstreamDNS)
</s> add defer s.RUnlock()
upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
// 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
}
| <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
// 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) { | <mask> defer s.RUnlock()
<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",
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 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"` | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
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 | <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(),
<mask> }
<mask> err := s.internalProxy.Resolve(ctx)
<mask> if err != nil {
<mask> return nil, 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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove err := s.internalProxy.Resolve(ctx)
</s> add </s> remove return nil, err
</s> add return "", err </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 (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> 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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
<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
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 nil, err
</s> add return "", err </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. | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
|
return "", err | <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
<mask> }
<mask>
<mask> // Start starts the 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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove err := s.internalProxy.Resolve(ctx)
</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 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 // No need to check this DNS server
</s> add // No need to check this DNS server. | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
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 | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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> 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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
err = s.setupResolvers(s.conf.LocalPTRResolvers)
if err != nil {
return fmt.Errorf("setting up resolvers: %w", err)
}
| <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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> 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. | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward.go |
"github.com/AdguardTeam/AdGuardHome/internal/agherr" | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward_test.go |
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward_test.go |
|
s.Lock()
defer s.Unlock()
s.localResolvers = &aghtest.Exchanger{}
| <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </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 | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward_test.go |
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward_test.go |
|
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward_test.go |
|
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward_test.go |
|
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/dnsforward_test.go |
|
// filterDNSRequest applies the dnsFilter and sets d.Res if the request was
// filtered. | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/filter.go |
res, err := s.dnsFilter.CheckHost(host, req.Question[0].Qtype, ctx.setts) | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/filter.go |
ctx.origQuestion = req.Question[0]
req.Question[0].Name = dns.Fqdn(res.CanonName) | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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() { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/filter.go |
} else if res.Reason.In(dnsfilter.Rewritten, dnsfilter.RewrittenAutoHosts) { | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/filter.go |
"github.com/AdguardTeam/AdGuardHome/internal/aghstrings" | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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> remove "github.com/AdguardTeam/AdGuardHome/internal/util"
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
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"` | <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)
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 upstreams := stringArrayDup(s.conf.UpstreamDNS)
</s> add defer s.RUnlock()
upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS) </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 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) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
defer s.RUnlock()
upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS) | <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
<mask> blockingMode := s.conf.BlockingMode
<mask> BlockingIPv4 := s.conf.BlockingIPv4
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 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"` | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
bootstraps := aghstrings.CloneSliceOrEmpty(s.conf.BootstrapDNS) | <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
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 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 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"` | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
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) | <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
<mask> var upstreamMode string
<mask> if s.conf.FastestAddr {
<mask> upstreamMode = "fastest_addr"
<mask> } else if s.conf.AllServers {
<mask> upstreamMode = "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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 upstreams := stringArrayDup(s.conf.UpstreamDNS)
</s> add defer s.RUnlock()
upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> remove s.RUnlock()
</s> add </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"` | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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> 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) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
|
BlockingIPv4: blockingIPv4,
BlockingIPv6: blockingIPv6,
RateLimit: &ratelimit,
EDNSCSEnabled: &enableEDNSClientSubnet,
DNSSECEnabled: &enableDNSSEC,
DisableIPv6: &aaaaDisabled,
CacheSize: &cacheSize,
CacheMinTTL: &cacheMinTTL,
CacheMaxTTL: &cacheMaxTTL, | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </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) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
ResolveClients: &resolveClients,
LocalPTRUpstreams: &localPTRUpstreams, | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
if dc.LocalPTRUpstreams != nil {
s.conf.LocalPTRResolvers = *dc.LocalPTRUpstreams
restart = true
}
| <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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) | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
if dc.ResolveClients != nil {
s.conf.ResolveClients = *dc.ResolveClients
}
| <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </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) | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
// upstreamJSON is a request body for handleTestUpstreamDNS endpoint. | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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> remove func stringArrayDup(a []string) []string {
a2 := make([]string, len(a))
copy(a2, a)
return a2
}
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
Upstreams []string `json:"upstream_dns"`
BootstrapDNS []string `json:"bootstrap_dns"`
PrivateUpstreams []string `json:"private_upstream"` | <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
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 // 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> 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 { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
// 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. | <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>
<mask> // Consider this case valid because defaultDNS will be used
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 // No need to check this DNS server
</s> add // No need to check this DNS server. | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
// 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) | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </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 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) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
return fmt.Errorf("couldn't communicate with upstream: %w", err) | <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>
<mask> result := map[string]string{}
<mask>
<mask> for _, host := range req.Upstreams {
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 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 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 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") | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
if len(reply.Answer) != 1 {
return fmt.Errorf("wrong response")
} | <mask> httpError(r, w, http.StatusBadRequest, "Failed to read request body: %s", err)
<mask> return
<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)
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </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 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 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 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" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
if t, ok := reply.Answer[0].(*dns.A); ok {
if !net.IPv4(8, 8, 8, 8).Equal(t.A) {
return fmt.Errorf("wrong response") | <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>
<mask> jsonVal, err := json.Marshal(result)
<mask> if 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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 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 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 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) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
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,
}}, | <mask> result[host] = "OK"
<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> return
<mask> }
<mask>
<mask> w.Header().Set("Content-Type", "application/json")
<mask> _, err = w.Write(jsonVal)
<mask> if 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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </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 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 result := map[string]string{}
</s> add if len(reply.Answer) != 1 {
return fmt.Errorf("wrong response")
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
if _, err = u.Exchange(req); err != nil {
return fmt.Errorf("couldn't communicate with upstream: %w", err) | <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>
<mask> func checkDNS(input string, bootstrap []string) 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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 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 result := map[string]string{}
</s> add if len(reply.Answer) != 1 {
return fmt.Errorf("wrong response")
} </s> remove func checkDNS(input string, bootstrap []string) error {
</s> add func checkDNS(input string, bootstrap []string, ef excFunc) (err error) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
return nil | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
func checkDNS(input string, bootstrap []string, ef excFunc) (err error) { | <mask> return
<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
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 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 copyStrings(a []string) (b []string) {
return append(b, a...)
}
</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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
// Separate upstream from domains list.
var useDefault bool
if input, useDefault, err = separateUpstream(input); err != nil { | <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
<mask> if !useDefault {
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 func checkDNS(input string, bootstrap []string) error {
</s> add func checkDNS(input string, bootstrap []string, ef excFunc) (err error) { </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("failed to choose upstream for %s: %w", input, err)
</s> add return fmt.Errorf("failed to choose upstream for %q: %w", input, err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
// No need to check this DNS server. | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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")
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
log.Debug("checking if dns server %q works...", input)
var u upstream.Upstream
u, err = upstream.AddressToUpstream(input, upstream.Options{
Bootstrap: bootstrap,
Timeout: DefaultTimeout,
}) | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
return fmt.Errorf("failed to choose upstream for %q: %w", input, err) | <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{}
<mask> req.Id = dns.Id()
<mask> req.RecursionDesired = 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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </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 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" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
if err = ef(u); err != nil {
return fmt.Errorf("upstream %q fails to exchange: %w", input, err) | <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)
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 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 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 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" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
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) | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 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) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
httpError(r, w, http.StatusBadRequest, "Failed to read request body: %s", err)
return | <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)
<mask> }
<mask> if t, ok := reply.Answer[0].(*dns.A); ok {
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 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 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 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 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
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
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" | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
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 | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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") | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
result[host] = "OK" | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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")
} | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
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
} | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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,
}) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http.go |
"bytes"
"encoding/json" | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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> remove import { renderRadioField, renderTextareaField } from '../../../../helpers/form';
</s> add import { renderRadioField, renderTextareaField, CheckboxField } from '../../../../helpers/form'; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
"os"
"path/filepath" | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove "github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
"github.com/AdguardTeam/dnsproxy/proxy"
</s> add </s> remove "github.com/stretchr/testify/require"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util"
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
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"
| <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </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> 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 | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
<mask>
<mask> w := httptest.NewRecorder()
<mask>
<mask> testCases := []struct {
<mask> name string
<mask> conf func() ServerConfig
<mask> want string
<mask> }{{
<mask> name: "all_right",
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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: "all_right",
</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\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add name: "all_right", </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 name: "parallel",
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
|
name string | <mask>
<mask> testCases := []struct {
<mask> name string
<mask> conf func() ServerConfig
<mask> want string
<mask> }{{
<mask> name: "all_right",
<mask> conf: func() ServerConfig {
<mask> return defaultConf
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove name string
</s> add </s> remove name: "all_right",
</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\":\"\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add name: "all_right", </s> remove name: "fastest_addr",
</s> add </s> remove name: "parallel",
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
<mask> name string
<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",
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 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: "fastest_addr",
</s> add </s> remove name: "parallel",
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
|
name: "all_right", | <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",
<mask> }, {
<mask> name: "fastest_addr",
<mask> conf: func() ServerConfig {
<mask> conf := defaultConf
<mask> conf.FastestAddr = 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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove name: "fastest_addr",
</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", </s> remove name: "all_right",
</s> add </s> remove name: "parallel",
</s> add </s> remove want string
</s> add name string | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
|
name: "fastest_addr", | <mask> conf.FastestAddr = 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\":\"fastest_addr\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
<mask> }, {
<mask> name: "parallel",
<mask> conf: func() ServerConfig {
<mask> conf := defaultConf
<mask> conf.AllServers = 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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove name: "parallel",
</s> add </s> remove name: "fastest_addr",
</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\":\"\",\"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 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", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
<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 {
<mask> conf := defaultConf
<mask> conf.AllServers = 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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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\":\"fastest_addr\",\"cache_size\":0,\"cache_ttl_min\":0,\"cache_ttl_max\":0}\n",
</s> add name: "fastest_addr", </s> remove name: "fastest_addr",
</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\":\"\",\"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 want string
</s> add name string | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
|
name: "parallel", | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove wantGet: defaultConfJSON,
</s> add }, {
name: "local_ptr_upstreams_good",
wantSet: "",
}, {
name: "local_ptr_upstreams_null",
wantSet: "", </s> remove name: "parallel",
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
var data map[string]json.RawMessage
loadTestData(t, t.Name()+jsonExt, &data)
| <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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\":\"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: "", | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
caseWant, ok := data[tc.name]
require.True(t, ok)
| <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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\":\"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()) | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
assert.JSONEq(t, string(caseWant), w.Body.String()) | <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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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> 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
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
t.Cleanup(func() { | <mask> defaultConf := s.conf
<mask>
<mask> err := s.Start()
<mask> assert.Nil(t, err)
<mask> defer func() {
<mask> assert.Nil(t, s.Stop())
<mask> }()
<mask>
<mask> w := httptest.NewRecorder()
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove }()
</s> add }) </s> remove name 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 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 rBody := ioutil.NopCloser(strings.NewReader(tc.req))
</s> add rBody := ioutil.NopCloser(bytes.NewReader(caseData.Req)) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
}) | <mask> err := s.Start()
<mask> assert.Nil(t, err)
<mask> defer func() {
<mask> assert.Nil(t, s.Stop())
<mask> }()
<mask>
<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 {
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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> 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 name string
</s> add </s> remove req string
</s> add </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) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
<mask> }()
<mask>
<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
<mask> wantGet 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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req string
</s> add </s> remove wantGet string
</s> add </s> remove name string
</s> add </s> remove }()
</s> add }) </s> remove want string
</s> add name string | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
|
<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
<mask> wantGet string
<mask> }{{
<mask> name: "upstream_dns",
<mask> req: "{\"upstream_dns\":[\"8.8.8.8:77\",\"8.8.4.4:77\"]}",
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove wantGet 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 req: "{\"upstream_dns\":[\"8.8.8.8:77\",\"8.8.4.4:77\"]}",
</s> add </s> remove want string
</s> add name string | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
|
<mask> testCases := []struct {
<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: "",
<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",
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove req string
</s> add </s> remove req: "{\"upstream_dns\":[\"8.8.8.8:77\",\"8.8.4.4:77\"]}",
</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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
|
<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: "",
<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\"]}",
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 18:04:13 2021 +0300
openapi: log changes
... and 3 more commits </s> remove wantGet string
</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 string
</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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
|
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
|
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
|
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
|
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
|
<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",
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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\":\"\",\"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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
|
<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",
<mask> req: "{\"ratelimit\":6}",
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 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: "{\"ratelimit\":6}",
</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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
|
<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",
<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",
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 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\":\"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 </s> remove req: "{\"blocking_mode\":\"refused\"}",
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
|
<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: "",
<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}",
</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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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\":\"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\":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: "{\"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: "{\"edns_cs_enabled\":true}",
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
|
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
|
<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 <[email protected]>
Date: Wed Apr 7 18:07:41 2021 +0300
dnsforward: rm errors pkg
commit 7594a21a620239951039454dd5686a872e6f41a8
Merge: 830b0834 908452f8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 18:00:03 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 830b0834090510096061fed20b600195ab3773b8
Author: Eugene Burkov <[email protected]>
Date: Wed Apr 7 17:47:51 2021 +0300
dnsforward: reduce local upstream timeout
commit 493e81d9e8bacdc690f88af29a38d211b9733c7e
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 19:11:00 2021 +0300
client: private_upstream test
commit a0194ac28f15114578359b8c2460cd9af621e912
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:36:23 2021 +0300
all: expand api, fix conflicts
commit 0f4e06836fed958391aa597c8b02453564980ca3
Merge: 89cf93ad 8746005d
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 18:35:04 2021 +0300
Merge branch 'master' into 2704-local-addresses-vol.3
commit 89cf93ad4f26c2bf4f1b18ecaa4d3a1e169f9b06
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 18:02:40 2021 +0300
client: add local ptr upstreams to upstream test
commit e6dd869dddd4888474d625cbb005bad6390e4760
Author: Ildar Kamalov <[email protected]>
Date: Tue Apr 6 15:24:22 2021 +0300
client: add private DNS form
commit b858057b9a957a416117f22b8bd0025f90e8c758
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 13:05:28 2021 +0300
aghstrings: mk cloning correct
commit 8009ba60a6a7d6ceb7b6483a29f4e68d533af243
Author: Eugene Burkov <[email protected]>
Date: Tue Apr 6 12:37:46 2021 +0300
aghstrings: fix lil bug
commit 0dd19f2e7cc7c0de21517c37abd8336a907e1c0d
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:45:01 2021 +0300
all: log changes
commit eb5558d96fffa6e7bca7e14d3740d26e47382e23
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:18:53 2021 +0300
dnsforward: keep the style
commit d6d5fcbde40a633129c0e04887b81cf0b1ce6875
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 20:02:52 2021 +0300
dnsforward: disable redundant filtering for local ptr
commit 4f864c32027d10db9bcb4a264d2338df8c20afac
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 17:53:17 2021 +0300
dnsforward: imp tests
commit 7848e6f2341868f8ba0bb839956a0b7444cf02ca
Author: Eugene Burkov <[email protected]>
Date: Mon Apr 5 14:52:12 2021 +0300
all: imp code
commit 19ac30653800eebf8aaee499f65560ae2d458a5a
Author: Eugene Burkov <[email protected]>
Date: Sun Apr 4 16:28:05 2021 +0300
all: mv more logic to aghstrings
commit fac892ec5f0d2e30d6d64def0609267bbae4a202
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:23:23 2021 +0300
dnsforward: use filepath
commit 05a3aeef1181b914788d14c7519287d467ab301f
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:17:54 2021 +0300
aghstrings: introduce the pkg
commit f24e1b63d6e1bf266a4ed063f46f86d7abf65663
Author: Eugene Burkov <[email protected]>
Date: Fri Apr 2 20:01:23 2021 +0300
all: imp code
commit 0217a0ebb341f99a90c9b68013bebf6ff73d08ae
Author: Eugene Burkov <[email protected]>
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 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/80ed8be14538418a1faa3fd52e84e391b2f53f55 | internal/dnsforward/http_test.go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.