ooni / probe

OONI Probe network measurement tool for detecting internet censorship
https://ooni.org/install
BSD 3-Clause "New" or "Revised" License
751 stars 142 forks source link

webconnectivity: x_status is 16384 with android_dns_cache_no_data #2499

Closed bassosimone closed 9 months ago

bassosimone commented 1 year ago

See for example https://explorer.ooni.org/chart/mat?probe_cc=PK&since=2023-03-05&time_grain=day&axis_x=measurement_start_day&test_name=web_connectivity&domain=www.dw.com. The issue here is that:

  1. the Android resolver is notoriously broken and does not report the real error why it failed, but it just says "no data";
  2. this fact causes a check for DNS failures to be skipped because the Android resolver is treated specially;
  3. so we end up wondering why we don't have requests and set the 16384 value for x_status.

I suspect switching users to Web Connectivity LTE would fix the issue. Fixing the issue with Web Connectivity v0.4 is possible but also dubious because we cannot be sure about what the system resolver is hiding from us. We should investigate whether using Web Connectivity LTE fixes the issue.

Another approach would be to call connectivityManager.getLinkProperties method and then call the [linkProperties.getDnsServers method](https://developer.android.com/reference/android/net/LinkProperties#getDnsServers()) to get the DNS resolvers IP addresses.

bassosimone commented 9 months ago

Done in https://github.com/ooni/probe-cli/pull/1211