aria2 Changelog

What's new in aria2 1.37.0

Nov 15, 2023
  • Fix header in --http-accept-gzip documentation by @richardnias in #1824
  • Fix typo in documentation, --help text by @h3xx in #1877
  • Update aria2c.rst by @ITriskTI in #1902
  • Allow empty dist name in bencode which is needed for hybrid torrent by @tatsuhiro-t in #1905
  • Better entropy for getRandomBytes by @tatsuhiro-t in #1907
  • Deal with missing nproc on macos by @tatsuhiro-t in #1924
  • Bump actions by @tatsuhiro-t in #1923
  • Bump workflow ubuntu by @tatsuhiro-t in #1929
  • Add missing include to WinTLSSession.h by @hmartinez82 in #1943
  • Fix undefined behavior/crash in GZipEncoder by @himikof in #1970
  • Fix Metalink4 parsing with foreign namespaces by @himikof in #1969
  • fix wrong dht.dat binary file structure in docs by @yixinBC in #2068
  • Increase ByteArrayDiskWriter maximum size by @kelson42 in #1893
  • Minor grammar improvements by @nkh0472 in #1804
  • Fix static link failure against libssh2 by @tatsuhiro-t in #2088
  • Update Dockerfile.mingw by @tatsuhiro-t in #2089
  • Prefer random number generator from crypto libraries by @tatsuhiro-t in #2091
  • android(ndk r23) has timegm by @FH0 in #1822
  • Add Dockerfile.android by @tatsuhiro-t in #2092
  • Remove deprecated std::unary_function and std::binary_function by @tatsuhiro-t in #2093
  • Update wslay by @tatsuhiro-t in #2094
  • Fix test errors with ubsan by @tatsuhiro-t in #2095
  • ci: Build with gnutls by @tatsuhiro-t in #2096
  • ci: Build mingw image by @tatsuhiro-t in #2097
  • Revert "ci: Build mingw image" by @tatsuhiro-t in #2098
  • Fix overflow by @tatsuhiro-t in #2099
  • Make releases with docker by @tatsuhiro-t in #2100
  • Dockerfile.mingw: Parallel build by @tatsuhiro-t in #2101
  • Dockerfile.android: Add dpkg-dev for dpkg-architecture by @tatsuhiro-t in #2102
  • Dockerfile.mingw: Remove deprecated libssh2 configure flags by @tatsuhiro-t in #2103
  • Dockerfile.mingw: Update how to get aria2c.exe from a container by @tatsuhiro-t in #2104
  • Update sphinx_rtd_theme by @tatsuhiro-t in #2105
  • Static check fix by @tatsuhiro-t in #2106
  • Do not close stdout and stderr by @tatsuhiro-t in #2107
  • Avoid non-nil argument errors by @tatsuhiro-t in #2108
  • Logger: Fix format string overflow in writeHeader() by @egorenar in #2117
  • ci: Bump gcc and clang by @tatsuhiro-t in #2125
  • Do not require strict C++ mode and update ax_cxx_compile_stdcxx.m4 by @tatsuhiro-t in #2126
  • Cap infoHashLength in .aria2 file by @tatsuhiro-t in #2127
  • Fix non bt build error by @tatsuhiro-t in #2129
  • Various documenation fixes and rewords by @h3xx in #1982
  • Change 'meta data' to 'metadata' by @h3xx in #1983
  • Dockerfile: Bump c-ares to 1.21.0 by @tatsuhiro-t in #2132
  • Dockerfile.mingw: Downgrade c-ares to 1.19.1 by @tatsuhiro-t in #2135

New in aria2 1.36.0 (Aug 21, 2021)

  • Update wslay
  • Bump Windows build dependencies
  • Bump android build dependencies
  • Fix segfault when time_t is 64bit on 32bit arch
  • Patch from Natanael Copa
  • Updates the make_bash_completion script to Python3.
  • Patch from sleepymac
  • Prevent corrupt downloads after app and/or system crash
  • Patch from Ali MJ Al-Nasrawy
  • Reset sessionDownloadLength and sessionUploadLength on download start
  • AppleTLS: Add TLSv1.3 support

New in aria2 1.35.0 (Oct 6, 2019)

  • Update mingw build dependencies
  • GH-1469
  • Update android build dependencies
  • Update android build dependencies. Use android NDK r20 and build
  • aarch64 binary.
  • GH-1467
  • Drop SSLv3.0 and TLSv1.0 and add TLSv1.3
  • TLSv1.3 support is added for GNUTLS and OpenSSL.
  • GH-1385
  • Platform: Fix compilation without deprecated OpenSSL APIs
  • Patch from Rosen Penev
  • GH-1315
  • Remove linux getrandom and use C++ stdlib instead
  • GH-1306
  • Don't send Accept Metalink header if Metalink is disabled
  • GH-1300
  • gnutls: Fix bug that commonName is always empty
  • GH-1214
  • Fix openssl API version logic for libressl 2.7.x
  • Patch from Ben Chaney
  • GH-1213
  • Fix build failure when InternalDHKeyExchange is used

New in aria2 1.34.0 (May 15, 2018)

  • Changes:
  • mingw: Use SetFileTime to avoid DST adjustment
  • UnknownLengthPieceStorage: return piece length - show something in console status when downloading items with unknown content length
  • WinConsoleFile: fix colour properly
  • util: also detect xdg_* env variables on windows so if people like to keep FHS they could define XDG_* for it
  • Fix bug that signal handler does not work with libaria2. This commit fixes the bug that signal handler does not work with libaria2 when aria2::RUN_ONCE is passed to aria2::run().
  • Retry on HTTP 502

New in aria2 1.33.1 (Nov 8, 2017)

  • mingw: Fix high CPU usage in BitTorrent downloads
  • This commit fixes high CPU usage in BitTorrent downloads. Only mingw build is affected by this bug.
  • Thank you kwkam for identifying the cause of the issue, and helping debugging this patch.

New in aria2 1.33.0 (Oct 18, 2017)

  • CHANGES:
  • Include arm in a filename of android zip
  • Upgrade base image of Dockerfile.mingw to ubuntu:16.04
  • wintls: Potential fix for undecrypted read
  • libaria2: Return last error code from DownloadHandle::getErrorCode
  • Windows: pass writefds also as exceptfds to select()
  • winsock notifies connect() failures on exceptfds instead of
  • writefds.
  • libuv: use pkg-config
  • FeatureConfig: align text
  • Update Dockerfile.mingw
  • avoid docker cache when using git
  • Patch from qweaszxcdf
  • Add --peer-agent option
  • Add --peer-agent for setting the version/user agent used in the
  • extended handshake protocol for bittorrent.
  • Patch from Kurt Kartaltepe
  • OSX: Allow to specify a build
  • OSX: update c-ares
  • [Docs, libaria2] Fix type of obj pushed into options vector
  • aria::KeyVals is a vector of pair of std strings, therefore the type
  • of object being pushed should be std::pair<std::string,
  • std::string>, however in the docs, the type of the said object is
  • KeyVals. If one follows the docs, their code will fail to compile.
  • Patch from geetam
  • AppleTLS: Silence cipher suite selection
  • Unbreak build OSX build
  • Update macOS versions
  • Add --bt-load-saved-metadata option
  • Before getting torrent metadata from DHT when downloading with
  • magnet link, first try to read file saved by --bt-save-metadata
  • option. If it is successful, then skip downloading metadata from
  • DHT. By default, this feature is turned off.
  • Fix regression in bfc54d0
  • Don't save control file if --auto-save-interval is 0.
  • Fix infinite loop bug when file is not found

New in aria2 1.32.0 (May 18, 2017)

  • Changes:
  • Clarify --max-concurrent-downloads option
  • Fix compile error with toolchain which lacks IPV6_TCLASS
  • Log directed URI in notice log level
  • Fix typo
  • Patch from Tse Kit Yam
  • Spelling fixes
  • Patch from klemens
  • Remove unused Android parts
  • These parts where unused after merging
  • Patch from Fredrik Fornwall
  • Save control file early
  • Update links in Dockerfile.raspberrypi
  • Some links used in Dockerfile.raspberrypi are not accessible anymore, because they were pointing to old versions of some source packages and new versions were released. This commit fixes this by changing the links to point to the newest versions.
  • Patch from Michal Lesniewski
  • Propagate disk full error on pre-allocation to last error code

New in aria2 1.31.0 (Jan 18, 2017)

  • CHANGES:
  • Better error message when local file status cannot be retrieved
  • Fix assertion failure in SimpleRandomizer::getRandomBytes
  • errno might not be initialized to 0, and we may get both rv == -1 and errno != ENOSYS. This leads to assertion failure. Since getrandom_linux always returns -1 on failure, checking errno is useless in this function.
  • Add option content-disposition-default-utf8
  • Patch from JimmyZ

