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:
@@ -25,7 +25,7 @@ Index:
|
||||
|
||||
- [chapter04](chapter04) shows how to establish QUIC sessions;
|
||||
|
||||
- [chapter05](chapter05) is about the "system" DNS resolver;
|
||||
- [chapter05](chapter05) is about the "stdlib" DNS resolver;
|
||||
|
||||
- [chapter06](chapter06) discusses custom DNS-over-UDP resolvers;
|
||||
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
|
||||
# Chapter I: Using the "system" DNS resolver
|
||||
# Chapter I: Using the "stdlib" DNS resolver
|
||||
|
||||
In this chapter we will write together a `main.go` file that
|
||||
uses the "system" DNS resolver to lookup domain names.
|
||||
uses the "stdlib" DNS resolver to lookup domain names.
|
||||
|
||||
The "system" resolver is the one used by `getaddrinfo` on Unix.
|
||||
The "stdlib" resolver is `getaddrinfo` on Unix. If we're compiled with
|
||||
`CGO_ENABLED=1`, we use the `getaddrinfo` stdlib call directly. Otherwise,
|
||||
we use the `net.Resolver` resolver, which may or may not use
|
||||
`getaddrinfo` (or equivalent stdlib calls) under the hood.
|
||||
|
||||
(This file is auto-generated from the corresponding source file,
|
||||
so make sure you don't edit it manually.)
|
||||
@@ -114,4 +117,4 @@ should cause a timeout error, because the timeout is ridicolously small.
|
||||
|
||||
## Conclusions
|
||||
|
||||
We have seen how to use the "system" DNS resolver.
|
||||
We have seen how to use the "stdlib" DNS resolver.
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
// -=-=- StartHere -=-=-
|
||||
//
|
||||
// # Chapter I: Using the "system" DNS resolver
|
||||
// # Chapter I: Using the "stdlib" DNS resolver
|
||||
//
|
||||
// In this chapter we will write together a `main.go` file that
|
||||
// uses the "system" DNS resolver to lookup domain names.
|
||||
// uses the "stdlib" DNS resolver to lookup domain names.
|
||||
//
|
||||
// The "system" resolver is the one used by `getaddrinfo` on Unix.
|
||||
// The "stdlib" resolver is `getaddrinfo` on Unix. If we're compiled with
|
||||
// `CGO_ENABLED=1`, we use the `getaddrinfo` stdlib call directly. Otherwise,
|
||||
// we use the `net.Resolver` resolver, which may or may not use
|
||||
// `getaddrinfo` (or equivalent stdlib calls) under the hood.
|
||||
//
|
||||
// (This file is auto-generated from the corresponding source file,
|
||||
// so make sure you don't edit it manually.)
|
||||
@@ -115,4 +118,4 @@ func fatal(err error) {
|
||||
//
|
||||
// ## Conclusions
|
||||
//
|
||||
// We have seen how to use the "system" DNS resolver.
|
||||
// We have seen how to use the "stdlib" DNS resolver.
|
||||
|
||||
Reference in New Issue
Block a user