refactor: fully move IDNAResolver to netxlite (#433)

We started doing this in https://github.com/ooni/probe-cli/pull/432.

This work is part of https://github.com/ooni/probe/issues/1733.
This commit is contained in:
Simone Basso 2021-08-17 11:02:12 +02:00 committed by GitHub
commit bef5b87a8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 84 additions and 120 deletions

View file

@ -21,7 +21,7 @@ func DNSDo(ctx context.Context, config DNSConfig) ([]string, error) {
childResolver, err := netx.NewDNSClient(netx.Config{Logger: log.Log}, "doh://google")
runtimex.PanicOnError(err, "NewDNSClient failed")
var resolver netxlite.Resolver = childResolver
resolver = &netxlite.IDNAResolver{Resolver: resolver}
resolver = &netxlite.ResolverIDNA{Resolver: resolver}
}
return config.Resolver.LookupHost(ctx, config.Domain)
}