New in aria2 1.30.0 (Dec 23, 2016)

  • CHANGES:
  • mingw: Use sqlite 3.15.2
  • Fix bug that --disable-websocket causes build error
  • Fix bug that lower bound of optimize-concurrent-downloads becomes 1
  • Print DHT nodes with -S option
  • Take into account address family when resolving DHT node address
  • Allow block device file to -i option
  • Expand ${HOME} to user's home directory in several options
  • The following options implement this substitution:
  • --ca-certificate
  • --certificate
  • --dht-file-path
  • --dht-file-path6
  • --dir
  • --input-file
  • --load-cookies
  • --log
  • --metalink-file
  • --netrc-path
  • --on-bt-download-complete
  • --on-download-complete
  • --on-download-error
  • --on-download-start
  • --on-download-stop
  • --on-download_pause
  • --out
  • --private-key
  • --rpc-certificate
  • --rpc-private-key
  • --save-cookies
  • --save-session
  • --server-stat-if
  • --server-stat-of
  • --torrent-file
  • Document that libaria2 is not thread safe
  • configure: Use pkg-config to find libs whenever possible
  • Use pkg-config to find cppunit, libxml2 and expat. All those libraries provide pkg-config files, and in all of those cases the pkg-config macro is superior to the custom macros used currently.
  • The advantages of pkg-config files include:
  • Explicit static linking support via --static. Currently, e.g. xml2-config --libs' prints all libraries needed for static linking when doing dynamic linking unnecessary, resulting in unnecessary direct deps.
  • Better cross-build support. You don't have to build the additional *-config tools for target.
  • Better multilib support. Per-ABI pkgconfig directories are commonly supported while packages usually fail to look for per-CHOST *-config variants.
  • Better override support. The current macros allow little to no result overrides, the pkg-config macros let you pass FOO_CFLAGS and FOO_LIBS manually.
  • Cleaner version checks. The code used in libxml.m4 is really creepy.
  • Patch from Michał Górny
  • WinTLS: Rewrite writeData
  • We re-wrote WinTLSSession::writeData. The major points are:
  • Buffer is now preallocated once handshake is finished. Previously, they are allocated each time when we send one TLS record.
  • Schannel uses header, body and trailer for each secBuffer. Now we send them off at once using WSASend which is windows counterpart of sendv. Previously, we do memmove if some of them are truncated.
  • We don't try to send application data in WinTLSSession::closeConnection, since semantically we need same application data used to create TLS record before. Using 0 length data to finish sending buffered data looks like a hack.

New in aria2 1.29.0 (Nov 16, 2016)

  • CHANGES:
  • WinTLS: Fix busy loop on write error
  • Support 1xx non-final response
  • Update wslay
  • Don't download piece which is filtered out (e.g., --select-file)
  • This commit fixes the bug that piece which is not requested by --select-file is downloaded in multi-file Web-Seeding.

New in aria2 1.28.0 (Oct 19, 2016)

  • This release fixes the bug that file name is not logged with
  • --conditional-get option is used. The new option
  • --keep-unfinished-download-result was added to keep incomplete
  • downloads in memory regardless of --max-download-result so that we can
  • save those downloads with --save-session option. This option is
  • enabled by default.
  • Changes:
  • Restore LTLIBINTL in src/Makefile.am
  • Patch from Juan Francisco Cantero Hurtado
  • Add --keep-unfinished-download-result option
  • This option keeps unfinished download results even if doing so
  • exceeds --max-download-result. This is useful if all unfinished
  • downloads must be saved in session file (see --save-session option).
  • Please keep in mind that there is no upper bound to the number of
  • unfinished download result to keep. This option is enabled by
  • default.
  • Fix -Wexpansion-to-defined warning with clang-3.9 The error message was: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
  • Fix bug that file name is not logged with --conditional-get
  • GH-742

New in aria2 1.27.1 Build 1 (Sep 17, 2016)

  • Add missing libssl_compat.h to SRCS

New in aria2 1.26.1 Build 1 (Aug 29, 2016)

  • Changes:
  • Make assertion hold
  • If we have peer which is already used, make addAndCheckoutPeer() fail. If peer is in unused list, first remove the old entry, and then add new one. This would make assertion in ~DefaultPeerStorage hold.

New in aria2 1.26.0 Build 1 (Aug 22, 2016)

  • aria2mon: Replace client.call with local method
  • Patch from Florian Gamböck
  • Reorder a note section in aria2c.rst
  • Patch from Artur Petrov
  • bash_completion: Add missing options which takes one of pre-defined
  • values
  • Replace "/" with "-" in magnet dn name when used as in-memory
  • download name
  • Fix Dockerfile.raspberrypi to correctly decompress expat archive
  • Patch from Char
  • Enable ccache in travis-ci
  • Speeds up the build most of the time.
  • Closes GH-710
  • Enable OSX/macOS build for travis
  • Better auto-renaming
  • Up until now aria2 file auto renaming worked by just appending a new unique number to the file path, behind the file name extension, if any, changing what most other programs consider the file extension in the process. Now, aria2 will attempt to insert the number before the file extension, leaving the extension intact, so that e.g. a".jpg" still is a ".jpg" file and opens in your configured image viewer when clicking it. If a file has no extension (incl. so called "dot files"), the number will be appended to the file name as usual.
  • This is a potentially breaking change that might break third party scripts that rely on aria2 auto file renaming producing a certain format for renamed files. Please fix your scripts accordingly.
  • Log number of items loaded from input file
  • Link external libraries to libaria2 with --enable-libaria2
  • Allow seconds for seed-time (fractional minutes)
  • Patch from Sébastien Cabaniols

New in aria2 1.25.0 Build 1 (Jul 16, 2016)

  • Update third-party libraries for binary releases
  • Send have message without too much delay
  • Also send bitfield rather than have messages if bitfield message is equal to or less than the sum of have messages which otherwise would be sent.
  • Fix bug that causes bogus EOF connection failure in BitTorrent downloads
  • Fix frequent interested/not interested message transmission
  • Fix frequent choke/unchoke message transmission
  • Try to use available URI if all pooled requests are sleeping
  • aria2mon: Add --secret option
  • Set server status error on network failure in server performance profile
  • Disable AI_ADDRCONFIG if no IPv4/IPv6 address is configured for any interface
  • Russian manual: Update aria2c.rst
  • Patch from ITriskTI
  • Apply --retry-wait on 503 only
  • Ensure that lowest speed check is done even when download speed is 0
  • Document that -o is always relative to -d option
  • Allow larger ut_metadata size
  • mingw: Change FD_SETSIZE to 32768
  • Fix compile error on OS X

New in aria2 1.24.0 Build 1 (Jun 17, 2016)

  • CHANGES:
  • BitTorrent: Allow 32KiB request
  • It looks like the 32KiB is the default request size of python bittorrent client. Previously, aria2 only allowed maximum 16KiB request.
  • Don't unchoke peer which is not interested in us
  • Fix bug that evaluation of Peer::amChoking is negated
  • Faster seed/download on fast connection
  • Increase DHT task concurrency to 15
  • Fixed mmap failure check with MAP_FAILED flag
  • Patch from suzker
  • Added file size overflow check for mmap on 32bit os
  • Patch from suzker
  • Use standard percent-encode for tracker request query
  • mingw32: Gain privilege before opening files
  • Restart active download to apply previously not applicable options
  • Previously, we categorized options that can be used in aria2.changeOption RPC method into 2 categories. The options in one category can be applied on the fly, meaning that download continues to be active while applying options. Another category includes options which are only applicable when downloads are waiting or paused.
  • In this change, when active download is ordered to change options which only applicable in waiting or paused state, it is now paused, and then automatically restarted. Although we have limited number of download concurrency, the pause and restart is done atomically, and the download is inserted at the front of the queue, it is picked up immediately if the concurrency regulation allows.

New in aria2 1.23.0 Build 1 (May 17, 2016)

  • Changes:
  • Simplify cache write
  • The previous cache write routine was too complex. I'm sure I can rewrite it to more elegantly. But the primary motivation of this complex logic is for disk activity reduction on Windows 7, and I observed it on my old IDE disk. I checked it again recently, and there is no difference between with and without this complex logic.
  • For this reason, it was removed. Will revert this change if many of users are not happy with this.
  • Allow subsecond value in ns cookie.txt file's expiry time field
  • Fixes GH-655
  • Adjust chromium cookie time
  • import-po: iterate on glob, not ls output
  • Patch from Mingye Wang
  • Add --stderr option to redirect all stdout log output to stderr
  • Fixes GH-638
  • Add "hide" to --download-result option
  • Fixes GH-639
  • Fix downloaded metaurl torrent filename
  • Add a little bit of color to have a better visual of important informations
  • Patch from rotor
  • Update README URLs based on HTTP redirects
  • Patch from ReadmeCritic
  • Fixes GH-602
  • mingw: Defer the falloc warning until falloc is specified by option
  • Fixes GH-594
  • Add bittorren key to aria2.tellStopped status
  • Fixes GH-612
  • Addsystem.listNotifications RPC method
  • Merges GH-620
  • Patch from Sonny Piers
  • Report CheckIntegrity info in tellStatus
  • Adds verifiedLength to tellStatus. Reports the length of data that has been verified of the current RequestGroup being verified.
  • Adds verifyPending to tellStatus. Reports if the RequestGroup has a verification of integrity pending.
  • Closes GH-561
  • Patch from Kurt Kartaltepe

