feat: clearly indicate which resolver we're using (#885)
See what we documented at https://github.com/ooni/spec/pull/257 Reference issue: https://github.com/ooni/probe/issues/2238 See also the related ooni/spec PR: https://github.com/ooni/spec/pull/257 See also https://github.com/ooni/probe/issues/2237 While there, bump webconnectivity@v0.5 version because this change has an impact onto the generated data format. The drop in coverage is unavoidable because we've written some tests for `measurex` to ensure we deal with DNS resolvers and transport names correctly depending on the splitting policy we use. (However, `measurex` is only used for the `tor` experiment and, per the step-by-step design document, new experiments should use `measurexlite` instead, so this is hopefully fine(TM).) While there, fix a broken integration test that does not run in `-short` mode.
This commit is contained in:
parent
c3964e43b3
commit
8a0c062844
19 changed files with 362 additions and 59 deletions
|
|
@ -20,11 +20,11 @@ import (
|
|||
|
||||
// ErrNoDNSTransport is the error returned when you attempt to perform
|
||||
// a DNS operation that requires a custom DNSTransport (e.g., DNSOverHTTPSTransport)
|
||||
// but you are using the "system" resolver instead.
|
||||
// but you are using the "stdlib" resolver instead.
|
||||
var ErrNoDNSTransport = errors.New("operation requires a DNS transport")
|
||||
|
||||
// NewStdlibResolver creates a new Resolver by combining WrapResolver
|
||||
// with an internal "system" resolver type. The list of optional wrappers
|
||||
// with an internal "stdlib" resolver type. The list of optional wrappers
|
||||
// allow to wrap the underlying getaddrinfo transport. Any nil wrapper
|
||||
// will be silently ignored by the code that performs the wrapping.
|
||||
func NewStdlibResolver(logger model.DebugLogger, wrappers ...model.DNSTransportWrapper) model.Resolver {
|
||||
|
|
@ -45,7 +45,7 @@ func NewParallelDNSOverHTTPSResolver(logger model.DebugLogger, URL string) model
|
|||
// implies, this function returns an unwrapped resolver.
|
||||
func NewUnwrappedStdlibResolver(wrappers ...model.DNSTransportWrapper) model.Resolver {
|
||||
return &resolverSystem{
|
||||
t: WrapDNSTransport(&dnsOverGetaddrinfoTransport{}, wrappers...),
|
||||
t: WrapDNSTransport(NewDNSOverGetaddrinfoTransport(), wrappers...),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue