Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel download via a .torrent URL and a HTTP URL (with --follow-torrent) is not possible #2212

Open
intelfx opened this issue May 16, 2024 · 0 comments

Comments

@intelfx
Copy link

intelfx commented May 16, 2024

Suppose I want to download a file that is available both via BitTorrent and on a regular HTTP mirror, taking advantage of multiple connections:

If I first download the .torrent file and then feed it into aria2c together with the HTTP mirror, the download will happen in parallel:

$ aria2c --follow-torrent=false -q 'https://releases.ubuntu.com/24.04/ubuntu-24.04-desktop-amd64.iso.torrent'

$ aria2c -T ubuntu-24.04-desktop-amd64.iso.torrent 'https://releases.ubuntu.com/24.04/ubuntu-24.04-desktop-amd64.iso'

05/16 04:00:00 [NOTICE] Downloading 1 item(s)

05/16 04:00:00 [NOTICE] IPv4 DHT: listening on UDP port 6952

05/16 04:00:00 [NOTICE] IPv4 BitTorrent: listening on TCP port 6932

05/16 04:00:00 [NOTICE] IPv6 BitTorrent: listening on TCP port 6932
[#82e553 2.8MiB/5.6GiB(0%) CN:2 SD:0 DL:661KiB ETA:2h30m28s]

However, if I try to directly start a download against the .torrent URL and a regular HTTP URL using --follow-torrent, then aria2c seemingly loses the ability to use multiple connections:

$ aria2c --follow-torrent=true 'https://releases.ubuntu.com/24.04/ubuntu-24.04-desktop-amd64.iso.torrent' 'https://releases.ubuntu.com/24.04/ubuntu-24.04-desktop-amd64.iso'

05/16 04:05:55 [NOTICE] Downloading 1 item(s)
[#5899be 64KiB/455KiB(14%) CN:1 DL:154KiB ETA:2s]
05/16 04:05:56 [NOTICE] Download complete: /home/intelfx/tmp/big/tmp-2024-05-16T03:44:01+02:00/ubuntu-24.04-desktop-amd64.iso.torrent

05/16 04:05:56 [NOTICE] IPv4 DHT: listening on UDP port 6893

05/16 04:05:56 [NOTICE] IPv4 BitTorrent: listening on TCP port 6933

05/16 04:05:56 [NOTICE] IPv6 BitTorrent: listening on TCP port 6933
[#060d31 256KiB/5.6GiB(0%) CN:1 SD:0 DL:193KiB ETA:8h34m41s]

It can also be corroborated via lsof that in the latter case, aria2c does not keep an open connection to the HTTP mirror.

@intelfx intelfx changed the title Parallel download via a torrent link and a HTTP link is not possible Parallel download via a .torrent URL and a HTTP URL (with --follow-torrent) is not possible May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant