backend
backend copied to clipboard
api: fetch tor bridge lists at runtime
We currently use a static JSON file that requires manual update, to give out the testing targets for the default tor bridges. Tor now has an official API that we could use to fetch these at runtime and we should be using that.
The API in question is the following: https://bridges.torproject.org/moat/circumvention/builtin
This was previously discussed in this old issue: https://github.com/ooni/backend/issues/426
Things to consider:
- Should we hit this API every time an OONI Probe user starts a test or should we implement some sort of caching of the response?
- What do we do in the case in which the bridges.tpo API is down, do we have some caching of the last known set of bridges or do we not run the tor test at all (are we even able to do that?).
This is the documentation of the moat API (that covers the /builtin endpoint): https://gitlab.torproject.org/tpo/anti-censorship/rdsys/-/blob/main/doc/moat.md#circumventionbuiltin
Broken down by country can be found here: https://bridges.torproject.org/moat/circumvention/map