cleanup: netx does not use netxlite legacy names (#801)
This diff refactors netx and netxlite to ensure we're not using netxlite legacy names inside of netx. To this end, we're cheating a bit. We're exposing a new factory to get an unwrapped stdlib resolver rather than defining a legacy name to export the private name of the same factory. This is actually a fine place to stop, for now, the next and netxlite refactoring at https://github.com/ooni/probe/issues/2121.
This commit is contained in:
@@ -65,7 +65,7 @@ func NewDNSClientWithOverrides(config Config, URL, hostOverride, SNIOverride,
|
||||
}
|
||||
switch resolverURL.Scheme {
|
||||
case "system":
|
||||
return netxlite.NewResolverSystem(), nil
|
||||
return netxlite.NewUnwrappedStdlibResolver(), nil
|
||||
case "https":
|
||||
config.TLSConfig.NextProtos = []string{"h2", "http/1.1"}
|
||||
httpClient := &http.Client{Transport: NewHTTPTransport(config)}
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
// NewResolver creates a new resolver from the specified config.
|
||||
func NewResolver(config Config) model.Resolver {
|
||||
if config.BaseResolver == nil {
|
||||
config.BaseResolver = netxlite.NewResolverSystem()
|
||||
config.BaseResolver = netxlite.NewUnwrappedStdlibResolver()
|
||||
}
|
||||
r := netxlite.WrapResolver(
|
||||
model.ValidLoggerOrDefault(config.Logger),
|
||||
|
||||
Reference in New Issue
Block a user