New in aria2 1.22.0 Build 1 (Apr 16, 2016)

  • Changes:
  • Add description about possible fragmentation with
  • file-allocation=trunc
  • Make single-entry metalink download with multi-file torrent work
  • Add all contributor's names in AUTHORS
  • Ignore floating number in torrent file
  • Added support for a dynamic management of the number of concurrent
  • downloads as a function of the overall bandwidth observed
  • This change adds --optimize-concurrent-downloads option.
  • Patch from oliviercommelarbre

New in aria2 1.21.0 Build 1 (Mar 17, 2016)

  • SessionSerializer: Fix bug that pause=true is added to wrong item
  • This change also defers writing metadata download to the location where first its follower download is written.
  • Add "following" to aria2.tellStatus response key as reverse link for followedBy
  • mingw: Add warning for falloc
  • Update ciphers in AppleTLS
  • Also enable fast start while at it
  • OSX: Enable libssh2 and sftp
  • Closes GH-468
  • Update OSX dependencies
  • Closes GH-466
  • Fix compile error without TLS support
  • Add support for using gnutls system wide crypto policy
  • Patch from Athmane Madjoudj

New in aria2 1.20.0 Build 1 (Feb 15, 2016)

  • This release fixes lots of bugs. See the Changes section below.
  • There are new features in this release. We added "seeder" key in
  • aria2.tellStatus RPC response. We added system.listMethods RPC method
  • to return all RPC method supported. We added --max-mmap-limit option
  • to avoid mmap if total file size is greater than given size.
  • Changes:
  • src/WinConsoleFile.cc: fix colour
  • Set default foreground/background colour correctly
  • Patch from kwkam
  • configure.ac: fix autoreconf error
  • Use m4_ifdef so we do not have to install optional libraries
  • Patch from kwkam
  • Don't inherit file descriptor to child process
  • For non-Mingw32 build, set FD_CLOEXEC to file descriptors which live beyond function scope. For Mingw32 build, just pass false to bInheritHandles parameter of CreateProcessW.
  • Update Russian version documentation
  • Patch from ITriskTI
  • Add "seeder" key to tellStatus RPC response
  • WinTLS: Fix hang because of buffered received data
  • WinTLSSession buffers received decrypted data into its own buffer.
  • If read is requested, it copies the data from its buffer. But if requested buffer size is less than decrypted buffer, some of the data is left in the buffer. Previously, we had no facility to check the existence of this pending data. If this data is the last requested data from remote server, we may end up waiting for read event even if we have already data in our buffer, which may cause hang. This commit fixes this issue by introducing function to return the buffered length in TLSSession. SocketCore also provides the same function, which delegates to TLSSession object.
  • Add --max-mmap-limit option
  • Set the maximum file size to enable mmap (see --enable-mmap option). The file size is determined by the sum of all files contained in one download. For example, if a download contains 5 files, then file size is the total size of those files. If file size is strictly greater than the size specified in this option, mmap will be disabled.
  • mingw: Use SetFileValidData to make --file-allocation=falloc work
  • Retry with 504 status code
  • Increase DHT transaction ID from 2 to 4 bytes to avoid conflict
  • Update wslay
  • Add --enable-werror option to configure to enable warning flags
  • Don't modify user variables (e.g., CFLAGS, LIBS, etc)
  • Improve error message when loading pkcs12 file failed
  • Updated dependency and source url's
  • The RaspberryPi Dockerfile had some out-of-date dependency packages and was downloading an outdated aria2 source from Sourceforge, which resulted in a build for version 1.19.0. The new fetch-latest-release-from-GitHub script I've cooked up should always work as long as GitHub doesn't change their API and aria2's platform agnostic releases follow the "{version number}.tar.bz2" naming format.
  • Patch from c3mb0
  • Reduce delay in tracker request
  • We eliminated 1 second delay between completion of name resolution for tracker request and time when it is actually issued. We also elimited 1 second delay after last torrent download exists and it is told to DHTInteractionCommand.
  • Disable IPv6 on non-async NameResolver if configuration wants
  • Fix mysterious 1 second delay with async DNS
  • Fix bug that UDP port was incorrectly used in UDP tracker announce request
  • Refactor HttpRequest
  • This also makes comparison performed when replacing builtin header field with user-defined one case-insensitive.
  • Send Want-Digest as per RFC 3230
  • Try all found address set to bind sockets with --multiple-interface
  • Fixes GH-523
  • Replace sourceforge references with aria2.github.io
  • Add system.listMethods RPC method
  • system.listMethods just returns the available RPC method names. It can be executed without secret token, because it just returns the method names, and does not alter anything.
  • Support content-range from non-compliant server
  • Reduce UDP tracker request timeout
  • Apply --retry-wait when retrying after 404
  • Previously, --retry-wait was not used when retrying after 404 (--max-file-not-found). The retry was done without delay. Also the maximum retry count (--max-retries) was ignored when retrying with 404.
  • This commit makes --retry-wait apply for retrying with 404 as well. It also combines --max-retries and --max-file-not-found. When retrying with 404, it is counted toward retry count.

New in aria2 1.19.3 Build 1 (Dec 9, 2015)

  • Changes
  • Fix bug that pause/unpause seeding torrent prevents new downloads from starting
  • Previously, with --bt-detach-seed-only, when user issued pause and unpause command to seeding torrent, and it was started again, and it immediately got seeding status, but aria2 did not start new download waiting in the queue. This commit fixes this bug.
  • Add --bt-enable-hook-after-hash-check option
  • This option sets flag which allows hook command invocation after hash check (see -V option) in BitTorrent download. By default, when hash check succeeds, the command given by --on-bt-download-complete is executed. To disable this action, give false to this option.
  • Add --socket-recv-buffer-size option
  • Set the maximum socket receive buffer in bytes. Specifing 0 will disable this option. This value will be set to socket file descriptor using SO_RCVBUF socket option with setsockopt() call.
  • Disable --deferred-input when --save-session is used together
  • With --deferred-input=true, aria2 only reads input file to fill active download slots, while keeping input file open. Meanwhile, --save-session saves all download info inside memory, but this does not take into account of unread item in input file. This will lead to lose input data in saved session file. Also current BufferedFile implementation used to read/write input/output file take a lock on Windows. This effectively prevents session serializer from writing session data to the same file which is still kept open because of --deferred-input. See GH-493
  • base32: decode lowercased characters as well
  • This fixes the bug that magnet URI with lowercased btih is treated as malformed.
  • mingw: Use GetFileSize to get file size
  • _wstat family does not work with symbolic links. They always returns size 0. To workaround this, we now use GetFileSize to get file size. To do that, we need to first obtain file HANDLE, which is a bit tedious because of the messy interface of CreateFileW, but we have no way to get around it.
  • Fix bug that file allocation=trunc does not work with Windows symlink
  • Send the last error message as part of tellStatus RPC response
  • Patch from Jarda Snajdr
  • Don't enable mmap if file allocation is disabled
  • Without file allocation, we cannot map file because file length could be zero.
  • This could fix bug reported at GH-478
  • Evict timed out pooled socket periodically
  • Previously we only scanned pool socket to check they are timed out when we pooled another socket. This means that pooled socket is not closed long time (stays in CLOSE-WAIT state) if we don't pool any more socket. In this commit, we now check pooled socket periodically (30 seconds) to avoid the sockets hanging in CLOSE-WAIT state long time.
  • Don't write control file if content is not changed from previous one
  • This is desirable so that we don't have to wake up disk if control file is not changed, and it is not have to be written again. We use the same method (SHA1 hash) to check the content is the same. The limitation is the hash is stored in memory, so we have to write the first time in each session.
  • Remove content-length and content-range if transfer-encoding is given
  • Retry after 404 status if --max-file-not-found > 0

New in aria2 1.19.2 Build 1 (Nov 5, 2015)

  • Changes:
  • Fix bug that progress summary is not shown timely

New in aria2 1.19.1 Build 1 (Nov 5, 2015)

  • Changes:
  • Update README.android
  • Providing some workarounds about CA certificates and standard output
  • Patch from amtlib-dot-dll
  • Return 400 HTTP status code if exception was caught while executing
  • RPC method
  • Previously, we returned 500 HTTP status code. I think the found in
  • RPC level, not in HTTP protocol, so 500 is not appropriate.
  • WinTLS: Fix potential infinite loop
  • Fix on-download-error is executed even if download succeeded
  • Update Dockerfile.mingw
  • Patch from Adam Baxter
  • Increase --select-file upper bound to 1m for torrent containing lots
  • of files
  • Fix busy loop with --dry-run and 4xx response for URI listed in
  • metalink
  • See GH-430
  • Update sqlite in OSX build to 3.8.10.2
  • Make LibuvEventPoll compatible with the latest libuv again
  • gnutls: Allow SIGN-RSA-SHA1 for compatibility reason
  • Make script compatible with both Python 2 and 3
  • Patch from Vasilij Schneidermann
  • Make config and cache files conform to XDG
  • further details. This implementation decides the default based on
  • whether a file exists at the legacy location, if it doesn't, it
  • picks the XDG-conforming location instead.
  • Patch from Vasilij Schneidermann
  • ftp, sftp: Fix heap-after-free bug on exception
  • ftp: Fix timeout when reusing FTP connection
  • Various MinGW-w64 build improvements
  • Fix detection of localtime_r and asctime_r on MinGW-w64
  • Fix linking with libintl on MinGW-w64
  • Patch from David Macek

New in aria2 1.19.0 Build 1 (May 26, 2015)

  • Changes:
  • Previously, we linked with zlib shipped with NDK, but it seems this is not part of NDK API, and thus could break our app.
  • Allow netrc-path to be specified in the config file
  • Adds --netrc-path to override default .netrc search path. Patch from Ryan Steinmetz
  • Exit with 32 status code if checksum verification failed
  • Add SFTP support using libssh2
  • aria2 can now download files via sftp protocol: aria2c sftp://.... --ssh-host-key-md option is added to specify expected server's fingerprint.
  • Added Dockerfile to cross complile aria2 for RaspberryPI (armhf)
  • Patch from Igor Khomyakov
  • multiple interface support for link aggregation
  • Adds --multiple-interface option. Patch from Sarim Khan
  • Run on-bt-download-complete command when -V reports download finished
  • Fixes GH-355
  • Use dedicated DiskWriter in MultiDiskFileAllocationIterator
  • We have to use dedicated DiskWriter instead of (*entryItr_)->getDiskWriter(). This is because SingleFileAllocationIterator cannot reopen file if file is closed by OpenedFileCounter. Fixes GH-350
  • Fix getrandom for system with libc not including errno or systems
  • not supporting ENOSYS in the first place. Fixes GH-347
  • Don't send back rpc-secret option value in aria2.getGlobalOption RPC method
  • Make libuv default off
  • See GH-241 for discussion
  • Fixed slow RPC response
  • Fxies GH-345
  • Fix getrandom interface detection
  • Fixes GH-346

New in aria2 1.18.10 Build 1 (Feb 23, 2015)

  • Add encoding specifier to Russian man page
  • Mingw: Use _wgetenv to get user's home directory
  • Handle linux getrandom returning EINTR on interrupts/signals
  • Also handle ENOTSUP failures where aria2 was build with linux headers newer than the actual running kernel.

New in aria2 1.18.9 Build 1 (Feb 11, 2015)

  • Changes:
  • Support HTTP date ending "+0000" as well as "GMT".
  • Closes GH-330
  • Revise getRandom facilities
  • Use one of the following to provide random bytes: - Windows CryptGenRandom - Linux getrandom (syscall interface to urandom, without nasty
  • corner cases such as file descriptor exhaustion or re-linked /dev/urandom)
  • std::device_random (C++ random device, which usually will be urandom)
  • This also equalizes util::getRandom and SimpleRandomizer (the former will now use the latter) instead of having essentially two different PRNG interfaces with potentially different quality.
  • Closes GH-320
  • Added debug log of all Metalink URLs with final priorities
  • Use gcc-4.9 and android-16 API level for android build
  • Add --bt-force-encryption option
  • This option requires BitTorrent message payload encryption with arc4. This is a shorthand of --bt-requre-crypto --bt-min-crypto-level=arc4. If true is given, deny legacy BitTorrent handshake and only use Obfuscation handshake and always encrypt message payload. This option defaults to false.
  • TLS: Fix memory leak with OpenSSL
  • Based on the patch submitted by midnight2k
  • Warn about insecure SSL connections.
  • Fixed GH-313
  • Add --min-tls-version option
  • The --min-tls-version option specifies minimum SSL/TLS version to enable. Possible Values: SSLv3, TLSv1, TLSv1.1, TLSv1.2 Default: TLSv1
  • LibsslTLSContext: Disable SSLv3 and enable ECDHE cipher suites
  • Add Dockerfile.mingw
  • Dockerfile.mingw builds aria2 Windows binary. It is probably the easiest way to build the Windows binary.
  • Fix crash when JSON batch response vector is empty
  • Fix doc: Wrong rpc secret token prefix
  • Add --bt-detach-seed-only option
  • This option excludes seed only downloads when counting concurrent active downloads (-j option). This means that if -j3 is given and this option is turned on and 3 downloads are active and one of those enters seed mode, then it is excluded from active download count (thus it becomes 2), and the next download waiting in queue gets started. But be aware that seeding item is still recognized as active download in RPC method.
  • mingw: Use MoveFileExW for better atomic move
  • Work around libintl's vprintf macro messing with OutputFile::vprintf
  • Fix crash on OSX when proxy is used
  • Support Adler32 checksum
  • Adler32 checksum is available for --checksum option and hash element in Metalink files. Currently, we use Adler32 implementation in Zlib.

New in aria2 1.18.8 Build 1 (Sep 12, 2014)

  • Changes:
  • WinTLS: Fix abrupt connection closing and closing in general.
  • Fixes GH-277
  • LibsslTLSSession: Treat 0 from readData as EOF
  • Enable dynamicbase and nxcompat in Windows binaries
  • Fix crash in OpenedFileCounter::ensureMaxOpenFileLimit()
  • The crash happens if PieceStorage and/or DiskAdaptor are not initialized in one of active RequestGroups.
  • mingw32: Fix bug that aria2 does not read piped stdin
  • Fix std::length_error when no_proxy is used
  • This is regression introduced in 8cada497.
  • Try to set sane limits for RLIMIT_NO_FILE
  • Closes GH-257
  • Delay auth failures instead of PBKDF2
  • Closes GH-256

New in aria2 1.18.7 Build 1 (Jul 22, 2014)

  • Fixed segfault unsupported encodings
  • Fix regression 100% CPU utility when -V is used and download is multi-file bittorrent downloads.
  • Fix compile error on big endian platform

New in aria2 1.18.6 Build 1 (Jul 14, 2014)

  • Disard cache when checking checksum:
  • This will slow down checksum checking but does not thrash cache.
  • Compat with libuv 0.11 (Unstable)
  • Drop WinMessageDigestImpl:
  • The algorithms the CryptProv on Windows supports does not currently include SHA-224, so there is a "dark spot" in this implementation. Also on Win XP < SP3, most of the SHA-2 family is not actually supported. All other implementation provide support for MD5, SHA-1 and all of the SHA-2 family, hence drop the incomplete WinMessageDigest implementation in favor of any other supported implementation (at least the internal implementation is always available at compile-time).
  • Add --pause-metadata option:
  • This option pauses downloads created as a result of metadata download. There are 3 types of metadata downloads in aria2: (1) downloading .torrent file. (2) downloading torrent metadata using magnet link. (3) downloading metalink file. These metadata downloads will generate downloads using their metadata. This option pauses these subsequent downloads.
  • Improve compiler/platform/libs information in logs:
  • Add and use usedCompilerAndPlatform(). This adds compiler information to INFO logs and the --version output, and may be helpful when trying to diagnose/reproduce user-reported problems.
  • Also make INFO logs include usedLibs() output.
  • Closes #235
  • Fix use-after-free on exit with multi-file torrent download + DHT:
  • DefaultPieceStorage may be referenced by one of DHT task (e.g., DHTPeerLookupTask), after RequestGroup was deleted, and even after RequestGroupMan was deleted. DefaultPieceStorage has a reference to MultiDiskAdaptor which calls RequestGroupMan object on destruction. So when DHT task is destroyed, DefaultPieceStorage is destroyed, which in turn destroys MultiDiskAdaptor. DHT task is destroyed after RequestGroupMan was destroyed, MultiDiskAdaptor will use now freed RequestGroupMan object, this is use-after-free.
  • Fix bug that zero length file is not opened when flushing cache:
  • This bug was only seen when MultiDiskAdaptor was used.
  • Support PREF_DIR change for Metalink files:
  • Reworked previous commit adeead6f0396e2f8551d1182972e277728fd6c8b, and now support changing PREF_DIR for Metalink downloads.
  • Fix assertion failure when dir option of paused HTTP/FTP download is changed:
  • When the directory is changed via aria2.changeOption RPC method, we directly change first FileEntry's path using FileEntry::setPath(). If there is no PREF_OUT option is given, basically file name is unknown, so we just set empty string and let the next run determine the correct file name and new directory is applied there. But previous code does not reset length property of FileEntry, so the unexpected code path is taken when unpaused and its path expects path is not empty string. This commit fixes this issue by setting length to 0 using FileEntry::setLength().
  • Save session only when there is change since the last serialization:
  • This is a slight optimization not to cause useless disk access. This only applies to saving session automatically (see --save-session-interval). aria2.saveSession and serialization at the end of the session are always performed as before.
  • When serialization, we first check that whether there is any change since the last serialization. To do this, we first calculate hash value of serialized content without writing into file. Then compare this value to the value of last serialization. If they do not match, perform serialization.
  • Fix (unknown length) downloads larger than 2GiB:
  • Closes #215
  • Fix F_PREALLOC based allocation on some OSX versions
  • Use index.html as filename for conditional-get when file is missing in URI:
  • Previously we disabled conditional-get if file part is missing in URI. But we use constant string "index.html" in this case, so we can do the same to determine the modification time. In this patch, if we have file part in URI, we are not going to set absolute file path in FileEntry, since it prevents content-disposition from working.
  • Always add README.html to dist_doc_DATA:
  • rst2html is required to produce README.html from README.rst. We include generated README.html to distribution. And rst2html is not required when compiling sources in distribution and always README.html is available.
  • Validate token using PBKDF2-HMAC-SHA1:
  • This change should make token validation more resilient to: - timing attacks (constant time array compare) - brute-force/dictionary attacks (PBKDF2)
  • Closes #220
  • Add --disable-websocket configure option:
  • mingw32: Enable wintls and compile with GMP
  • By enabling wintls, we can use Windows certificate store to validate server's certificate. Previously, we built windows build using openssl and since we don't bundle CA certificates, aria2 fails to validate server's certificate unless user setups their CA certificates. GMP provides fast big integer calculations, whic is used in BitTorrent encryption.
  • AppleTLS: Enable BEAST mitigations in ST:
  • Only available in 10.9+, but since we might be building on a previous version but running on 10.9+, always try to set the option.
  • WinTLS: Accept chains with no revocation information:
  • This is kind what browser do anyway (IE, Firefox, Chrome tested), what AppleTLS does, what GnuTLS does and what OpenSSL does. Actually, most browsers will also be OK with the CRL/OCSP provider being offline. WinTLS will still fail in that case.
  • Should revocation information be available in the trust chain (CRL or OCSP) the certificate still will be checked!
  • "Real" CAs, aka. those provided by the OS or system CA bundle, usually provide revocation information and are thus still checked. It should be mostly (only?) custom (organization) CAs that lack revocation information, but those users might want to use aria2 in their intranets and VPNs anyway
  • Fix GnuTLS 2.x compatibility
  • AppleTLS: Use newer, non-deprecated API in 10.8+

New in aria2 1.18.5 Build 1 (Mar 31, 2014)

  • Changes:
  • Ignore error when setting DSCP value:
  • Setting DSCP is additional feature and failure to enable it should not abort download entirely. This change fixes the bug that windows build does not perform bittorrent downloads.

New in aria2 1.18.4 Build 1 (Mar 25, 2014)

  • This release adds new RPC authorization mechanism using --rpc-secret option. The existing --rpc-user and --rpc-passwd options are now deprecated, and all applications using RPC API is strongly encouraged to migrate to the new mechanism. See RPC INTERFACE section in aria2 manual page for the details. The new RPC method, aria2.saveSession, was added, which tells aria2 server to save session file immediately. There are several enhancements and bug fixes. See the changes for the details.
  • Changes:
  • Added support for RPC channel encryption in aria2rpc. Patch from David Macek
  • Add aria2.saveSession RPC method. This method saves the current session to a file specified by --save-session option. This method returns "OK" if it succeeds.
  • Add numStoppedTotal key to aria2.getGlobalStat() RPC method response. It shows the number of stopped downloads in the current session and not capped by --max-download-result option. On the other hand, the existing numStopped key also shows the number of stopped downloads, but it is capped by --max-download-result option.
  • Better handling of 30x HTTP status codes
  • Implement new RPC authorization using --rpc-secret option. Add future deprecation warning to --rpc-user and --rpc-passwd. Warn if neither --rpc-secret nor a combination of --rpc-user/rpc-passwd is set.
  • Add --enable-color option to enable/disable terminal color output
  • Add DSCP support
  • gnutls: Don't fail handshake if returned error is not fatal
  • Add workaround GnuTLS bug with OCSP status extension and non-blocking socket. GnuTLS version 3.1.3 - 3.1.18 and 3.2.0 - 3.2.8, inclusive, has this bug. For these versions, we disable OCSP status extension.
  • Make GnuTLS log level dependent on the aria2 ones

New in aria2 1.18.3 Build 1 (Jan 6, 2014)

  • This release fixes the bug which may cause assertion failure after multi-file downloads (e.g., multi-file metalink or torrent) are performed several times due to the bad handling of --bt-max-open-files option.
  • Changes
  • Fix crash if unpause failed before assigning BtProgressInfoFile object
  • Enable and check PIE in makerelease-osx
  • Fix bug that numOpenFile_ is not reduced when MultiDiskAdaptor is deleted
  • This bug caused assertion error in RequestGroupMan::ensureMaxOpenFileLimit

New in aria2 1.18.2 Build 1 (Jan 6, 2014)

  • This release fixes the wrong handling of return value of fork(), which leads to high CPU usage. The progress readout has some color output. Mingw32 build now receives colorized output. Mingw32 build now can read unicode command-line arguments. The build script of OSX was rewritten. The --bt-max-open-files now limits the number of opened file globally for multi-file downloads instead of per download basis.
  • Changes
  • Fix crash when metaurl contains unsupported URI or text
  • Fix bad fork() return value handling
  • Use some colors in progress reports (where available)
  • Implement basic color support for the Windows console
  • Only 033[*m (SGR) is supported, with a 16+16 color terminal.
  • Limit number of opened file globally with --bt-max-open-files option
  • This change changes the behavior of --bt-max-open-files. Previously, it specifies the maximum number of opened files for each multi-file download. Since it is more useful to limit the number globally, the option now specifies the global limit. This change suggests that aria2.changeOption() method now ignores --bt-max-open-files and aria2.changeGlobalOption now reads it and dynamically change the limit.
  • Don't fail multiple concurrent dl same file if auto-file-renaming is enabled
  • mingw32: Use CommandLineToArgvW() and GetCommandLineW() to read cmd-line args
  • This change enables aria2 to read unicode characters in command-line.

New in aria2 1.18.1 Build 1 (Oct 21, 2013)

  • This release fixes the percent-encoding bug which affects file name encodings. It adds PKCS12 support in certificate import. It also adds experimental internal implementation of message digest functions, ARC4 cipher and bignum. It means that no external libraries are required to build BitTorrent support, but this feature is still marked as experimental. This release also fixes the android build with NDK r9.
  • Changes:
  • LibsslTLSContext: Remove weak cipher suite
  • AppleTLS: Enable --certificate
  • util::percentEncodeMini: Fix regression bug removed unsignedness
  • srange-based for around std::string is convenient but several functions depend unsigned char for correctness and readability.
  • Log exception; throw error if loading private key and/or certificate failed
  • Provide internal ARC4 implementation
  • Internal implementation of DHKeyExchange
  • Reusing a bignum (well, unsigned very-long) implementation I had lying around for years and just cleaned up a bit and brought to C++11 land.
  • It might not be the most performant implementation, but it shoud be fast enough for our purposes and will go a long way of removing gcrypt, nettle, gmp, openssl dependencies when using AppleTLS and WinTLS (upcoming).
  • PKCS12 support in --certificate and --rpc-certificate options.
  • Add --disable-ssl configure option
  • Add internal md5 and sha1 message digests
  • Fix AppleMessageDigestImpl use with large data
  • Set old cookie's creation-time to new cookie on replacement
  • Fix link error with Android NDK r9
  • Since Android ndk r9, __set_errno is deprecated. It is now defined as inline function in errno.h. The syscall assembly calls __set_errno, but since libc.so does not export it, the link fails. To workaround this, replace all occurrences of __set_errno with a2_set_errno and define it as normal C function.

New in aria2 1.18.0 Build 1 (Sep 10, 2013)

  • Release Note
  • This release changes the default disk cache size to 16 MiB. To change the default size, --with-disk-cache configure option was added. Now used URIs are also saved by --save-session option. The control file is now always saved if --force-save is given. The ctrl-c handling on Mingw build was improved. The internal intl library is no longer supplied. From this release, C++11 compiler is required to build aria2 executable. For gcc, at least 4.6.3 is required.
  • Changes:
  • Use AM subdir-objects
  • Doing so in AM_INIT_AUTOMAKE seems to be the most compatible way of doing so.
  • Closes GH-120
  • AM_SILENT_RULES([yes]) with backwards-compatiblity
  • Supported since automake-1.11. There is no point in having the very verbose compile stuff running about, which cannot even silenced properly with make -s by default. Otherwise, make V=1 or --disable-silent-rules are your friends
  • Fix automake-1.14 am_aux_dir
  • AC_USE_SYSTEM_EXTENSIONS will cause AC_PROG_CC, which is overridden by automake-1.14, which will then init (part) of automake, in particular am_aux_dir expansion, which in turn relies on ac_aux-dir, which is not initialized at this point, and thus: certain doom (or fun, depending on your POV and mood :p)
  • Hence call AC_USE_SYSTEM_EXTENSIONS only after AM_INIT_AUTOMAKE. This, of course, caused a lot of related macro shuffling.
  • Tested against automake-1.10 (OSX Lion/XCode version) and automake-1.14 (homebrew version)
  • Require external gettext for --enable-nls
  • And stop using the internal flavor with ./intl
  • Make AX_CXX_COMPILE_STDCXX_11 test for -stdlib=libc++ via std::shared_ptr
  • The clang shipped with OSX XCode and clangs not build enabling libcpp, will default to the libstdc++ headers and lib installed on the system. In the OSX case, that libstdc++ is the one bundles with gcc-4.2, which is far too old to provide all required C++11 types, such as std::shared_ptr. Hence, the C++11 check should try to compile a program with a C++11 type and try -stdlib=libc++ if the default lib fails to compile said program.
  • Make the configure check for C++11 compiler mandatory
  • Remove stray "dnl", so that mandatory actually works with (my) autoreconf.
  • Always build doc/manual-src
  • Should sphinx-build be not available AND the man file not be prsent, then just "touch" it into existence (and warn about that)
  • Win: Use SetConsoleCtrlHandler for SIGINT/SIGTERM
  • Implement a simple resource lock (threading)
  • In this initial implementation Locks are no-ops on platforms other than Windows.
  • Check for sphinx-build during configure
  • Add --with-disk-cache configure option
  • Enables packagers more fine grained control over the default value without having to mess with config files.
  • See GH-115
  • Change defaults: Enable 16M disk cache by default.
  • Always save control file if --force-save is given
  • Set log level DEBUG for unittests
  • Check that C++ compiler supports override keyword
  • If the compiler supports override, define CXX11_OVERRIDE as override, otherwise define it as empty. Use CXX11_OVERRIDE instead of override.
  • AppleTLS: Fix MessageDigestImpl
  • AppleTLS: Fix session CFRelease stuff
  • Use AX_CXX_COMPILE_STDCXX_11 macro to detect C++0x/C++11 support in compiler
  • Require -std=c++11 and use std::shared_ptr instead of SharedHandle
  • Join URI on redirect
  • Send HAVE message to the peer which the piece is downloaded from
  • Historically, aria2 did not send HAVE message to the peer which the piece is coming from, thinking it is obvious that the peer knows we have the piece. But it is not obvious if one piece is download from more than 1 peers (e.g., end game mode). So it is better to send HAVE to all peers connected.
  • Improvements to --follow-torrent=false documentation.
  • Patch from gt
  • SessionSerializer: Truly unique URIs
  • Before, only spent uris where sanitized not to be contained within remaining uris. Change this so that each uri in the union(remaining,spent) get saved once at most. The order of the uris will won't be changed, with remaining uris going first followed by spent uris.
  • Also avoid copying the uri std::strings around during dupe checking, usually resulting in better performance regarding CPU and space.
  • Make getOption RPC method return option for stopped downloads
  • SessionSerializer: Save spent URIs as well as remaining ones

New in aria2 1.17.1 Build 1 (May 28, 2013)

  • Changes:
  • Add code to detect rst2html.py or rst2html
  • AppleTLS: Properly support Snow Leopard (10.6)
  • Tested on 10.6.8 + XCode 4.2 (llvm-gcc-4.2, clang)
  • Enable multicast loopback in BitTorrent local peer discovery
  • Enable TLS1.1 with gnutls build
  • Support off64_t for Android build
  • Android NDK R8e does not provide ftruncate64, but bionic has the assembler code to access kernel function. We borrowed those ftruncate64.S files from android source code repository. It turns out that x86 asm.h in NDK R8e is also broken, so latest asm.h was also borrowed.
  • Check zlib availability usin AC_CHECK_LIB
  • This is workaround for zlib 1.2.3 which does not come with pkg-config file.
  • Treat response is completed if EOF is received before streamFilter completes
  • This fixes the error with web server which has buggy chunked encoding.
  • uitos: Fix off-by-one error bug
  • Add configure support for linking tcmalloc_minimal and/or jemalloc
  • Both tcmalloc_minimal and jemalloc outperform the native malloc implemention on Windows (MSVCRT) in terms of committed memory consumption (~-30%) and performance (e.g. far less page faults, ~-60%), depending, of course, on the actual workload. The longer the download queue, the bigger the impact ;)
  • On *nix the picture is a little different... tcmalloc usually still outperforms the native malloc implementation, but not that significantly than on Windows. jemalloc however is only marginally better than recent native Linux implementations, while it is already used by some BSD as the native allocator.
  • tcmalloc is part of gperftools and very mature and tested by now. It doesn't work on OSX in the default configuration, however. http://code.google.com/p/gperftools/
  • jemalloc is the default allocator at least on FreeBSD and NetBSD and used in Firefox. http://www.canonware.com/jemalloc/index.html
  • Close GZipFiles in the d'tor
  • Add libaria2, C++ library interface to aria2
  • The libaria2 is a C++ library and offers the core functionality of aria2. The library takes care of all networking and downloading stuff, so its usage is very straight forward right now. See libaria2ex.cc in examples directory to see how to use API. By default, libaria2 is not built. See libaria2 section in README to how to enable it.
  • The APIs in this release is considered experimental.
  • Add missing check for sigaction
  • Fix cached data is not flushed when downloaded data is less than 16KiB
  • LibUV: Implement LibuvEventPoll

New in aria2 1.17.0 Build 1 (Apr 22, 2013)

  • Updated Russian manual
  • Updated Portuguese manual
  • Append --static to pkg-config arguments when ARIA2_STATIC=yes
  • Save options directly specified for download in --save-session
  • This change makes --save-session save only options specified for download, more specifically, options in command-line, -i file and via RPC. The other options from conf file and default values are not saved. This will drastically decrease the size of session file.
  • Save URI returned only from FileEntry::getRemainingUris()
  • The currently used URIs are inserted back into remaining URI list in FileEntry::putBackRequest(), which overlaps to some of the URIs in spentUris_. If we save spent URIs, each time save is performed, the number of URIs are increased due to this overlap. This change fixes this bug.
  • Print linked 3rd party libraries with version in aria2c -v output
  • AppleTLS: Support credentials via KeyChain fingerprints
  • AppleTLS: Implement AppleTLS and Apple Message Digest
  • Use info level log for system trusted ca imports failure
  • This is because on some platforms (gnutls on cygwin for example), library always fails for this function and getting ERROR every time aria2c invoked is too hard.
  • Don't add Windows native DLLs for Cygwin build
  • Remove deprecated options: --enable-direct-io and --metalink-servers
  • Deprecate --enable-async-dns6
  • The IPv6 asynchronous name resolver is enabled if the host has at least one interface with IPv6 address configured (the loopback address will not be counted), which is roughly the same behaviour of the standard getaddrinfo(3). To disable IPv6 asynchronous name resolver, use --disable-ipv6.
  • Fix uninitialized UDPTrackerClient::numWatchers_
  • Implement simple Happy Eyeballs for HTTP/FTP downloads
  • Parallel A and AAAA record lookups with c-ares
  • But we don't wait for AAAA query response if A query response has been received. If we got IPv4 lookup response, we don't wait for IPv6 lookup response. This is because DNS server may drop AAAA query and we have t wait for the long time before timeout. We don't do the inverse, because, based on todays deployment of DNS server, almost all of them can respond A query just fine.

New in aria2 1.16.5 Build 1 (Mar 25, 2013)

  • Fix bug that invalid range error when requesting range starting 0

New in aria2 1.16.4 Build 1 (Mar 18, 2013)

  • Make configure argument meaning more consistent and obvious.
  • Most other software uses --disable/--without for features it does build or at least check by default.
  • Change aria2 configure options so that:
  • --enable-*: do not build by default, unless --enable specified
  • --disable-*: check and build by default, unless --disable specified
  • --with-*: do not use by default, unless --with specified
  • --without-*: check and use by default, unless without specified
  • Allow for out-of-tree Sphinx builds
  • Bring back datetime in console log
  • Run checksum check if -V and -c are used and file is completed
  • With -c option, aria2 can continue download after the existing file position. If it is not completed, then after completion aria2 runs checksum checking if available. But if existing file has already been completed, then CreateRequestCommand exits without issuing checksum checking. And aria2 treats it download error because it needs checksum verification but it has not been done. This change fixes this by properly checking download state and issue checksum checking before CreateRequestCommand.
  • Support for gzipped -i and --save-session
  • Saved sessions may very large, as in hundreds and even thousands of megabyte when dealing with large queues. Add support to save and reload sessions to gzipped files, when libz is available.
  • The session serializer will output gzipped contents when the file ends with .gz, while the input file reader (UriListParser) will accept whatever is thrown at it.
  • Document -i/--save-session gzip behaviour
  • Do not use a virtual varargs function
  • This stuff breaks in some compiler (configurations)
  • Check for sys/signal.h and/or signal.h
  • mingw-w64 does not actually have sys/signal.h, while OSX currently has a broken signal.h Better check the presence of both and use sys/signal.h if present, else signal.h
  • Hygiene: Fix some clang warnings, mostly unused private members.
  • Fix bustage on OSX with ./configure CC=cc CXX=c++ (clang)
  • Do not reference RequestGroups longer than necessary
  • There is an initial vector of SharedHandle to seed the DownloadEngine. This vector was however kept alive via main.cc -> MultiUrlRequestInfo up until the program exits, hence effetively leaking all initial RequestGroups and associated object instances.
  • Hence, as a matter of dirty-workaround, drop the contents of that initial vector as soon as it is not required any longer.
  • Detect console with on Windows
  • Fix infinite loop when size of downloadResults_ exceeds maxDownloadResult_
  • Support BitTorrent UDP tracker
  • It shares UDP listening port with IPv4 DHT. At the moment, in order to enable UDP tracker support, enable IPv4 DHT.
  • Show correct end byte in error message when HTTP response range is not ok
  • Previously, unless HTTP pipelining is enabled, end byte in that message is always 0. With this change, it shows correct end byte sent to the HTTP server.
  • Add Portuguese manual
  • This translation is based on aria2 version 1.15.2 manual.
  • Fix bug that active downloads are not saved with --save-session-interval

New in aria2 1.16.3 Build 1 (Feb 4, 2013)

  • This release fixes the bug which causes random crash. It also fixes socket option setting failure on Windows platform.
  • Changes:
  • Fix failure to set TCP_NODELAY on Windows
  • On Windows setting TCP_NODELAY after non-blocking connect fails at least on Windows 7.
  • Fix invalid iterator handling when deleting RequestGroup

New in aria2 1.16.2 Build 1 (Feb 4, 2013)

  • Changes:
  • Check SSL_OP_NO_COMPRESSION is available before using it
  • Fix bug returnPeer is not called if sequence_ == INITIATOR_SEND_KEY
  • In InitiatorMSEHandshakeCommand, when aborting connection, we must return peer to the PeerStorage. But it is not done if sequence_ is INITIATOR_SEND_KEY. This causes stale Peer objects whose usedBy() returns true eventually occupies peer list and aria2 cannot make any connections.
  • Accept k and m as well as K and M in util::getRealSize()
  • mingw32: Make NTFS sparse file on --file-allocation=trunc
  • Added --save-session-interval option
  • --save-session-interval option saves error/unfinished downloads to a file specified by --save-session option every SEC seconds. If 0 is given, file will be saved only when aria2 exits.
  • Use request URI as referer if --referer="*" is given
  • Log warn if unknown option is found in config file or -i file
  • Added --console-log-level option
  • --console-log-level option sets log level to output to console.

New in aria2 1.16.1 Build 1 (Dec 27, 2012)

  • mingw32: Re-open files with read-only mode enabled on seeding
  • On Mingw32 build, if aria2 opens file with GENERIC_WRITE access right, some programs cannot open the file aria2 is seeding. To avoid this situation, re-open files with read-only enabled when seeding is about to begin.
  • Save gid option with --save-session option
  • Added --gid option
  • This option sets GID manually. aria2 identifies each download by the ID called GID. The GID must be hex string of 16 characters, thus [0-9a-zA-Z] are allowed and leading zeros must not be stripped. The GID all 0 is reserved and must not be used. The GID must be unique, otherwise error is reported and the download is not added. This option is useful when restoring the sessions saved using --save-session option. If this option is not used, new GID is generated by aria2.
  • Use 64 bits random bytes as GID
  • This change replaces the current 64 bit sequential GID with 64 bits random bytes GID in an attempt to support persistent GID. Internally, the GID is stored as uint64_t. For human representation and RPC interface, GID is represented as 16 bytes hex string. For console readout, 16 bytes are too long, so it is abbreviated to first 6 bytes. When querying GID in RPC calls, user can speicfy the prefix of GID as long as the prefix is shared by more than 1 GID entries.
  • Fixed BitfieldMan::getOffsetCompletedLength overflow on 32-bit systems
  • mingw32: Use HANDLE only for MinGW32 build
  • Changed console readout, making it more compact
  • "SIZE:" is removed because it is obvious. SEEDING, SEED, SPD and UP are now replaced with SEED, SD, DL and UL respectively.
  • Compact readout when more than 1 simultaneous downloads are going on
  • If more than 1 simultaneous downloads are going on, use more compact format in readout. Currently, at most 5 download stats are displayed.
  • util::abbrevSize() is rewritten to support "Gi" unit and provides more compact abbreviation.
  • Console color output
  • Log level and download result string is now colored.
  • Logger: Simplified console output and change level format in log
  • The date and time are now removed from console output. The log level is now formatted as "[LEVEL]".
  • Start to find faster host before the number of missing segments becomes 1
  • The old implementation starts to find faster host when the number of missing segment becomes 1. Because of --min-split-size option, before the number of missing segment becomes 1, the number of connection becomes 1 and it can be slow. In this case, we have to wait until the last segment is reached. The new implementation starts to find faster host when the remaining length is less than --min-split-size * 2, to mitigate the problem stated above.
  • Removed warning when --file-allocation=falloc is used in MinGW32 build
  • The warning was just a mistake. SetFilePointerEx + SetEndOfFile actually allocate disk space.
  • Write data in 4K aligned offset in write with disk cache enabled
  • This greatly reduces disk activity especially on Win + NTFS.
  • mingw32: Removed FSCTL_SET_SPARSE set
  • Added --disk-cache option
  • This option enables disk cache. If SIZE is 0, the disk cache is disabled. This feature caches the downloaded data in memory, which grows to at most SIZE bytes. The cache storage is created for aria2 instance and shared by all downloads. The one advantage of the disk cache is reduce the disk seek time because the data is written in larger unit and it is reordered by the offset of the file. If the underlying file is heavily fragmented it is not the case.

New in aria2 1.16.0 Build 1 (Dec 3, 2012)

  • mingw32: Open file using _wsopen and added --enable-mmap support
  • I tried CreateFile but the subsequent ReadFile fails with Access Denied if sparse file is read on NTFS. I mostly reverted previous changes and use _wsopen with read/write share enabled instead of CreateFile.
  • This change also includes --enable-mmap support for MinGW32 build. Memory mapped file may be useful for 64-bits OS and lots of RAM. Currently, FlushViewOfFile is not called during the download, so it is slightly vulnerable against sudden power loss. I found lots of read when resuming download due to page fault. So for now it is useful for the initial download. I recommend not to use --file-allocation=prealloc with --enable-mmap for MinGW32, because it triggers page faults even in the initial download. Anyway, the option is experimental.
  • Removed PO files and generated aria2.pot from repository
  • Currently, message translation is done at launchpad. All PO files can be exported from there. The merge process from launchpad is done when new release. First download export file from launchpad And use import-po script to import PO files into po directory.
  • Enabled TCP_NODELAY
  • Don't use AC_FUNC_MMAP
  • Don't use AC_FUNC_MMAP becaue it fails on some platforms (e.g., OpenWRT) which have mmap and it works in the way we use in aria2. Instead use mmap in AC_CHECK_FUNCS list.
  • Added --force-save option.
  • --force-save option saves download with --save-session option even if the download is completed or removed. This may be useful to save BitTorrent seeding which is recognized as completed state. The default value is false.
  • Get the correct uploaded data size
  • Subtract msgHdrLen_ from writtenLength to get the uploaded data size. Without this correction, the seeder assumes it has uploaded more data than it actually has.
  • Made --http-no-cache false by default
  • Fixed memory leak in AsyncNameResolver
  • Fixed resource leak in XmlParser and GenericParser
  • Reset iostream format state
  • gnutls: Added more status checking when verifying peer
  • Content-Disposition parser conforming to RFC 6266.
  • RFC 2231 Continuation is not supported.
  • Reworked download/upload statistics calculation
  • The old implementation calculates download/upload statistics for a RequestGroup by summing up all PeerStat objects. For global statistics, those are summed together. This clearly incurs runtime penalty and we introduced some kind of caching which updates statistics every 250ms but it did not work right.
  • This change removes all these aggregation code, and instead makes RequestGroup and RequestGroupMan objects hold NetStat object and download/upload bytes are directly calculated by thier own NetStat. This is far more simplar than the old way and less runtime penalty and brings more accuracy.
  • Added --rpc-save-upload-metadata option
  • If true is given, which is default, save the uploaded torrent or metalink metadata in the directory specified by --dir option. The filename consists of SHA1-hash hex string of metadata plus extension. For torrent, the extension is '.torrent'. For metalink, it is '.meta4'. If false is given to this option, the downloads added by aria2.addTorrent or aria2.addMetalink will not be saved by --save-session option.
  • Perform SSL/TLS handshake after checking whether connection is established
  • Fixed bug that --enable-mmap won't work if MultiDiskAdaptor is used
  • RPC over SSL/TLS transport
  • To enable RPC over SSL/TLS, specify server certificate and private key using --rpc-certificate and --rpc-private-key options and enable --rpc-secure option. After the encryption is enabled, use https and wss scheme to access RPC server.
  • aria2rpc: Added appendUri command
  • This command calls aria2.changeUri(GID, fileIndex, [], [URI,...]) internally.
  • Don't send Proxy-Connection header field
  • Don't set SNI hostname if it does not include "." for GNUTLS
  • Disable SSL/TLS compression with OpenSSL
  • Pause download even if download is completed
  • This allows to pause and unpause BitTorrent seed.
  • Use execlp() instead of execl()

New in aria2 1.15.2 Build 1 (Sep 3, 2012)

  • Changes:
  • Catch exception from Socket::getPeerInfo() when pooling connection. Socket::getPeerInfo() may fail if its TCP connection has already disconnected. In this case, we log this error. The success or failure of pooling connection should not affect the later execution of the program. This bug may cause segmentation fault if Socket::getPeerInfo() throws exception during pooling connection after successful tracker request.
  • Fixed assertion error if --retry-wait is used. In CreateRequestCommand, if Request object returned from getRequest() is still sleeping, CreateRequestCommand pools it back but still holds its reference. This makes assertion error in UnknownLengthPieceStroage::hasMissingUnusedPiece() from AbstractCommand::execute().
  • Added new file allocation method called 'trunc'. --file-allocation option can now take new value 'trunc'. 'trunc' uses ftruncate() system call or platform-specific counterpart to truncate a file to a specified length.
  • Use int64_t instead of off_t. Using off_t, at least, in DiskAdaptor layer is problematic because torrent can contain under 2GiB files but total sum of those files may exceed 2GiB limit, which makes off_t overflow in 32 bit system without large file support. So we use int64_t in API. We'll check the file length before download so that it does not exceed max off_t.
  • Added TLS SNI support.
  • Rewritten timegm replacement function. The algorithm is based on Python 2.7 calendar.timegm.
  • Use system-wide certificates for SSL. Use system-wide certificates for SSL. For GnuTLS it requires the latest version, 3.0.20. OpenSSL had it for longer. This means that if SSL library is properly configured to locate system-wide certificates store, the user don't have to use --ca-certificate option. Also packagers don't have to use --with-ca-bundle configure option. Patch from Cristian Morales Vega
  • Fixed base64::decode() return "" if input ends with garbage and no padding.
  • Changed default Peer ID prefix. The new Peer ID prefix is "A2-$MAJOR-$MINOR-$MICRO-", where $MAJOR, $MINOR and $MICRO are the major version, the minor version and the micro version respectively. For instance, 1.15.2 release of aria2 will use "A2-1-15-2-".
  • Don't percent-decode filename value in Content-Disposition. We only percent-decode filename* value in Content-Disposition because the encoding is fully specified. But since filename value is not, so we just accept it as is.
  • Don't sum in-flight piece which does not intersect filtered ranges. When calculating completed length, don't sum the completed length of piece which does not intersect filtered ranges.
  • Fixed segmentation fault when logger failed to open log file.
  • Added ARIA2_STATIC precious variable to configure option. To build statically linked aria2 binary, give ARIA2_STATIC=yes to configure, like this: $ ./configure ARIA2_STATIC=yes
  • Use PRId64 for int64_t format specifier
  • Handle the case when MINGW32 vsnprintf returns -1. MINGW32 vsnprintf returns -1 if output is truncated. Increased buffer for vsnprintf in WinConsoleFile and fmt.
  • Added --enable-mmap option. If this option is used, map files into memory using mmap(2). This option is experimental.
  • Added CORS preflight request support in RPC interface. This change is based on the patch from binux.

New in aria2 1.15.0 Build 1 (Apr 9, 2012)

  • Use CreateProcessW instead of CreateProcessA in MinGW build. This means filename is now passed as wchar string, not UTF-8 encoded char string.
  • Check with pkg-config only: c-ares, openssl, sqlite3 and zlib. Removed --with-*-prefix configure option for c-ares, openssl, sqlite3, zlib and expat. Use CPPFLAGS and/or PKG_CONFIG_PATH instead.
  • Fixed compile error with i686-w64-mingw32 and x86_64-w64-mingw32 cross compilers.
  • Get the home directory of the effective user ID using getpwuid() if $HOME is not defined.
  • Don't use locale dependent toupper and tolower.
  • Rewritten TLS hostname check based on RFC 6125 for both GNUTLS and OpenSSL builds.
  • Added --bt-remove-unselected-file option. Removes the unselected files when download is completed in BitTorrent. To select files, use --select-file option. If it is not used, all files are assumed to be selected. Please use this option with care because it will actually remove files from your disk. This option is default to false.
  • Fixed compile error on Open Solaris. Fixes bug#3497518
  • Added JSON-RPC over WebSocket.
  • Fixed assertion failure if Chunked encoding along with Content-Length is used.
  • Fixed clang and gcc-4.7 warning and errors.
  • Fixed the bug that aria2 cannot read line longer than 4096 bytes from the file specified by --input-file option.

New in aria2 1.14.2 Build 1 (Feb 29, 2012)

  • Only accepts 32 bit integer values from int and i4 elements in XML-RPC. Fixed overflow bug in aria2.tellWaiting and aria2.tellStopped RPC methods.
  • Updated Spanish, Italian, Russian and Chinese (Simplified) translations. Thanks to all translators.
  • Fixed the bug that aria2 does not listen on address given in --interface.
  • Supported Windows UNC path.
  • Check scheme part in redirected URI more strictly. The previous implementation mistakenly sees '/abspath?uri=http://foo' as an absolute URI because it contains '://', but actually it is not. This change checks scheme part is constructed in the allowed character set described in RFC 3986 Section 3.1.
  • Allow missing params in XML-RPC request.
  • Fixed "Max payload length exceeded or invalid" error when the number of pieces is very large.
  • Added: deferred-input option. If true is given to --deferred-input option, aria2 does not read all URIs and options from file specified by -i option at startup, but it reads one by one when it needs later. This may reduce memory usage if input file contains a lot of URIs to download. If false is given, aria2 reads all URIs and options at startup. This option defaults to false.

New in aria2 1.14.1 Build 1 (Jan 13, 2012)

  • Supported network-path reference in HTTP redirect.
  • Updated bash_completion.
  • aria2 now doesn't assume download has completed just because file size matched. The only exception is zero-length file. If server tells that file is zero-length and --checksum option is given, aria2 now correctly checks its checksum.
  • There is one known issue: If downloaded file is zero-length file and .aria2 file exists, it will not be deleted on successful verification, because .aria2 file is not loaded.
  • Fixed the bug that --checksum is not working. SFBUG#3466888
  • Fixed compile error without libnettle, libgcrypt and openssl. SFBUG#3466463 Fixed the bug that log file is not created if there is warning before log file is opened.

New in aria2 1.14.0 Build 1 (Dec 27, 2011)

  • Updated Chinese (Simplified), Spanish, French and Russian translations.
  • Updated Russian man page.
  • Ignore peer which possibly sent bad data in next few minutes. In aria2, one piece is downloaded from several peers, so when hash check failed for that piece, it cannot determine which peer(s) sent bad data. So, we ignore peer who sent last block of data in random minutes. We use randomized timeout because all peers get waken up at the almost same time.
  • Added suggestion for unknown/ambiguous options. The help messages shown when argument error were redesigned and less verbose now. When unknown or ambiguous option is given, show suggestions like "Did you mean...". Some constant values related to levenstein distance are borrowed from git help.c.
  • Added --stop-with-process=PID option. This feature stops application when process PID is not running. This is useful if aria2 process is forked from a parent process. The parent process can fork aria2 with its own pid and when parent process exits for some reason, aria2 can detect it and shutdown itself. The code which detects whether or not given process PID is running Support IPv6 address for FTP via HTTP tunneling.
  • The previous implementation could not handle the situation when user, password and proxy URI is given various order. Now we just set rules: username set in --
  • -proxy-user overrides username in --
  • -proxy option, no matter in any order username, password and proxy URI are parsed. Likewise, password set in --
  • --proxy-passwd overrides password in --
  • -proxy option.
  • Changed format of ETA. Now no leading 0 is used. If hour part and/or min part is non-zero, and sec part is 0, sec part is omitted, like this "1h3m". Rewritten Metalink XML parser. Now we don't strip white spaces while parsing Metalink V3 document.
  • Now xml attribute and characters in RPC request is not stripped at all.
  • Fixed bug that some information such as port number is lost if redirect URI contains only path component.
  • Apply PREF_MAX_CONNECTION_PER_SERVER to BitTorrent WEB Seeding hosts.
  • Reuse in-flight and pooled URIs when a download is paused.
  • Deprecated --metalink-server option. Use --split option instead.
  • Made max value of --select-file to 65535
  • Use same domain-match algorithm for no-proxy and netrc. Now "example.org" does not domain-match ".example.org" in both functions.
  • For waiting or paused downloads, the options listed in Input File subsection in man page are available in aria2.changeOption RPC method, except for following options: dry-run, metalink-base-uri, parameterized-uri, pause and piece_length.
  • Made --download-result, --save-session, --server-stat-of and --save-cookies option available in aria2.changeGlobalOption. In addition to them, the options listed in Input File subsection in man page are also available, except for following options: checksum, index-out, out, pause and select-file.
  • Made --uri-selector option available in -i list.
  • Support IPv6 literal address in proxy option.
  • Support IPv6 CIDR block in --http-no-proxy option.
  • HttpProxyOptionHandler: Enclose hostname with square brackets if hostname is IPv6 numeric address.