diff --git a/internal/engine/netx/dnstransport.go b/internal/engine/netx/dnstransport.go index f2b2814..a19f1ff 100644 --- a/internal/engine/netx/dnstransport.go +++ b/internal/engine/netx/dnstransport.go @@ -24,7 +24,7 @@ import ( // create the underlying Dialer and/or HTTP transport, if needed. The URL // argument describes the kind of client that we want to make: // -// - if the URL is `doh://powerdns`, `doh://google` or `doh://cloudflare` or the URL +// - if the URL is `doh://google` or `doh://cloudflare` or the URL // starts with `https://`, then we create a DoH client. // // - if the URL is `` or `system:///`, then we create a system client, @@ -49,8 +49,6 @@ func NewDNSClientWithOverrides(config Config, URL, hostOverride, SNIOverride, // We should split this function in smaller and testable units // TODO(https://github.com/ooni/probe/issues/2121#issuecomment-1147424810) switch URL { - case "doh://powerdns": - URL = "https://doh.powerdns.org/" case "doh://google": URL = "https://dns.google/dns-query" case "doh://cloudflare": diff --git a/internal/engine/netx/dnstransport_test.go b/internal/engine/netx/dnstransport_test.go index 69ba038..6743256 100644 --- a/internal/engine/netx/dnstransport_test.go +++ b/internal/engine/netx/dnstransport_test.go @@ -29,22 +29,6 @@ func TestNewDNSClientUnsupportedScheme(t *testing.T) { } } -func TestNewDNSClientPowerdnsDoH(t *testing.T) { - dnsclient, err := NewDNSClient( - Config{}, "doh://powerdns") - if err != nil { - t.Fatal(err) - } - r, ok := dnsclient.(*netxlite.SerialResolver) - if !ok { - t.Fatal("not the resolver we expected") - } - if _, ok := r.Transport().(*netxlite.DNSOverHTTPSTransport); !ok { - t.Fatal("not the transport we expected") - } - dnsclient.CloseIdleConnections() -} - func TestNewDNSClientGoogleDoH(t *testing.T) { dnsclient, err := NewDNSClient( Config{}, "doh://google") diff --git a/internal/engine/session.go b/internal/engine/session.go index f71843b..15acbfb 100644 --- a/internal/engine/session.go +++ b/internal/engine/session.go @@ -13,8 +13,8 @@ import ( "github.com/ooni/probe-cli/v3/internal/atomicx" "github.com/ooni/probe-cli/v3/internal/bytecounter" "github.com/ooni/probe-cli/v3/internal/engine/geolocate" - "github.com/ooni/probe-cli/v3/internal/engine/internal/sessionresolver" "github.com/ooni/probe-cli/v3/internal/engine/probeservices" + "github.com/ooni/probe-cli/v3/internal/engine/sessionresolver" "github.com/ooni/probe-cli/v3/internal/kvstore" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" diff --git a/internal/engine/internal/sessionresolver/doc.go b/internal/engine/sessionresolver/doc.go similarity index 100% rename from internal/engine/internal/sessionresolver/doc.go rename to internal/engine/sessionresolver/doc.go diff --git a/internal/engine/internal/sessionresolver/errwrapper.go b/internal/engine/sessionresolver/errwrapper.go similarity index 100% rename from internal/engine/internal/sessionresolver/errwrapper.go rename to internal/engine/sessionresolver/errwrapper.go diff --git a/internal/engine/internal/sessionresolver/errwrapper_test.go b/internal/engine/sessionresolver/errwrapper_test.go similarity index 100% rename from internal/engine/internal/sessionresolver/errwrapper_test.go rename to internal/engine/sessionresolver/errwrapper_test.go diff --git a/internal/engine/internal/sessionresolver/integration_test.go b/internal/engine/sessionresolver/integration_test.go similarity index 89% rename from internal/engine/internal/sessionresolver/integration_test.go rename to internal/engine/sessionresolver/integration_test.go index d9c729a..4872678 100644 --- a/internal/engine/internal/sessionresolver/integration_test.go +++ b/internal/engine/sessionresolver/integration_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/ooni/probe-cli/v3/internal/engine/internal/sessionresolver" + "github.com/ooni/probe-cli/v3/internal/engine/sessionresolver" "github.com/ooni/probe-cli/v3/internal/kvstore" ) diff --git a/internal/engine/internal/sessionresolver/jsoncodec.go b/internal/engine/sessionresolver/jsoncodec.go similarity index 100% rename from internal/engine/internal/sessionresolver/jsoncodec.go rename to internal/engine/sessionresolver/jsoncodec.go diff --git a/internal/engine/internal/sessionresolver/jsoncodec_test.go b/internal/engine/sessionresolver/jsoncodec_test.go similarity index 100% rename from internal/engine/internal/sessionresolver/jsoncodec_test.go rename to internal/engine/sessionresolver/jsoncodec_test.go diff --git a/internal/engine/internal/sessionresolver/lookup.go b/internal/engine/sessionresolver/lookup.go similarity index 100% rename from internal/engine/internal/sessionresolver/lookup.go rename to internal/engine/sessionresolver/lookup.go diff --git a/internal/engine/internal/sessionresolver/lookup_test.go b/internal/engine/sessionresolver/lookup_test.go similarity index 100% rename from internal/engine/internal/sessionresolver/lookup_test.go rename to internal/engine/sessionresolver/lookup_test.go diff --git a/internal/engine/internal/sessionresolver/resolver.go b/internal/engine/sessionresolver/resolver.go similarity index 100% rename from internal/engine/internal/sessionresolver/resolver.go rename to internal/engine/sessionresolver/resolver.go diff --git a/internal/engine/internal/sessionresolver/resolver_test.go b/internal/engine/sessionresolver/resolver_test.go similarity index 100% rename from internal/engine/internal/sessionresolver/resolver_test.go rename to internal/engine/sessionresolver/resolver_test.go diff --git a/internal/engine/internal/sessionresolver/resolvermaker.go b/internal/engine/sessionresolver/resolvermaker.go similarity index 98% rename from internal/engine/internal/sessionresolver/resolvermaker.go rename to internal/engine/sessionresolver/resolvermaker.go index 2040afd..303c107 100644 --- a/internal/engine/internal/sessionresolver/resolvermaker.go +++ b/internal/engine/sessionresolver/resolvermaker.go @@ -35,8 +35,6 @@ var allmakers = []*resolvermaker{{ url: "http3://dns.google/dns-query", }, { url: "https://dns.quad9.net/dns-query", -}, { - url: "https://doh.powerdns.org/", }, { url: systemResolverURL, }, { diff --git a/internal/engine/internal/sessionresolver/resolvermaker_test.go b/internal/engine/sessionresolver/resolvermaker_test.go similarity index 100% rename from internal/engine/internal/sessionresolver/resolvermaker_test.go rename to internal/engine/sessionresolver/resolvermaker_test.go diff --git a/internal/engine/internal/sessionresolver/state.go b/internal/engine/sessionresolver/state.go similarity index 100% rename from internal/engine/internal/sessionresolver/state.go rename to internal/engine/sessionresolver/state.go diff --git a/internal/engine/internal/sessionresolver/state_test.go b/internal/engine/sessionresolver/state_test.go similarity index 100% rename from internal/engine/internal/sessionresolver/state_test.go rename to internal/engine/sessionresolver/state_test.go