diff --git a/internal/cmd/oohelper/internal/client.go b/internal/cmd/oohelper/internal/client.go index d8de90a..7132337 100644 --- a/internal/cmd/oohelper/internal/client.go +++ b/internal/cmd/oohelper/internal/client.go @@ -13,7 +13,6 @@ import ( "github.com/apex/log" "github.com/ooni/probe-cli/v3/internal/engine/experiment/webconnectivity" "github.com/ooni/probe-cli/v3/internal/engine/httpheader" - "github.com/ooni/probe-cli/v3/internal/engine/netx" "github.com/ooni/probe-cli/v3/internal/netxlite/iox" "github.com/ooni/probe-cli/v3/internal/runtimex" "github.com/ooni/probe-cli/v3/internal/version" @@ -38,13 +37,18 @@ var ( ErrCannotParseJSONReply = errors.New("oohelper: cannot parse JSON reply") ) +// Resolver resolves domain names. +type Resolver interface { + LookupHost(ctx context.Context, hostname string) ([]string, error) +} + // OOClient is a client for the OONI Web Connectivity test helper. type OOClient struct { // HTTPClient is the HTTP client to use. HTTPClient *http.Client // Resolver is the resolver to user. - Resolver netx.Resolver + Resolver Resolver } // OOConfig contains configuration for the client.