File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,15 +3,13 @@ module github.com/AdguardTeam/dnsproxy
33go 1.26.4
44
55require (
6- github.com/AdguardTeam/dnscrypt v0.0.1
6+ github.com/AdguardTeam/dnscrypt v0.0.2
77 github.com/AdguardTeam/golibs v0.35.13
88 github.com/ameshkov/dnsstamps v1.0.3
99 github.com/beefsack/go-rate v0.0.0-20220214233405-116f4ca011a0
1010 github.com/bluele/gcache v0.0.2
1111 github.com/miekg/dns v1.1.72
1212 github.com/patrickmn/go-cache v2.1.0+incompatible
13- // TODO(s.chzhen): Update after investigation of the 0-RTT bug/behavior
14- // when TestUpstreamDoH_serverRestart/http3/second_try keeps failing.
1513 github.com/quic-go/quic-go v0.60.0
1614 github.com/stretchr/testify v1.11.1
1715 golang.org/x/exp v0.0.0-20260611194520-c48552f49976 // indirect
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ cloud.google.com/go/auth v0.20.0 h1:kXTssoVb4azsVDoUiF8KvxAqrsQcQtB53DcSgta74CA=
44cloud.google.com/go/auth v0.20.0 /go.mod h1:942/yi/itH1SsmpyrbnTMDgGfdy2BUqIKyd0cyYLc5Q =
55cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs =
66cloud.google.com/go/compute/metadata v0.9.0 /go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10 =
7- github.com/AdguardTeam/dnscrypt v0.0.1 h1:TWaEbHjuKkMCNpXANv70aPlTQsLFrjRFdIwdJUtzmPM =
8- github.com/AdguardTeam/dnscrypt v0.0.1 /go.mod h1:qCFs51rLfNzEDZqb6nz1tocVLnEearJ1zng6O3I6ecA =
7+ github.com/AdguardTeam/dnscrypt v0.0.2 h1:kIFCyjYofKHug7RwPGOjVga81P0/zOQdbUN+7p+I95M =
8+ github.com/AdguardTeam/dnscrypt v0.0.2 /go.mod h1:qCFs51rLfNzEDZqb6nz1tocVLnEearJ1zng6O3I6ecA =
99github.com/AdguardTeam/golibs v0.35.13 h1:sflm5/sWhiGwUXNAZObiqVMkdg8HeYVFK2A0oJ27hbU =
1010github.com/AdguardTeam/golibs v0.35.13 /go.mod h1:8EEGG4auTDd8HV3tBETXLkuxDH9lk9vvFbJn+wbmypg =
1111github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk =
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package middleware
33import (
44 "net"
55 "net/netip"
6- "os"
76 "path"
87 "path/filepath"
98 "testing"
@@ -23,13 +22,6 @@ import (
2322// testLogger is a common logger for tests.
2423var testLogger = slogutil .NewDiscardLogger ()
2524
26- // TODO(e.burkov): Remove when [hostsfile.DefaultStorage] stops using [log].
27- func TestMain (m * testing.M ) {
28- testutil .DiscardLogOutput (m )
29-
30- os .Exit (m .Run ())
31- }
32-
3325// TODO(e.burkov): Add helpers to initialize [proxy.Proxy] to [dnsproxytest]
3426// and rewrite the tests.
3527
Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ func TestProxy_Resolve_cache(t *testing.T) {
129129 for _ , tc := range testCases {
130130 t .Run (tc .name , func (t * testing.T ) {
131131 p , err := proxy .New (& proxy.Config {
132+ Logger : testLogger ,
132133 UDPListenAddr : []* net.UDPAddr {net .UDPAddrFromAddrPort (localhostAnyPort )},
133134 UpstreamConfig : upsConf ,
134135 CacheEnabled : tc .prxCacheEnabled ,
@@ -165,6 +166,7 @@ func TestProxy_Start_closeOnFail(t *testing.T) {
165166 }
166167
167168 p , err := proxy .New (& proxy.Config {
169+ Logger : testLogger ,
168170 // Add a free address.
169171 UDPListenAddr : []* net.UDPAddr {net .UDPAddrFromAddrPort (localhostAnyPort )},
170172 // Add a bound address.
Original file line number Diff line number Diff line change @@ -41,12 +41,11 @@ var testLogger = slogutil.NewDiscardLogger()
4141
4242// TODO(ameshkov): Make tests here not depend on external servers.
4343
44- // TODO(d.kolyshev): Remove this after quic-go has migrated to slog.
4544func TestMain (m * testing.M ) {
4645 // See https://github.com/quic-go/quic-go/issues/4228.
4746 errors .Check (os .Setenv ("QUIC_GO_DISABLE_GSO" , "1" ))
4847
49- testutil . DiscardLogOutput ( m )
48+ os . Exit ( m . Run () )
5049}
5150
5251// TODO(a.garipov): Refactor.
You can’t perform that action at this time.
0 commit comments