Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • T tails
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 927
    • Issues 927
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • tails
  • tails
  • Issues
  • #18561
Closed
Open
Created Aug 29, 2021 by boyska@boyskaMaintainer

Ensure we use a working mirror for downloading Tails images

#15755 (closed) is about letting the client test the mirror before downloading. That's a nice idea, but is not possible from JS, because of same-origin-policy. CORS could make it possible to have this, but probably our mirror operators won't do that.

So what we could do is just pick a new mirror every time the user clicks on the Download button. This way, if the download doesn't start, and the user just clicks again, they could be luckier in this second try!

Another implementation idea, from #15755 (comment 176496):

actually, there might be a way of doing that. From JS, you can add a new Image() whose src is, for example https://mirrors.wikimedia.org/tails/project/test.png. If that image can be loaded, then the mirror is working. Testing whether the image has loaded can apparently be done. Though hackish, I think this is better than #18561 from a UX perspective.

Let's give it a try, spending ~2h on this, and if it turns out it's more complicated, switch to #18263 instead.

We've set up a test image on the mirrors for this: tails/project/mirror-test.png.

Code base: https://gitlab.tails.boum.org/tails/mirror-pool-dispatcher (getRandomMirrorUrlPrefix function).

Design doc: https://tails.boum.org/contribute/design/mirrors/

Context: https://gitlab.tails.boum.org/tails/blueprints/-/wikis/HTTP_mirror_pool

Edited Dec 12, 2021 by intrigeri
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking