DDoSolitary / LxRunOffline

A full-featured utility for managing Windows Subsystem for Linux (WSL)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

https://lxrunoffline.apphb.com/download/{distro}/{version} doesn't work for ubuntu 18 (bionic) onwards

yuan3y opened this issue · comments

The following issue is not on the code in the repo, but for the redirection on https://lxrunoffline.apphb.com/download/{distro}/{version} mentioned in the repo's wiki.

On the repo's wiki page, it writes:

You can download tar files required for installation from https://lxrunoffline.apphb.com/download/{distro}/{version} , where {distro} is the name of the distro you want and {version} is the optional version number. Note that though you're accessing the domain lxrunoffline.apphb.com, this project doesn't provide tar files to download and you'll be redirected to download files maintained by others.

This means that the following URLs are expected to be redirected to the correct path of the tar files.

https://lxrunoffline.apphb.com/download/ubuntu/bionic
https://lxrunoffline.apphb.com/download/ubuntu/focal
https://lxrunoffline.apphb.com/download/ubuntu/hirsute
https://lxrunoffline.apphb.com/download/ubuntu/impish
https://lxrunoffline.apphb.com/download/ubuntu/jammy

While it works for trusty and xenial, the newer version's links starting from bionic are redirected to the wrong places. For example:

$ curl https://lxrunoffline.apphb.com/download/ubuntu/bionic --head
HTTP/2 302
server: nginx
date: Wed, 02 Feb 2022 10:18:51 GMT
location: https://github.com/tianon/docker-brew-ubuntu-core/raw/dist-amd64/bionic/ubuntu-bionic-core-cloudimg-amd64-root.tar.gz

but the redirected location gives HTTP 404 response.

The correct path should be:
https://github.com/tianon/docker-brew-ubuntu-core/raw/dist-amd64/bionic/ubuntu-bionic-oci-amd64-root.tar.gz

In other words, the redirection of the ubuntu distro's versions after 18.04, i.e. version = {bionic, focal, hirsute, impish, jammy} should be changed to:
https://github.com/tianon/docker-brew-ubuntu-core/raw/dist-amd64/{version}/ubuntu-{version}-oci-amd64-root.tar.gz

fixed