Use apt-cacher-ng's HTTPS/// trick to download Tor Browser tarballs over https
This allows us to simplify the "If you can't access it" instructions of our Tor Browser import docs: the URL can be set to the Tor Browser tarball stored at archive.torproject.org (which enforces https).
For an example of how to do this, see the "Fetch arti over https with apt-cacher-ng" (cd5661bc) commit in the wip/arti
branch, but since that commit might be rewritten and maybe even not merged (and the branch garbage collected at some point), here's the relevant part to use as inspiration:
ARTI_BINARY_URL='https://gitlab.torproject.org/tpo/core/arti/-/jobs/593103/artifacts/raw/arti-linux'
# When using the vmproxy or building on jenkins we know that
# apt-cacher-ng is used, so we fetch and cache over https using the
# HTTPS/// trick.
if [ "${TAILS_PROXY_TYPE}" = 'vmproxy' ] || [ -n "${JENKINS_URL:-}" ]; then
apt_proxy="$(apt-config --format '%v' dump Acquire::http::Proxy)"
ARTI_BINARY_URL="$(echo "$ARTI_BINARY_URL" | sed "s@^https://@${apt_proxy}/HTTPS///@")"
unset http_proxy HTTP_PROXY https_proxy HTTPS_PROXY
fi
/usr/bin/curl --retry 20 --output arti "${ARTI_BINARY_URL}"