mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-21 20:45:33 +03:00
Pull request 1835: bootstrap-plain
Merge in DNS/adguard-home from bootstrap-plain to master Updates AdguardTeam/dnsproxy#324. Squashed commit of the following: commit bd5d569dc26154985857977e81650eb0a51559a5 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Apr 18 17:41:53 2023 +0300 querylog: rm proxyutil dep commit 9db4053555e06eba264f7d3e6c75c747f8d73b56 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Apr 18 17:34:29 2023 +0300 all: upd proxy
This commit is contained in:
parent
96cd512d32
commit
584182e264
6 changed files with 13 additions and 10 deletions
|
@ -23,6 +23,11 @@ See also the [v0.107.30 GitHub milestone][ms-v0.107.30].
|
|||
NOTE: Add new changes BELOW THIS COMMENT.
|
||||
-->
|
||||
|
||||
### Fixed
|
||||
|
||||
- Provided bootstrap servers are now used to resolve the hostnames of plain
|
||||
UDP/TCP upstream servers.
|
||||
|
||||
<!--
|
||||
NOTE: Add new changes ABOVE THIS COMMENT.
|
||||
-->
|
||||
|
|
2
go.mod
2
go.mod
|
@ -3,7 +3,7 @@ module github.com/AdguardTeam/AdGuardHome
|
|||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/AdguardTeam/dnsproxy v0.48.3
|
||||
github.com/AdguardTeam/dnsproxy v0.49.1
|
||||
github.com/AdguardTeam/golibs v0.13.2
|
||||
github.com/AdguardTeam/urlfilter v0.16.1
|
||||
github.com/NYTimes/gziphandler v1.1.1
|
||||
|
|
4
go.sum
4
go.sum
|
@ -1,5 +1,5 @@
|
|||
github.com/AdguardTeam/dnsproxy v0.48.3 h1:h9xgDSmd1MqsPFNApyaPVXolmSTtzOWOcfWvPeDEP6s=
|
||||
github.com/AdguardTeam/dnsproxy v0.48.3/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw=
|
||||
github.com/AdguardTeam/dnsproxy v0.49.1 h1:JpStBK05uCgA3ldleaNLRmIwE9V7vRg7/kVJQSdnQYg=
|
||||
github.com/AdguardTeam/dnsproxy v0.49.1/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw=
|
||||
github.com/AdguardTeam/golibs v0.4.0/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4=
|
||||
github.com/AdguardTeam/golibs v0.10.4/go.mod h1:rSfQRGHIdgfxriDDNgNJ7HmE5zRoURq8R+VdR81Zuzw=
|
||||
github.com/AdguardTeam/golibs v0.13.2 h1:BPASsyQKmb+b8VnvsNOHp7bKfcZl9Z+Z2UhPjOiupSc=
|
||||
|
|
|
@ -205,8 +205,8 @@ func TestDNSForwardHTTP_handleSetConfig(t *testing.T) {
|
|||
wantSet: `validating upstream servers: validating upstream "!!!": not an ip:port`,
|
||||
}, {
|
||||
name: "bootstraps_bad",
|
||||
wantSet: `checking bootstrap a: invalid address: ` +
|
||||
`Resolver a is not eligible to be a bootstrap DNS server`,
|
||||
wantSet: `checking bootstrap a: invalid address: bootstrap a:53: ` +
|
||||
`ParseAddr("a"): unable to parse IP`,
|
||||
}, {
|
||||
name: "cache_bad_ttl",
|
||||
wantSet: `cache_ttl_min must be less or equal than cache_ttl_max`,
|
||||
|
|
|
@ -182,8 +182,7 @@ func TestDecodeLogEntry(t *testing.T) {
|
|||
if tc.want == "" {
|
||||
assert.Empty(t, s)
|
||||
} else {
|
||||
assert.True(t, strings.HasSuffix(s, tc.want),
|
||||
"got %q", s)
|
||||
assert.True(t, strings.HasSuffix(s, tc.want), "got %q", s)
|
||||
}
|
||||
|
||||
logOutput.Reset()
|
||||
|
|
|
@ -6,7 +6,6 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/filtering"
|
||||
"github.com/AdguardTeam/dnsproxy/proxyutil"
|
||||
"github.com/AdguardTeam/golibs/stringutil"
|
||||
"github.com/AdguardTeam/golibs/testutil"
|
||||
"github.com/AdguardTeam/golibs/timeutil"
|
||||
|
@ -367,6 +366,6 @@ func assertLogEntry(t *testing.T, entry *logEntry, host string, answer, client n
|
|||
require.NoError(t, msg.Unpack(entry.Answer))
|
||||
require.Len(t, msg.Answer, 1)
|
||||
|
||||
ip := proxyutil.IPFromRR(msg.Answer[0]).To16()
|
||||
assert.Equal(t, answer, ip)
|
||||
a := testutil.RequireTypeAssert[*dns.A](t, msg.Answer[0])
|
||||
assert.Equal(t, answer, a.A.To16())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue