ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
20.86k stars 1.39k forks source link

[Feature] Replace Aria2 with `wget` or `xh` #5649

Open FlawlessCasual17 opened 11 months ago

FlawlessCasual17 commented 11 months ago

Feature Request

Is your feature request related to a problem? Please describe.

None.

Describe the solution you'd like

The port of aria2 for Windows is full of bugs, such as not being able to download from a specific URL (ex. https://update.code.visualstudio.com/1.82.2/win32-x64-archive/stable). And even with working URLs such as those beginning with https://github.com/, they still will sometimes cause aria2 to experience an error, with an error message such as, “ERROR 404”.

My solution is to drop support for aria2, and replace it with either GNU wget, or ducaale's xh. While xh is primarily used for HTTPS REST API requests, it can also be used as an excellent command-line download utility, just like wget.

Describe alternatives you've considered

curl could also be used as-well, if wget or xh don't work out well for Scoop.

FlawlessCasual17 commented 11 months ago

Wget Benchmarks: (WindowsTerminal)V051w1_09-16-2023 (WindowsTerminal)r2p1k9_09-16-2023

xh Benchmarks: (WindowsTerminal)v6u3X6_09-16-2023 (WindowsTerminal)m6F3b8_09-16-2023

The following URLs were used for the download test, http://ipv4.download.thinkbroadband.com/512MB.zip http://ipv4.download.thinkbroadband.com/1GB.zip

rashil2000 commented 11 months ago

Do wget or xh support multi-connection downloads (and other useful options as listed on https://github.com/ScoopInstaller/Scoop/tree/develop#multi-connection-downloads-with-aria2)?

Multi-connection downloads is the primary use case of aria2.

examosa commented 11 months ago

How about pget?

rashil2000 commented 11 months ago

Does it have the corresponding CLI flags?

kieronlanning commented 11 months ago

I've had nothing but issues using the aria2 download for a week or two now. Just disabled it, and while slower downloads are consistently working again.

jwhipp commented 10 months ago

I want to +1 this... Earlier today, scoop just started randomly failing to download things for no apparent reason. Found this issue, disabled aria2 and boom, everything works fine, albeit a touch slower. While I think swapping to a different downloader could work, I think it's at least worth while to not make aria2 a default.

niheaven commented 10 months ago

This is under development, and pget has some release pkg names bug now...lol

HUMORCE commented 10 months ago

Introducing more download methods to resolve download issues causes more download issues to arise.

kieronlanning commented 9 months ago

I noticed aria2 was updated a few days ago (after running scoop update *), I re-enabled it and so far it seems stable... no download failures to date.

mwisnicki commented 6 months ago

Unfortunately aria2c keeps failing.

I suggest using curl since it's likely already installed on most machines (via Git for Windows in C:\Program Files\Git\mingw64\bin\curl.exe not the one in C:\Windows\System32\curl.exe) and is widely tested and known to work.

mwisnicki commented 6 months ago

Actually the curl installed by Windows probably works too.

mwisnicki commented 6 months ago

I tested http://ipv4.download.thinkbroadband.com/1GB.zip with Windows built-in curl, wget and aria2c and it was 31s in every case.

sbstn87 commented 2 months ago

Downloading with aria2c failed for me as well. This seems to be a popular issue:

https://github.com/aria2/aria2/issues/774

As you can see, it can be solved by adding this option: --async-dns=false

Perhaps it could be set as a default in Scoop?