Test the mirror before mirror-pool-dispatcher selects it for downloading upgrades
For example, the client JS could check that the trace (https://mirrors.edge.kernel.org/tails/project/trace) can be retrieved without error before replacing the mirror URL on the page.
I think it should be a simple matter of programming™. Possible issues:
- This code is also run from Tails Upgrader so care will need to be taken not to break that (e.g. the Upgrader will need to ensure the JS code uses Tor to check the mirror).
- Semantics will change a bit but the current design does not seem totally adverse to that.
Code base: https://gitlab.tails.boum.org/tails/mirror-pool-dispatcher (