github AnInsomniacy/aria2-next v3.0.0
v3.0.0 - Rewritten Engine Core with Major Speedups

7 hours ago

Summary

Aria2 Next 3.0.0 rebuilds the engine on a new core and brings the largest performance gains in the project's history. The event loop inherited from aria2 is replaced by Boost.Asio, libcurl, Boost.Beast, libtorrent and SQLite, with about a quarter of the previous code. In side-by-side tests against 2.8.6, multi-mirror Metalink downloads finish about 20× faster, ED2K downloads about 6× faster and torrents with web seeds about 2× faster, while HTTP downloads need 2–4× less CPU time and less memory. Servers that limit, reject or misreport requests, which made 2.8.6 fail or slow to a single connection, no longer stop a download. Command line, configuration files, sessions and JSON-RPC stay aria2-compatible, tasks saved by 2.8.x resume with their progress, and release assets cover the same seven platforms as before.

Breaking Changes

  • The XML-RPC and JSONP endpoints are gone; aria2 JSON-RPC over HTTP and WebSocket remains, including system.multicall, notifications and the token secret.
  • RPC over TLS is no longer served. --rpc-secure, --rpc-certificate and --rpc-private-key are ignored with a warning, so a setup that relied on them now serves plain HTTP; put a TLS reverse proxy in front of the RPC port instead.
  • About 60 tuning options of the old core are retired, mostly low-level BitTorrent knobs (disk cache, send buffers, choking algorithms, peer turnover) and --disk-cache, --enable-mmap, --event-poll. Retired options in command lines, configuration files and RPC calls are accepted and skipped with one warning; options with a successor (--bt-require-crypto, --auto-save-interval, --stream-max-connections) are mapped to it. Unknown options are still errors.
  • Metalink 3 is no longer read; Metalink 4 (.meta4) is.

Performance

Both versions were measured on the same machine and network; every downloaded file was verified.

Real downloads over the public internet:

Download Size 3.0.0 vs 2.8.6
openSUSE image from a Metalink with several mirrors 261 MiB about 20× faster
eMule installer over ED2K 3.2 MiB about 6× faster
Sintel torrent with a web seed 123 MiB about 2× faster; first data about 10× sooner
Linux kernel tarball from kernel.org 149 MiB about 1.8× faster
HLS and DASH streams 4 cases all complete; 2.8.6 failed 3

On a fast single server (GitHub, large mirror sites) throughput is on par with 2.8.6 at 2–4× less CPU time.

Local origin with fault injection, using the bench tools in tools/bench:

Scenario 3.0.0 vs 2.8.6
Server allows only 4 connections and answers 503 or 429 completes at the server's limit; 2.8.6 fails the task
One response with a wrong Content-Range about 14× faster; 2.8.6 drops to a single connection
Per-connection bandwidth that keeps changing about 5× faster
High latency with jitter about 2× faster
Connections that open but never send data completes quickly; 2.8.6 stalls and does not finish
Unlimited loopback transfer about 1.6× the throughput
Steady download about 10× less CPU time, about 40% less peak memory

Added

  • aria2.probe RPC method: requests the first byte of an HTTP(S) URL with a task's request settings and answers status, final URL, content type, file name, size and range support. Rayburst uses it to decide whether it can take over a download the browser started.
  • Media: download a time range with --media-start-time and --media-end-time, and choose tracks with --media-video, --media-audio and --media-subtitles. Sites that stream video and audio as separate single-file tracks are inspected by content and offered as selectable tracks.
  • --dns-over-https resolves host names through a DNS-over-HTTPS URL.
  • --ed2k-port-mapping forwards the ED2K ports through UPnP IGD, changeable at runtime.
  • Metalink 4 <pieces> hashes are used: when the whole-file hash fails, only the failing pieces are fetched again.
  • --load-cookies accepts Firefox's cookies.sqlite (#60).
  • Android release builds run on Android 7.0 (API 24) and later (#59).

Changed

  • HTTP: segments are split by connection speed; finished connections take over neighbouring ranges, and the last ranges are raced when a fresh connection would finish first. A first request that stays unanswered is sent again, and the first answer wins.
  • HTTP: 429 and 503 slow down the affected server or Metalink mirror instead of failing the task. Each Metalink mirror keeps its own validator, and a mirror serving another length or ignoring ranges is dropped while others remain.
  • Connections that open but never deliver data are replaced, and slow last segments are split down to what a new connection can still win.
  • Happy Eyeballs picks the address family; a family is pinned only after it has carried a response, and the other family is tried once. Networks with IPv6 addresses but no IPv6 route no longer wait out the connect timeout.
  • BitTorrent runs on libtorrent 2.1 with qBittorrent's defaults. Status, speed and progress update twice as often, and shutdown no longer waits on a silent NAT-PMP gateway.
  • ED2K is rewritten with aMule as the behavioural reference and checked against aMule on the wire, including compressed and obfuscated transfers, Kad and server search.
  • HLS/DASH segments download in parallel (#63); invoked as aria2c, the engine writes media to a file (#62).
  • Resume data is saved more often and slow connections flush their buffers regularly, so a killed engine loses little progress.
  • Speed limits are accurate: a limited download now reaches the configured rate instead of about half of it.
  • An RPC request over --rpc-max-request-size is answered with 413 instead of a dropped connection.
  • A download whose URL has no file extension takes the one its Content-Type implies, as browsers do.

Fixed

  • A server that announces one length and sends more (seen with gh-proxy) no longer leaves a truncated file reported as complete; the file is fetched again in one stream.
  • RPC replies are always valid UTF-8; a Windows error message in the system code page no longer breaks tellActive and similar calls.
  • Two unfinished downloads can no longer write into the same output file.
  • Concurrent media tasks no longer fail with "database is locked".
  • Refused or unreachable connections fail at once on Windows instead of waiting for the connect timeout.
  • A crash at the end of some HTTP downloads.
  • BitTorrent web seeds and HTTPS trackers work on networks that drop post-quantum TLS handshakes (web seeds now start almost immediately instead of stalling); a fast download now sends aria2.onBtDownloadComplete; seeding status is reported once the selected files are complete.
  • HLS: packed audio (AC-3/AAC with ID3) is no longer out of sync, a time range ends at its end time, boundary audio frames are kept once, and timestamps are made monotonic before muxing (#61). DASH: SegmentBase, hierarchical sidx and multi-period ranges download correctly.
  • A server that compresses a response nobody asked to compress no longer leaves gzip bytes on disk.

Downloads

Platform Download
Linux x86_64 aria2-next-3.0.0-linux-x86_64
Linux ARM64 aria2-next-3.0.0-linux-aarch64
macOS Apple Silicon aria2-next-3.0.0-macos-arm64
macOS Intel aria2-next-3.0.0-macos-x86_64
Windows x86_64 aria2-next-3.0.0-windows-x86_64.exe
Windows ARM64 aria2-next-3.0.0-windows-arm64.exe
Android ARM64 aria2-next-3.0.0-android-arm64
Checksums aria2-next-3.0.0-checksums.sha256

Full changelog: v2.8.6...v3.0.0

Don't miss a new aria2-next release

NewReleases is sending notifications on new releases.