all: get dnsproxy latest version; rm tests; imp code;

This commit is contained in:
Maksim Kazantsev committed 2026-08-14 18:14:44 +03:00
1 parent 06a4bf057e
commit 8a245ad8ac
4 files changed
+5 -33

No files matched your search

+1 -3
View File
@@ -4,9 +4,7 @@ go 1.26.6
require (
github.com/AdguardTeam/dnscrypt v0.0.2
// TODO(m.kazantsev): !! Update when the corresponding pull request will be
// merged.
github.com/AdguardTeam/dnsproxy v0.83.3-0.20260811104234-827469d571a7
github.com/AdguardTeam/dnsproxy v0.84.0
github.com/AdguardTeam/golibs v0.35.15
github.com/AdguardTeam/urlfilter v0.23.4
github.com/NYTimes/gziphandler v1.1.1
+2
View File
@@ -14,6 +14,8 @@ github.com/AdguardTeam/dnsproxy v0.83.3-0.20260810153019-3ed2ad5795ea h1:ms2w9Vt
github.com/AdguardTeam/dnsproxy v0.83.3-0.20260810153019-3ed2ad5795ea/go.mod h1:O1K8Roc6lNhSB5ffBXx34Pw7/03b+HUNh6qIhR/ad2A=
github.com/AdguardTeam/dnsproxy v0.83.3-0.20260811104234-827469d571a7 h1:rVIoL/5Q6rcufG8dxEVOJmMJSbT8OV3WTAKyGN9AX8U=
github.com/AdguardTeam/dnsproxy v0.83.3-0.20260811104234-827469d571a7/go.mod h1:O1K8Roc6lNhSB5ffBXx34Pw7/03b+HUNh6qIhR/ad2A=
github.com/AdguardTeam/dnsproxy v0.84.0 h1:bcTORgQL0L5cwcTz9f+iB0JPZVbCHlCv7phso9y3lrU=
github.com/AdguardTeam/dnsproxy v0.84.0/go.mod h1:nZlktYebWcLO613q1j2N0bZ5BEnHPuqXAyW6O9vIhDU=
github.com/AdguardTeam/golibs v0.35.15 h1:KjksvvzlQqxdNvrz+O3FgMbZKZAQdcoCkgBz0mR7wFQ=
github.com/AdguardTeam/golibs v0.35.15/go.mod h1:lScOIavWuRFL0vls26jKfQXaITP7OKO1qw75WYp5nYk=
github.com/AdguardTeam/urlfilter v0.23.4 h1:3cwt5xj7lpK2t3sWtr9WI8mmsKP+RtpkdnEy7lrn8cg=
@@ -501,34 +501,6 @@ func TestServer_timeout(t *testing.T) {
})
}
func TestServer_Prepare_fallbacks(t *testing.T) {
srvConf := &ServerConfig{
TLSConf: &TLSConfig{},
Config: Config{
FallbackDNS: []string{
"#tls://1.1.1.1",
"8.8.8.8",
},
UpstreamMode: UpstreamModeLoadBalance,
EDNSClientSubnet: &EDNSClientSubnet{Enabled: false},
ClientsContainer: EmptyClientsContainer{},
},
ServePlainDNS: true,
}
s, err := NewServer(DNSCreateParams{
Logger: testLogger,
TLSConfigProvider: testTLSConfigProvider,
})
require.NoError(t, err)
err = s.Prepare(testutil.ContextWithTimeout(t, testTimeout), srvConf)
require.NoError(t, err)
require.NotNil(t, s.dnsProxy.Fallbacks)
assert.Len(t, s.dnsProxy.Fallbacks.Upstreams, 1)
}
func TestServerWithProtectionDisabled(t *testing.T) {
s := createTestServer(
t,
+2 -2
View File
@@ -228,7 +228,7 @@ func (s *Server) makeDDRResponse(req *dns.Msg) (resp *dns.Msg) {
s.appendDoTResolvers(req, resp, domainName)
for _, addr := range s.dnsProxy.QUICListenAddr {
for _, addr := range s.conf.TLSConf.QUICListenAddrs {
values := []dns.SVCBKeyValue{
&dns.SVCBAlpn{Alpn: []string{"doq"}},
&dns.SVCBPort{Port: uint16(addr.Port)},
@@ -259,7 +259,7 @@ func (s *Server) appendDoTResolvers(req, resp *dns.Msg, domainName string) {
// addresses.
//
// See https://github.com/AdguardTeam/AdGuardHome/issues/4927.
for _, addr := range s.dnsProxy.TLSListenAddr {
for _, addr := range s.conf.TLSConf.TLSListenAddrs {
values := []dns.SVCBKeyValue{
&dns.SVCBAlpn{Alpn: []string{"dot"}},
&dns.SVCBPort{Port: uint16(addr.Port)},