aria2 / aria2

aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
https://aria2.github.io/
GNU General Public License v2.0
33.95k stars 3.43k forks source link

Aria2c should fallback and try again if IPv4/IPv6 fails (depending on which is first/preferred) #2158

Open shinji257 opened 5 months ago

shinji257 commented 5 months ago

On some networks they may have IPv6 (or IPv4) networks with is local only and no internet. Aria2c seems to sometimes (I'll say this for now) picks this up as default and doesn't fallback to the other addresses. At the very least it doesn't do that for network unreachable instances.

Please note that sometimes it gets the IPv4 address and sometimes it gets IPv6. When it does the latter it just fails spectacularly even though IPv4 would have worked perfectly fine.

Here is a failed attempt. Command Line: C:\Users\shinj\scoop\apps\aria2\current\aria2c.exe https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-windows.zip -l ./out.log

Log: https://gist.github.com/shinji257/727ac4daa1a9cef6057e17c24fc6dcc4

EDIT: I know you can use --disable-ipv6 but that's more of a thing to use if you get slow fail. In my case it is a fast fail (because network unreachable) and regardless most programs (in my experience) usually try again on the other protocol when one fails and the other is still there.