ooni-probe-cli/internal/netxlite
Simone Basso 9967803c31
fix(netxlite): map additional GetAddrInfoW errors (#521)
On Windows, GetAddrInfoW is a syscall and the Go resolver does
not attempt to map errors beyond WSA_HOST_NOT_FOUND, which becomes
"no such host", which we map to "dns_nxdomain_error".

See https://github.com/golang/go/blob/go1.17.1/src/net/lookup_windows.go#L16.

To map more GetAddrInfoW errors, thus, we need to enhance our
error classifier to have system specific errors.

Then, we need to filter for the WSA errors that are most likely
to pop up and map them to OONI failures. Those are three:

- WSANO_DATA which we have from our own UDP resolver as well
and which we can map to `dns_no_answer`

- WSANO_RECOVERY which we don't have but existed for MK so
we will use `dns_non_recoverable_failure`, which was an MK error

- WSATRY_AGAIN which likewise we map to the error that MK
used to emit, so `dns_temporary_failure`

This diff should address https://github.com/ooni/probe/issues/1467.
2021-09-29 11:21:28 +02:00
..
dnsx refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
internal fix(netxlite): map additional GetAddrInfoW errors (#521) 2021-09-29 11:21:28 +02:00
mocks refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
quicx refactor(netxlite): hide details without breaking the rest of the tree (#454) 2021-09-05 14:49:38 +02:00
certifi_test.go netxlite: improve docs, tests, and code quality (#493) 2021-09-08 21:19:51 +02:00
certifi.go fix(netxlite): map additional GetAddrInfoW errors (#521) 2021-09-29 11:21:28 +02:00
classify_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
classify.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dialer_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dialer.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dnsdecoder_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dnsdecoder.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dnsencoder_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dnsencoder.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dnsoverhttps_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dnsoverhttps.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dnsovertcp_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dnsovertcp.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dnsoverudp_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dnsoverudp.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dnstransport.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
doc.go netxlite: code quality, improve tests, docs (#494) 2021-09-08 22:48:10 +02:00
errno_android_test.go fix(netxlite): map additional GetAddrInfoW errors (#521) 2021-09-29 11:21:28 +02:00
errno_android.go fix(netxlite): map additional GetAddrInfoW errors (#521) 2021-09-29 11:21:28 +02:00
errno_darwin_test.go fix(netxlite): map additional GetAddrInfoW errors (#521) 2021-09-29 11:21:28 +02:00
errno_darwin.go fix(netxlite): map additional GetAddrInfoW errors (#521) 2021-09-29 11:21:28 +02:00
errno_freebsd_test.go fix(netxlite): map additional GetAddrInfoW errors (#521) 2021-09-29 11:21:28 +02:00
errno_freebsd.go fix(netxlite): map additional GetAddrInfoW errors (#521) 2021-09-29 11:21:28 +02:00
errno_ios_test.go fix(netxlite): map additional GetAddrInfoW errors (#521) 2021-09-29 11:21:28 +02:00
errno_ios.go fix(netxlite): map additional GetAddrInfoW errors (#521) 2021-09-29 11:21:28 +02:00
errno_linux_test.go fix(netxlite): map additional GetAddrInfoW errors (#521) 2021-09-29 11:21:28 +02:00
errno_linux.go fix(netxlite): map additional GetAddrInfoW errors (#521) 2021-09-29 11:21:28 +02:00
errno_windows_test.go fix(netxlite): map additional GetAddrInfoW errors (#521) 2021-09-29 11:21:28 +02:00
errno_windows.go fix(netxlite): map additional GetAddrInfoW errors (#521) 2021-09-29 11:21:28 +02:00
errno.go fix(netxlite): map additional GetAddrInfoW errors (#521) 2021-09-29 11:21:28 +02:00
errwrapper_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
errwrapper.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
http_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
http.go fix(netxlite): do not mutate outgoing requests (#508) 2021-09-27 13:35:47 +02:00
http3_test.go netxlite: code quality, improve tests, docs (#494) 2021-09-08 22:48:10 +02:00
http3.go fix(netxlite): http3 transport needs logging by default (#492) 2021-09-08 20:49:01 +02:00
integration_test.go refactor: migrate apitool from netx to netxlite (#496) 2021-09-09 01:19:17 +02:00
iox_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
iox.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
legacy_test.go feat(netxlite): implement LookupHTTPS (#514) 2021-09-27 23:09:41 +02:00
legacy.go feat(netxlite): implement LookupHTTPS (#514) 2021-09-27 23:09:41 +02:00
logger.go refactor: move httptransport w/ logging to netxlite (#411) 2021-06-26 18:11:47 +02:00
operations.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
quic_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
quic.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
quirks_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
quirks.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
resolver_test.go doc: add tutorial on how to use netxlite (#519) 2021-09-28 18:15:38 +02:00
resolver.go doc: add tutorial on how to use netxlite (#519) 2021-09-28 18:15:38 +02:00
serialresolver_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
serialresolver.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
tls_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
tls.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
utls_test.go refactor(netxlite): finish grouping tests (#488) 2021-09-08 11:39:27 +02:00
utls.go netxlite: code quality, improve tests, docs (#494) 2021-09-08 22:48:10 +02:00