ooni / probe

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

webconnectivity{,lte}: don't call httpapi directly #2725

Closed bassosimone closed 1 month ago

bassosimone commented 1 month ago

Currently, both webconnectivty and webconnectivitylte call the httpapi directly. The main reason why this is an issue is that is kind of violates a separation between mechanism and policy. Ideally, the call should be indirect through the engine. This change would allow us to modify the policy with which we call the TH more freely. An example of policy change would be to stop using the httpapi package and instead migrate both web connectivity implementations to use httpclientx.

This work is part of an ongoing rationalization and documentation of how we contact backend services initially documented at https://github.com/ooni/probe/issues/2700.