Giter Site home page Giter Site logo

aria2 / aria2 Goto Github PK

View Code? Open in Web Editor NEW
33.6K 731.0 3.4K 30.69 MB

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.

Home Page: https://aria2.github.io/

License: GNU General Public License v2.0

Shell 0.24% C++ 94.19% C 3.65% Makefile 0.79% M4 1.04% Dockerfile 0.08%
cpp11 http ftp sftp bittorrent rpc download metalink

aria2's Introduction

aria2 - The ultra fast download utility

Disclaimer

This program comes with no warranty. You must use this program at your own risk.

Introduction

aria2 is a utility for downloading files. The supported protocols are HTTP(S), FTP, SFTP, BitTorrent, and Metalink. aria2 can download a file from multiple sources/protocols and tries to utilize your maximum download bandwidth. It supports downloading a file from HTTP(S)/FTP/SFTP and BitTorrent at the same time, while the data downloaded from HTTP(S)/FTP/SFTP is uploaded to the BitTorrent swarm. Using Metalink's chunk checksums, aria2 automatically validates chunks of data while downloading a file like BitTorrent.

The project page is located at https://aria2.github.io/.

See the aria2 Online Manual (Russian translation, Portuguese translation) to learn how to use aria2.

Features

Here is a list of features:

  • Command-line interface
  • Download files through HTTP(S)/FTP/SFTP/BitTorrent
  • Segmented downloading
  • Metalink version 4 (RFC 5854) support(HTTP/FTP/SFTP/BitTorrent)
  • Metalink version 3.0 support(HTTP/FTP/SFTP/BitTorrent)
  • Metalink/HTTP (RFC 6249) support
  • HTTP/1.1 implementation
  • HTTP Proxy support
  • HTTP BASIC authentication support
  • HTTP Proxy authentication support
  • Well-known environment variables for proxy: http_proxy, https_proxy, ftp_proxy, all_proxy and no_proxy
  • HTTP gzip, deflate content encoding support
  • Verify peer using given trusted CA certificate in HTTPS
  • Client certificate authentication in HTTPS
  • Chunked transfer encoding support
  • Load Cookies from the file using the Firefox3 format, Chromium/Google Chrome and the Mozilla/Firefox (1.x/2.x)/Netscape format.
  • Save Cookies in the Mozilla/Firefox (1.x/2.x)/Netscape format.
  • Custom HTTP Header support
  • Persistent Connections support
  • FTP/SFTP through HTTP Proxy
  • Download/Upload speed throttling
  • BitTorrent extensions: Fast extension, DHT, PEX, MSE/PSE, Multi-Tracker, UDP tracker
  • BitTorrent WEB-Seeding. aria2 requests chunk more than piece size to reduce the request overhead. It also supports pipelined requests with piece size.
  • BitTorrent Local Peer Discovery
  • Rename/change the directory structure of BitTorrent downloads completely
  • JSON-RPC (over HTTP and WebSocket)/XML-RPC interface
  • Run as a daemon process
  • Selective download in multi-file torrent/Metalink
  • Chunk checksum validation in Metalink
  • Can disable segmented downloading in Metalink
  • Netrc support
  • Configuration file support
  • Download URIs found in a text file or stdin and the destination directory and output file name can be specified optionally
  • Parameterized URI support
  • IPv6 support with Happy Eyeballs
  • Disk cache to reduce disk activity

Versioning and release schedule

We use 3 numbers for the aria2 version: MAJOR.MINOR.PATCH. We will ship MINOR updates on the 15th of every month. We may skip a release if we have had no changes since the last release. The feature and documentation freeze happens 10 days before the release day (the 5th day of the month) for translation teams. We will raise an issue about the upcoming release around that day.

We may release PATCH releases between regular releases if we have security issues.

The MAJOR version will stay at 1 for the time being.

How to get source code

We maintain the source code at Github: https://github.com/aria2/aria2

To get the latest source code, run the following command:

$ git clone https://github.com/aria2/aria2.git

This will create an aria2 directory in your current directory and source files are stored there.

Dependency

features dependency
HTTPS OSX or GnuTLS or OpenSSL or Windows
SFTP libssh2

BitTorrent

None. Optional: libnettle+libgmp or libgcrypt or OpenSSL (see note)

Metalink libxml2 or Expat.

Checksum

None. Optional: OSX or libnettle or libgcrypt or OpenSSL or Windows (see note)

gzip, deflate in HTTP zlib
Async DNS C-Ares
Firefox3/Chromium cookie libsqlite3
XML-RPC libxml2 or Expat.
JSON-RPC over WebSocket libnettle or libgcrypt or OpenSSL

Note

libxml2 has precedence over Expat if both libraries are installed. If you prefer Expat, run configure with --without-libxml2.

Note

On Apple OSX, OS-level SSL/TLS support will be preferred. Hence neither GnuTLS nor OpenSSL is required on that platform. If you'd like to disable this behavior, run configure with --without-appletls.

GnuTLS has precedence over OpenSSL if both libraries are installed. If you prefer OpenSSL, run configure with --without-gnutls --with-openssl.

On Windows, there is SSL implementation available that is based on the native Windows SSL capabilities (Schannel) and it will be preferred. Hence neither GnuTLS nor OpenSSL is required on that platform. If you'd like to disable this behavior, run configure with --without-wintls.

Note

On Apple OSX, the OS-level checksum support will be preferred, unless aria2 is configured with --without-appletls.

libnettle has precedence over libgcrypt if both libraries are installed. If you prefer libgcrypt, run configure with --without-libnettle --with-libgcrypt. If OpenSSL is selected over GnuTLS, neither libnettle nor libgcrypt will be used.

If none of the optional dependencies are installed, an internal implementation that only supports md5 and sha1 will be used.

On Windows, there is SSL implementation available that is based on the native Windows capabilities and it will be preferred, unless aria2 is configured with --without-wintls.

A user can have one of the following configurations for SSL and crypto libraries:

  • OpenSSL
  • GnuTLS + libgcrypt
  • GnuTLS + libnettle
  • Apple TLS (OSX only)
  • Windows TLS (Windows only)

You can disable BitTorrent and Metalink support by providing --disable-bittorrent and --disable-metalink to the configure script respectively.

To enable async DNS support, you need c-ares.

How to build

aria2 is primarily written in C++. Initially, it was written based on C++98/C++03 standard features. We are now migrating aria2 to the C++11 standard. The current source code requires a C++11 aware compiler. For well-known compilers, such as g++ and clang, the -std=c++11 or -std=c++0x flag must be supported.

To build aria2 from the source package, you need the following development packages (package name may vary depending on the distribution you use):

  • libgnutls-dev (Required for HTTPS, BitTorrent, Checksum support)
  • nettle-dev (Required for BitTorrent, Checksum support)
  • libgmp-dev (Required for BitTorrent)
  • libssh2-1-dev (Required for SFTP support)
  • libc-ares-dev (Required for async DNS support)
  • libxml2-dev (Required for Metalink support)
  • zlib1g-dev (Required for gzip, deflate decoding support in HTTP)
  • libsqlite3-dev (Required for Firefox3/Chromium cookie support)
  • pkg-config (Required to detect installed libraries)

You can use libgcrypt-dev instead of nettle-dev and libgmp-dev:

  • libgpg-error-dev (Required for BitTorrent, Checksum support)
  • libgcrypt-dev (Required for BitTorrent, Checksum support)

You can use libssl-dev instead of libgnutls-dev, nettle-dev, libgmp-dev, libgpg-error-dev and libgcrypt-dev:

  • libssl-dev (Required for HTTPS, BitTorrent, Checksum support)

You can use libexpat1-dev instead of libxml2-dev:

  • libexpat1-dev (Required for Metalink support)

On Fedora you need the following packages: gcc, gcc-c++, kernel-devel, libgcrypt-devel, libxml2-devel, openssl-devel, gettext-devel, cppunit

If you downloaded source code from a git repository, you have to install the following packages to get autoconf macros:

  • libxml2-dev
  • libcppunit-dev
  • autoconf
  • automake
  • autotools-dev
  • autopoint
  • libtool

And run the following command to generate configure script and other files necessary to build the program:

$ autoreconf -i

Also, you need Sphinx to build the man page.

If you are building aria2 for Mac OS X, take a look at the makerelease-osx.mk GNU Make makefile.

The quickest way to build aria2 is first to run configure script:

$ ./configure

To build statically linked aria2, use ARIA2_STATIC=yes command-line option:

$ ./configure ARIA2_STATIC=yes

After configuration is done, run make to compile the program:

$ make

See Cross-compiling Windows binary to create a Windows binary. See Cross-compiling Android binary to create an Android binary.

The configure script checks available libraries and enables as many features as possible except for experimental features not enabled by default.

Since 1.1.0, aria2 checks the certificate of HTTPS servers by default. If you build with OpenSSL or the recent version of GnuTLS which has gnutls_certificate_set_x509_system_trust() function and the library is properly configured to locate the system-wide CA certificates store, aria2 will automatically load those certificates at the startup. If it is not the case, I recommend supplying the path to the CA bundle file. For example, in Debian the path to CA bundle file is '/etc/ssl/certs/ca-certificates.crt' (in ca-certificates package). This may vary depending on your distribution. You can give it to configure script using --with-ca-bundle option:

$ ./configure --with-ca-bundle='/etc/ssl/certs/ca-certificates.crt'
$ make

Without --with-ca-bundle option, you will encounter the error when accessing HTTPS servers because the certificate cannot be verified without the CA bundle. In such a case, you can specify the CA bundle file using aria2's --ca-certificate option. If you don't have the CA bundle file installed, then the last resort is to disable the certificate validation using --check-certificate=false.

Using the native OSX (AppleTLS) and/or Windows (WinTLS) implementation will automatically use the system certificate store, so --with-ca-bundle is not necessary and will be ignored when using these implementations.

By default, the bash_completion file named aria2c is installed to the directory $prefix/share/doc/aria2/bash_completion. To change the install directory of the file, use --with-bashcompletiondir option.

After a make, the executable is located at src/aria2c.

aria2 uses CppUnit for automated unit testing. To run the unit test:

$ make check

Cross-compiling Windows binary

In this section, we describe how to build a Windows binary using a mingw-w64 (http://mingw-w64.org/doku.php) cross-compiler on Debian Linux. The MinGW (http://www.mingw.org/) may not be able to build aria2.

The easiest way to build Windows binary is using Dockerfile.mingw. See Dockerfile.mingw how to build a binary. If you cannot use Dockerfile, then continue to read the following paragraphs.

Basically, after compiling and installing depended libraries, you can do cross-compile just passing appropriate --host option and specifying CPPFLAGS, LDFLAGS, and PKG_CONFIG_LIBDIR variables to configure. For convenience and to lower our own development cost, we provide an easier way to configure the build settings.

mingw-config script is a configure script wrapper for mingw-w64. We use it to create official Windows build. This script assumes the following libraries have been built for cross-compile:

  • c-ares
  • expat
  • sqlite3
  • zlib
  • libssh2
  • cppunit

Some environment variables can be adjusted to change build settings:

HOST

cross-compile to build programs to run on HOST. It defaults to i686-w64-mingw32. To build a 64bit binary, specify x86_64-w64-mingw32.

PREFIX

Prefix to the directory where dependent libraries are installed. It defaults to /usr/local/$HOST. -I$PREFIX/include will be added to CPPFLAGS. -L$PREFIX/lib will be added to LDFLAGS. $PREFIX/lib/pkgconfig will be set to PKG_CONFIG_LIBDIR.

For example, to build a 64bit binary do this:

$ HOST=x86_64-w64-mingw32 ./mingw-config

If you want libaria2 dll with --enable-libaria2, then don't use ARIA2_STATIC=yes and prepare the DLL version of external libraries.

Cross-compiling Android binary

In this section, we describe how to build Android binary using Android NDK cross-compiler on Debian Linux.

At the time of this writing, Android NDK r21e should compile aria2 without errors.

android-config script is a configure script wrapper for Android build. We use it to create an official Android build. This script assumes the following libraries have been built for cross-compile:

  • c-ares
  • openssl
  • expat
  • zlib
  • libssh2

When building the above libraries, make sure that disable shared library and enable only static library. We are going to link those libraries statically.

android-config assumes that $ANDROID_HOME and $NDK environment variables are defined.

We currently use Android NDK r21e. $NDK should point to the directory to Android NDK. The build tools will be found under $NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/.

All the dependent libraries must be installed under $ANDROID_HOME/usr/local.

After android-config, run make to compile sources.

Building documentation

Sphinx is used to building the documentation. aria2 man pages will be build when you run make if they are not up-to-date. You can also build an HTML version of the aria2 man page by make html. The HTML version manual is also available online (Russian translation, Portuguese translation).

BitTorrent

About file names

The file name of the downloaded file is determined as follows:

single-file mode

If "name" key is present in .torrent file, the file name is the value of "name" key. Otherwise, the file name is the base name of .torrent file appended by ".file". For example, .torrent file is "test.torrent", then file name is "test.torrent.file". The directory to store the downloaded file can be specified by -d option.

multi-file mode

The complete directory/file structure mentioned in .torrent file is created. The directory to store the top directory of downloaded files can be specified by -d option.

Before download starts, a complete directory structure is created if needed. By default, aria2 opens at most 100 files mentioned in .torrent file, and directly writes to and reads from these files. The number of files to open simultaneously can be controlled by --bt-max-open-files option.

DHT

aria2 supports mainline compatible DHT. By default, the routing table for IPv4 DHT is saved to $XDG_CACHE_HOME/aria2/dht.dat and the routing table for IPv6 DHT is saved to $XDG_CACHE_HOME/aria2/dht6.dat unless files exist at $HOME/.aria2/dht.dat or $HOME/.aria2/dht6.dat. aria2 uses the same port number to listen on for both IPv4 and IPv6 DHT.

UDP tracker

UDP tracker support is enabled when IPv4 DHT is enabled. The port number of the UDP tracker is shared with DHT. Use --dht-listen-port option to change the port number.

Other things should be noted

  • -o option is used to change the file name of .torrent file itself, not a file name of a file in .torrent file. For this purpose, use --index-out option instead.
  • The port numbers that aria2 uses by default are 6881-6999 for TCP and UDP.
  • aria2 doesn't configure port-forwarding automatically. Please configure your router or firewall manually.
  • The maximum number of peers is 55. This limit may be exceeded when the download rate is low. This download rate can be adjusted using --bt-request-peer-speed-limit option.
  • As of release 0.10.0, aria2 stops sending request messages after selective download completes.

The current implementation supports HTTP(S)/FTP/SFTP/BitTorrent. The other P2P protocols are ignored. Both Metalink4 (RFC 5854) and Metalink version 3.0 documents are supported.

For checksum verification, md5, sha-1, sha-224, sha-256, sha-384, and sha-512 are supported. If multiple hash algorithms are provided, aria2 uses a stronger one. If whole file checksum verification fails, aria2 doesn't retry the download and just exits with a non-zero return code.

The supported user preferences are version, language, location, protocol, and os.

If chunk checksums are provided in the Metalink file, aria2 automatically validates chunks of data during download. This behavior can be turned off by a command-line option.

If a signature is included in a Metalink file, aria2 saves it as a file after the completion of the download. The file name is download file name + ".sig". If the same file already exists, the signature file is not saved.

In Metalink4, a multi-file torrent could appear in metalink:metaurl element. Since aria2 cannot download 2 same torrents at the same time, aria2 groups files in metalink:file element which has the same BitTorrent metaurl, and downloads them from a single BitTorrent swarm. This is a basically multi-file torrent download with file selection, so the adjacent files which are not in Metalink document but share the same piece with the selected file are also created.

If relative URI is specified in metalink:url or metalink:metaurl element, aria2 uses the URI of Metalink file as base URI to resolve the relative URI. If relative URI is found in the Metalink file which is read from the local disk, aria2 uses the value of --metalink-base-uri option as base URI. If this option is not specified, the relative URI will be ignored.

Metalink/HTTP

The current implementation only uses rel=duplicate links. aria2 understands Digest header fields and check whether it matches the digest value from other sources. If it differs, drop the connection. aria2 also uses this digest value to perform checksum verification after the download is finished. aria2 recognizes geo value. To tell aria2 which location you prefer, you can use --metalink-location option.

netrc

netrc support is enabled by default for HTTP(S)/FTP/SFTP. To disable netrc support, specify -n command-line option. Your .netrc file should have correct permissions(600).

WebSocket

The WebSocket server embedded in aria2 implements the specification defined in RFC 6455. The supported protocol version is 13.

libaria2

The libaria2 is a C++ library that offers aria2 functionality to the client code. Currently, libaria2 is not built by default. To enable libaria2, use --enable-libaria2 configure option. By default, only the shared library is built. To build a static library, use --enable-static configure option as well. See libaria2 documentation to know how to use API.

References

aria2's People

Contributors

103yiran avatar a1346054 avatar aliemjay avatar amtlib-dot-dll avatar antbryan avatar artoria2e5 avatar c3mb0 avatar dfandrich avatar diadistis avatar elieux avatar eric1932 avatar floga avatar fornwall avatar frefreak avatar gsavix avatar h3xx avatar himikof avatar iavael avatar itriskti avatar kkartaltepe avatar kwkam avatar nmaier avatar omadjoudj avatar sonnyp avatar tatsuhiro-t avatar tcz avatar tobbez avatar tsekityam avatar wasamasa avatar yixinbc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aria2's Issues

Adding new nonverbose log level

Hi,

Currently the possible log levels are:

  • debug
  • info
  • notice
  • warn
  • error

Debug and Info are too verbose, the rest is only for exceptional things (that you don't want to happen). I desperately need a new log level, which would be very simple, only informing you about what's going on.

[2011-11-11 11:11:11] test.torrent started to download
[2011-11-11 11:11:21] test.torrent is at 12% size: XXX MB estimated time left:...
[2011-11-11 11:11:31] test.torrent is at 25% size: XXX MB estimated time left:...
[2011-11-11 11:11:41] test.torrent  is at 41% size: XXX MB estimated time left:...
[2011-11-11 11:11:11] test.torrent  is at 80% size: XXX MB estimated time left:...
[2011-11-11 11:11:11] test.torrent  has finished downloading
[2011-11-11 11:11:11] test2.torrent  has finished downloading
[2011-11-11 11:11:11] test2.torrent is at 14% size: YYY MB estimated time left:...
[2011-11-11 11:11:11] ERROR test2.torrent failed downloading: "No connection"

Something like this, which informs me about the "normal" events as well, lets me keep track of my downloads, if there was an error, but not too verbose. Do you think this could be implemented?

Wrong download percentage

When I hit CTRL-C, aria2 shows me the download percentage for every single file. But in some of them, the percentage numbers are not right, e.g. 566, -310 etc.. Here is the download log:

[#1 SIZE:7,197.2MiB/15,986.2MiB(45%) CN:0 SEED:0 SPD:0Bs]^C
2012-12-15 14:40:44.402600 NOTICE - Shutdown sequence commencing... Press Ctrl-C again for emergency shutdown.

2012-12-15 14:40:44.403945 NOTICE - Download GID#1 not complete: /home/kx/Desktop/Show

Download Results:
gid|stat|avg speed  |  %|path/URI
===+====+===========+===+=======================================================
  1|INPR|       0B/s| 62|/home/kx/Desktop/Show/Episode_14.mkv
   |    |           | 54|/home/kx/Desktop/Show/Episode_12.mkv
   |    |           | 57|/home/kx/Desktop/Show/Episode_09.mkv
   |    |           | 59|/home/kx/Desktop/Show/Episode_19.mkv
   |    |           | 42|/home/kx/Desktop/Show/Episode_24.mkv
   |    |           | 27|/home/kx/Desktop/Show/Episode_07.mkv
   |    |           | 56|/home/kx/Desktop/Show/Episode_16.mkv
   |    |           |652|/home/kx/Desktop/Show/Episode_17.mkv
   |    |           |-566|/home/kx/Desktop/Show/Episode_06.mkv
   |    |           | 32|/home/kx/Desktop/Show/Episode_01.mkv
   |    |           | 49|/home/kx/Desktop/Show/Episode_18.mkv
   |    |           | 31|/home/kx/Desktop/Show/Episode_05.mkv
   |    |           | 34|/home/kx/Desktop/Show/Episode_03.mkv
   |    |           | 42|/home/kx/Desktop/Show/Episode_20.mkv
   |    |           | 35|/home/kx/Desktop/Show/Episode_22.mkv
   |    |           | 44|/home/kx/Desktop/Show/Episode_21.mkv
   |    |           | 52|/home/kx/Desktop/Show/Episode_13.mkv
   |    |           | 61|/home/kx/Desktop/Show/Episode_10.mkv
   |    |           | 61|/home/kx/Desktop/Show/Episode_11.mkv
   |    |           | 35|/home/kx/Desktop/Show/Episode_02.mkv
   |    |           | 54|/home/kx/Desktop/Show/Episode_15.mkv
   |    |           | 27|/home/kx/Desktop/Show/Episode_08.mkv
   |    |           | 35|/home/kx/Desktop/Show/Episode_23.mkv
   |    |           | 28|/home/kx/Desktop/Show/Episode_04.mkv
   |    |           |  0|/home/kx/Desktop/Show/Information.txt

Status Legend:
(INPR):download in-progress.

aria2 will resume download if the transfer is restarted.
If there are any errors, then see the log file. See '-l' option in help/man page for details.

This is not a particular case, it happened to me at other times too.

P.S.: I'm sorry for my english.

OSX clang compiler error due to old libstdlibc++

The clang that comes with XCode on OSX uses the ancient libstdlibc++ 4.2.1 (IIRC) by default. To have the aria2 code compile one needs to add -stdlib=-stdlib=libc++ to avoid errors about undefined std::shared_ptr, etc.

handshake failure in downloading from https://ftp.mozilla.org/; error download not saved with --save-session

download with command:

aria2c --no-conf "https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/20.0.1/source/firefox-20.0.1.source.tar.bz2"

get error infomation:

05/09 22:17:10 [ERROR] CUID#6 - Download aborted. URI=https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/20.0.1/source/firefox-20.0.1.source.tar.bz2
Exception: [AbstractCommand.cc:314] errorCode=1 URI=https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/20.0.1/source/firefox-20.0.1.source.tar.bz2
  -> [SocketCore.cc:867] errorCode=1 SSL/TLS handshake failure: A record packet with illegal version was received.

download with command:

aria2c --no-conf --save-session download.list "http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/20.0.1/source/firefox-20.0.1.source.tar.bz"

of course get error infomation:

05/09 22:20:58 [ERROR] CUID#6 - Download aborted. URI=http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/20.0.1/source/firefox-20.0.1.source.tar.bz
Exception: [AbstractCommand.cc:314] errorCode=3 URI=http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/20.0.1/source/firefox-20.0.1.source.tar.bz
  -> [HttpSkipResponseCommand.cc:215] errorCode=3 Resource not found

and nothing in download.list at all.

using aira2c from latest master branch.

Enabled Features: Async DNS, BitTorrent, Firefox3 Cookie, GZip, HTTPS, Message Digest, Metalink, XML-RPC
Hash Algorithms: sha-1, sha-224, sha-256, sha-384, sha-512, md5
Libraries: zlib/1.2.8 libxml2/2.8.0 sqlite3/3.7.16.2 GnuTLS/3.1.10 nettle GMP/5.1.1 c-ares/1.9.1

running on Linux 3.8-1-amd64 SMP Debian 3.8.11-1 x86_64 GNU/Linux.

Reload input file

Hello, I am using aria2 specially for torrent, is there a way to just reload the input file in order to add/remove downloads without stop seeding and using one aria2 process?
It could be a nice-have.
Thank you very much for aria2

rst2html is usually installed as rst2html.py

At least if you pip install docutils (or autoinstall it as a dependency for sphinx), it installed as rst2html.py and must be called as such. Calling just rst2html will error out during make in this scenario.

As the debian folks were kind enough to fuck up their packaging by renaming the tool to just rst2html one might still need to detect which of rst2html,rst2html.py, if any, is the correct script name to call.

Compiling gcc -Ofast results in segfault (x86_64-mingw-w64?)

When compiling master after all the C++11 stuff with gcc -Ofast, the resulting binary segfaults at some random location. ( -O2 is fine )

$ $CC --version
x86_64-w64-mingw32-gcc (GCC) 4.8.0

Having all the optimizations in there doesn't help getting a stack, obviously. Nor does it help that I have a cross-compile setup instead of a native-native one.
Anyway that the full stack trace (and yes, the binary has full debug symbols):

Program received signal SIGSEGV, Segmentation fault.
0x0000000100000000 in ?? ()
(gdb) bt
#0  0x0000000100000000 in ?? ()
warning: (Internal error: pc 0xeb in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0xeb in read in psymtab, but not in symtab.)

#1  0x00000000000000ec in ?? (warning: (Internal error: pc 0xeb in read in psymtab, but not in symtab.)

) at /usr/local/x86_64-w64-mingw32/include/c++/4.8.0/bits/stl_algobase.h:337
warning: (Internal error: pc 0xeb in read in psymtab, but not in symtab.)

#2  0x000000000032f108 in ?? ()
#3  0x000000000032f168 in ?? ()
#4  0x0000000000000000 in ?? ()

The segfault only happens when you attempt to download something, and only when the download starts, i.e. after all initialization (incl. rpc).

I didn't have the time to look into this or even determine if it is a compiler or a code bug.
Anyway, my hope is that this maybe can be reproduced in a less exotic setting using a native gcc.

Building on OpenIndiana

I'm trying to build from master source and am running into autoconf issues on stock OpenIndiana:

$ ~/src/aria2 $ autoconf
configure.ac:4: error: Autoconf version 2.67 or higher is required
configure.ac:4: the top level
autom4te: /usr/sfw/bin/gm4 failed with exit status: 63

It seems the standard system autoconf is 2.63. Any suggestions?

session file and config file (redundancy)

shouldn't the session file ignore prefs already set in the config file ?
minimizing the size of the file and allowing resuming from differents OSs ? eg: the download location changes in each os while pointing to the same folder

Http download error

Log file.
I used aria2 as launch daemons on OS X seem like conflict with DNSCrypt (change DNS to 127.0.0.54) it only happen when aria2 start with system magnet link download fine but not http "sudo launchctl unload" then load aria2 download file with no problem.
2013-04-11 04:44:48.600629 [INFO] [SocketCore.cc:1344] Not considered: fe80::1%lo0
2013-04-11 04:44:48.600648 [INFO] [SocketCore.cc:1344] Not considered: 127.0.0.1
2013-04-11 04:44:48.600664 [INFO] [SocketCore.cc:1344] Not considered: ::1
2013-04-11 04:44:48.600681 [INFO] [SocketCore.cc:1342] Found configured address: 127.0.0.53
2013-04-11 04:44:48.600698 [INFO] [SocketCore.cc:1342] Found configured address: 127.0.0.54
2013-04-11 04:44:48.600715 [INFO] [SocketCore.cc:1342] Found configured address: 127.0.0.55
2013-04-11 04:44:48.600762 [INFO] [SocketCore.cc:1344] Not considered: fe80::129a:ddff:feab:2644%en0
2013-04-11 04:44:48.600779 [INFO] [SocketCore.cc:1342] Found configured address: 192.168.1.2
2013-04-11 04:44:48.600793 [INFO] [SocketCore.cc:1349] IPv4 configured=1, IPv6 configured=0

Option to download .torrent without downloading the files in the torrent

There doesn't seem to be an option to download the .torrent file without downloading the files in the torrent. The only option I could find is in a build configuration.
I don't use aria2 as a torrent client, but I need to download the raw .torrent files so I could process them, or send them to other torrent clients, so this option would be very convenient.

make install problem (ignores destdir?)

make DESTDIR="$pkgdir" install

....
Making install in en
make[3]: Entering directory `/home/pb/aria2-git/src/aria2/doc/manual-src/en'
make[4]: Entering directory `/home/pb/aria2-git/src/aria2/doc/manual-src/en'
make[4]: Nothing to be done for `install-exec-am'.
mkdir -p /usr/share/doc/aria2/manual/en && \
cp -r ../../manual/en/html /usr/share/doc/aria2/manual/en && \
rm -f /usr/share/doc/aria2/manual/en/html/.buildinfo
mkdir: cannot create directory โ€˜/usr/share/doc/aria2/manualโ€™: Permission denied
make[4]: *** [install-data-local] Error 1
make[4]: Leaving directory `/home/pb/aria2-git/src/aria2/doc/manual-src/en'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/home/pb/aria2-git/src/aria2/doc/manual-src/en'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/pb/aria2-git/src/aria2/doc/manual-src'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/pb/aria2-git/src/aria2/doc'
make: *** [install-recursive] Error 1

Crossdomain post with HTTP authentication in JSON-RPC

I'm writing a frontend for aria2 with pure javascript and html using JSON-RPC. So that no backend is needed.

But when I trying to add support for rpc-user/rpc-passwd(HTTP basic authentication), it don't work.
When trying to add header Authentication for XmlHttpRequest, browser will sending a OPTIONS request before POST.
http://stackoverflow.com/questions/1099787/jquery-ajax-post-sending-options-as-request-method-in-firefox
https://developer.mozilla.org/en/http_access_control
http://www.w3.org/TR/cors/

aria2 doesn't support this method now. You can test this here with http://<username>:<password>@127.0.0.1:6800/jsonrpc as JSON-RPC Path.

I tried add

diff --git a/src/HttpServer.h b/src/HttpServer.h
index a001737..6cba2e9 100644
--- a/src/HttpServer.h
+++ b/src/HttpServer.h
@@ -135,6 +135,8 @@ public:
     return socketRecvBuffer_;
   }

+  std::string GetAllowOrigin() const { return allowOrigin_; }
+
   void setAllowOrigin(const std::string& allowOrigin)
   {
     allowOrigin_ = allowOrigin;
diff --git a/src/HttpServerCommand.cc b/src/HttpServerCommand.cc
index 0e13094..a6f066e 100644
--- a/src/HttpServerCommand.cc
+++ b/src/HttpServerCommand.cc
@@ -164,6 +164,24 @@ bool HttpServerCommand::execute()
         e_->addCommand(this);
         return false;
       }
+      if (httpServer_->getMethod() == "OPTIONS") {
+        std::string access_control_headers;
+        if (!httpServer_->GetAllowOrigin().empty()) {
+            access_control_headers += "Access-Control-Allow-Methods: POST, GET, OPTIONS\r\n"
+                                     "Access-Control-Max-Age: 1728000\r\n";
+            if (!header->find("access-control-request-headers").empty()) {
+                access_control_headers += "Access-Control-Allow-Headers: ";
+                access_control_headers += header->find("access-control-request-headers");
+                access_control_headers += "\r\n";
+            }
+        }
+        httpServer_->feedResponse(200, access_control_headers);
+        Command* command =
+          new HttpServerResponseCommand(getCuid(), httpServer_, e_, socket_);
+        e_->addCommand(command);
+        e_->setNoWait(true);
+        return true;
+      }
       if(!httpServer_->authenticate()) {
         httpServer_->disableKeepAlive();
         httpServer_->feedResponse

to make it work.

Buiding failed under centos 5.9

[root@dydev aria2-1.16.5]# autoconf -i
aclocal.m4:21: warning: this file was generated for autoconf 2.69.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.
configure.ac:4: error: Autoconf version 2.67 or higher is required
configure.ac:4: the top level
autom4te: /usr/bin/m4 failed with exit status: 63

Why do you use autotools

There are many usefull modern build systems such as cmake. it have ctest that will work perfectly with your cppunit tests. cpack can provide convenient deb and rpm packages for current user platform. of course you can make cmake-tollchain and create build for any platform you want: i586, amd64, arm or for some shit platforms like win32, win64 and mac os

Option enable-mmap doesn't work on OpenWrt

I'm so happy Aria2 finally has a cache-like option: enable-mmap! I built it for OpenWrt, but when I try to run "aria2c --enable-mmap=true" it says unrecognized option `--enable-mmap'. I can't find enable-mmap option using "aria2c -h#all" either, even though I can find option "--force-save" and use it, which was added in the latest version. However, when I build it on Ubuntu, it works all right, do you have any ideas?

UPDATE: I've noticed HAVE_MMAP is not set to 1 when do the configure check. In the Configure.log file, it says "Checking working mmap ....no". But I guess mmap should be available on Openwrt, so I modified Configure file and skipped the mmap check, looks all good right now.

Support async DNS resolving via libuv uv_getaddrinfo

libuv, which aria2c already support as a poller, also offers async DNS resolvers via uv_getaddrinfo. It would be nice to have this as an alternative in place.

  • First of all: refactor code to have a generic (async) DNS Resolver interface
  • Implement that new generic interface for c-ares. Right now, there are quite a few files coupled with the specific implementation.
  • Implement a libuv uv_getaddrinfo based resolver.

This would be great for windows builds: use libuv poll + resolver and get rid of the c-ares "dependency" in the process.

Ubuntu Static compile issue

Commands I ran

autoreconf -i

./configure ARIA2_STATIC=yes

make

This is the beginning of the error

SocketCore.cc:1088: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
util.cc:1231: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
util.cc:1273: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_mpi.o):function _gnutls_x509_read_int: error: undefined reference to 'asn1_read_value'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_mpi.o):function _gnutls_x509_read_int: error: undefined reference to 'asn1_read_value'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_mpi.o):function _gnutls_x509_write_int: error: undefined reference to 'asn1_write_value'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_pk.o):function _gnutls_encode_ber_rs: error: undefined reference to 'asn1_create_element'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_pk.o):function _gnutls_encode_ber_rs: error: undefined reference to 'asn1_delete_structure'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_pk.o):function _gnutls_encode_ber_rs: error: undefined reference to 'asn1_delete_structure'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_pk.o):function _gnutls_decode_ber_rs: error: undefined reference to 'asn1_create_element'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_pk.o):function _gnutls_decode_ber_rs: error: undefined reference to 'asn1_der_decoding'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_pk.o):function _gnutls_decode_ber_rs: error: undefined reference to 'asn1_delete_structure'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_pk.o):function _gnutls_decode_ber_rs: error: undefined reference to 'asn1_delete_structure'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_global.o):function gnutls_global_init: error: undefined reference to 'asn1_check_version'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_global.o):function gnutls_global_init: error: undefined reference to 'asn1_array2tree'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_global.o):function gnutls_global_init: error: undefined reference to 'asn1_array2tree'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_global.o):function gnutls_global_init: error: undefined reference to 'asn1_check_version'
/usr/lib/i386-linux-gnu/libgnutls.a(auth_cert.o):function _gnutls_proc_cert_cert_req: error: undefined reference to 'asn1_create_element'
/usr/lib/i386-linux-gnu/libgnutls.a(auth_cert.o):function _gnutls_proc_cert_cert_req: error: undefined reference to 'asn1_der_decoding'
/usr/lib/i386-linux-gnu/libgnutls.a(auth_cert.o):function _gnutls_proc_cert_cert_req: error: undefined reference to 'asn1_der_decoding_startEnd'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_sig.o):function pk_prepare_hash: error: undefined reference to 'asn1_create_element'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_sig.o):function pk_prepare_hash: error: undefined reference to 'asn1_write_value'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_sig.o):function pk_prepare_hash: error: undefined reference to 'asn1_write_value'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_sig.o):function pk_prepare_hash: error: undefined reference to 'asn1_write_value'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_sig.o):function pk_prepare_hash: error: undefined reference to 'asn1_der_coding'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_sig.o):function pk_prepare_hash: error: undefined reference to 'asn1_der_coding'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_dh_primes.o):function gnutls_dh_params_import_pkcs3: error: undefined reference to 'asn1_der_decoding'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_dh_primes.o):function gnutls_dh_params_export_pkcs3: error: undefined reference to 'asn1_der_coding'
/usr/lib/i386-linux-gnu/libgnutls.a(gnutls_dh_primes.o):function gnutls_dh_params_export_pkcs3: error: undefined reference to 'asn1_der_coding'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_obj_import: error: undefined reference to 'p11_kit_uri_set_attribute'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_obj_import: error: undefined reference to 'p11_kit_uri_get_token_info'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_obj_import: error: undefined reference to 'p11_kit_uri_get_module_info'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_obj_import: error: undefined reference to 'p11_kit_uri_set_attribute'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_obj_import: error: undefined reference to 'p11_kit_uri_set_attribute'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function find_flags: error: undefined reference to 'p11_kit_uri_match_token_info'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function find_flags: error: undefined reference to 'p11_kit_uri_match_module_info'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function find_token_num: error: undefined reference to 'p11_kit_uri_get_token_info'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function find_token_num: error: undefined reference to 'p11_kit_uri_get_module_info'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function find_obj_url: error: undefined reference to 'p11_kit_uri_match_token_info'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function find_obj_url: error: undefined reference to 'p11_kit_uri_match_module_info'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function find_obj_url: error: undefined reference to 'p11_kit_uri_get_attribute'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function find_obj_url: error: undefined reference to 'p11_kit_uri_get_attribute'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function find_obj_url: error: undefined reference to 'p11_kit_uri_get_attribute'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function gnutls_pkcs11_add_provider: error: undefined reference to 'p11_kit_load_initialize_module'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function gnutls_pkcs11_add_provider: error: undefined reference to 'p11_kit_finalize_module'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_get_info: error: undefined reference to 'p11_kit_uri_get_attribute'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_get_info: error: undefined reference to 'p11_kit_uri_get_token_info'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_get_info: error: undefined reference to 'p11_kit_space_strlen'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_get_info: error: undefined reference to 'p11_kit_uri_get_token_info'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_get_info: error: undefined reference to 'p11_kit_uri_get_module_info'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_get_info: error: undefined reference to 'p11_kit_uri_get_module_info'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function gnutls_pkcs11_init: error: undefined reference to 'p11_kit_initialize_registered'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function gnutls_pkcs11_init: error: undefined reference to 'p11_kit_strerror'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function gnutls_pkcs11_init: error: undefined reference to 'p11_kit_registered_modules'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function gnutls_pkcs11_init: error: undefined reference to 'p11_kit_registered_module_to_name'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function gnutls_pkcs11_deinit: error: undefined reference to 'p11_kit_finalize_module'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function gnutls_pkcs11_deinit: error: undefined reference to 'p11_kit_finalize_registered'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_url_to_info: error: undefined reference to 'p11_kit_uri_parse'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_url_to_info: error: undefined reference to 'p11_kit_uri_new'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_url_to_info: error: undefined reference to 'p11_kit_uri_free'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_info_to_url: error: undefined reference to 'p11_kit_uri_format'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function gnutls_pkcs11_obj_init: error: undefined reference to 'p11_kit_uri_new'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function gnutls_pkcs11_obj_deinit: error: undefined reference to 'p11_kit_uri_free'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function find_objs: error: undefined reference to 'p11_kit_uri_match_token_info'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function find_objs: error: undefined reference to 'p11_kit_uri_match_module_info'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_find_slot: error: undefined reference to 'p11_kit_uri_match_token_info'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_find_slot: error: undefined reference to 'p11_kit_uri_match_module_info'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function gnutls_pkcs11_token_get_info: error: undefined reference to 'p11_kit_space_strlen'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function gnutls_pkcs11_token_get_info: error: undefined reference to 'p11_kit_uri_free'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function gnutls_pkcs11_token_get_info: error: undefined reference to 'p11_kit_uri_free'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_login: error: undefined reference to 'p11_kit_uri_new'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_login: error: undefined reference to 'p11_kit_pin_request'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_login: error: undefined reference to 'p11_kit_pin_get_length'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_login: error: undefined reference to 'p11_kit_pin_get_value'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_login: error: undefined reference to 'p11_kit_pin_unref'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_login: error: undefined reference to 'p11_kit_uri_get_pinfile'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_login: error: undefined reference to 'p11_kit_space_strdup'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_login: error: undefined reference to 'p11_kit_space_strdup'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_login: error: undefined reference to 'p11_kit_uri_new'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_login: error: undefined reference to 'p11_kit_pin_new_for_string'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_find_object: error: undefined reference to 'p11_kit_uri_get_attributes'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_call_token_func: error: undefined reference to 'p11_kit_space_strdup'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs11.o):function pkcs11_strerror: error: undefined reference to 'p11_kit_strerror'
/usr/lib/i386-linux-gnu/libgnutls.a(common.o):function _gnutls_x509_oid_data2string: error: undefined reference to 'asn1_der_decoding'
/usr/lib/i386-linux-gnu/libgnutls.a(common.o):function _gnutls_x509_oid_data2string: error: undefined reference to 'asn1_read_value'
/usr/lib/i386-linux-gnu/libgnutls.a(common.o):function _gnutls_x509_oid_data2string: error: undefined reference to 'asn1_read_value'
/usr/lib/i386-linux-gnu/libgnutls.a(common.o):function _gnutls_x509_get_signed_data: error: undefined reference to 'asn1_der_decoding_startEnd'
/usr/lib/i386-linux-gnu/libgnutls.a(crl.o):function gnutls_x509_crl_get_crt_count: error: undefined reference to 'asn1_number_of_elements'
/usr/lib/i386-linux-gnu/libgnutls.a(crl.o):function gnutls_x509_crl_get_raw_issuer_dn: error: undefined reference to 'asn1_der_decoding_startEnd'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs12.o):function _pkcs12_decode_safe_contents: error: undefined reference to 'asn1_number_of_elements'
/usr/lib/i386-linux-gnu/libgnutls.a(pkcs12.o):function _pkcs12_decode_safe_contents: error: undefined reference to 'asn1_number_of_elements'
/usr/lib/i386-linux-gnu/libgnutls.a(privkey_pkcs8.o):function read_pkcs_schema_params: error: undefined reference to 'asn1_der_decoding_startEnd'
/usr/lib/i386-linux-gnu/libgnutls.a(x509.o):function gnutls_x509_crt_get_subject: error: undefined reference to 'asn1_find_node'
/usr/lib/i386-linux-gnu/libgnutls.a(x509.o):function gnutls_x509_crt_get_issuer: error: undefined reference to 'asn1_find_node'
/usr/lib/i386-linux-gnu/libgnutls.a(x509.o):function gnutls_x509_dn_get_rdn_ava: error: undefined reference to 'asn1_find_node'
/usr/lib/i386-linux-gnu/libgnutls.a(x509.o):function gnutls_x509_dn_get_rdn_ava: error: undefined reference to 'asn1_find_node'
/usr/lib/i386-linux-gnu/libgnutls.a(x509.o):function gnutls_x509_dn_get_rdn_ava: error: undefined reference to 'asn1_get_length_der'
/usr/lib/i386-linux-gnu/libgnutls.a(x509.o):function gnutls_x509_dn_get_rdn_ava: error: undefined reference to 'asn1_get_tag_der'
/usr/lib/i386-linux-gnu/libgnutls.a(x509.o):function gnutls_x509_dn_get_rdn_ava: error: undefined reference to 'asn1_get_length_der'
/usr/lib/i386-linux-gnu/libgnutls.a(cipher.o):function wrap_gcry_cipher_close: error: undefined reference to 'gcry_cipher_close'
/usr/lib/i386-linux-gnu/libgnutls.a(cipher.o):function wrap_gcry_cipher_setiv: error: undefined reference to 'gcry_cipher_setiv'
/usr/lib/i386-linux-gnu/libgnutls.a(cipher.o):function wrap_gcry_cipher_setkey: error: undefined reference to 'gcry_cipher_setkey'
/usr/lib/i386-linux-gnu/libgnutls.a(cipher.o):function wrap_gcry_cipher_init: error: undefined reference to 'gcry_cipher_open'
/usr/lib/i386-linux-gnu/libgnutls.a(cipher.o):function wrap_gcry_cipher_init: error: undefined reference to 'gcry_cipher_open'
/usr/lib/i386-linux-gnu/libgnutls.a(cipher.o):function wrap_gcry_cipher_init: error: undefined reference to 'gcry_cipher_open'
/usr/lib/i386-linux-gnu/libgnutls.a(cipher.o):function wrap_gcry_cipher_init: error: undefined reference to 'gcry_cipher_open'
/usr/lib/i386-linux-gnu/libgnutls.a(cipher.o):function wrap_gcry_cipher_decrypt: error: undefined reference to 'gcry_cipher_decrypt'
/usr/lib/i386-linux-gnu/libgnutls.a(cipher.o):function wrap_gcry_cipher_encrypt: error: undefined reference to 'gcry_cipher_encrypt'
/usr/lib/i386-linux-gnu/libgnutls.a(init.o):function gnutls_crypto_init: error: undefined reference to 'gcry_control'
/usr/lib/i386-linux-gnu/libgnutls.a(init.o):function gnutls_crypto_init: error: undefined reference to 'gcry_control'
/usr/lib/i386-linux-gnu/libgnutls.a(init.o):function gnutls_crypto_init: error: undefined reference to 'gcry_check_version'
/usr/lib/i386-linux-gnu/libgnutls.a(init.o):function gnutls_crypto_init: error: undefined reference to 'gcry_control'
/usr/lib/i386-linux-gnu/libgnutls.a(init.o):function gnutls_crypto_init: error: undefined reference to 'gcry_control'
/usr/lib/i386-linux-gnu/libgnutls.a(init.o):function gnutls_crypto_init: error: undefined reference to 'gcry_check_version'
/usr/lib/i386-linux-gnu/libgnutls.a(mac.o):function wrap_gcry_md_copy: error: undefined reference to 'gcry_md_copy'
/usr/lib/i386-linux-gnu/libgnutls.a(mac.o):function wrap_gcry_hash_init: error: undefined reference to 'gcry_md_open'
/usr/lib/i386-linux-gnu/libgnutls.a(mac.o):function wrap_gcry_hash_init: error: undefined reference to 'gcry_md_open'
/usr/lib/i386-linux-gnu/libgnutls.a(mac.o):function wrap_gcry_hash_init: error: undefined reference to 'gcry_md_open'
/usr/lib/i386-linux-gnu/libgnutls.a(mac.o):function wrap_gcry_hash_init: error: undefined reference to 'gcry_md_open'
/usr/lib/i386-linux-gnu/libgnutls.a(mac.o):function wrap_gcry_md_close: error: undefined reference to 'gcry_md_close'
/usr/lib/i386-linux-gnu/libgnutls.a(mac.o):function wrap_gcry_md_write: error: undefined reference to 'gcry_md_write'
/usr/lib/i386-linux-gnu/libgnutls.a(mac.o):function wrap_gcry_md_setkey: error: undefined reference to 'gcry_md_setkey'
/usr/lib/i386-linux-gnu/libgnutls.a(mac.o):function wrap_gcry_mac_output: error: undefined reference to 'gcry_md_read'
/usr/lib/i386-linux-gnu/libgnutls.a(mac.o):function wrap_gcry_mac_output: error: undefined reference to 'gcry_md_get_algo'
/usr/lib/i386-linux-gnu/libgnutls.a(mac.o):function wrap_gcry_mac_output: error: undefined reference to 'gcry_md_get_algo_dlen'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_print: error: undefined reference to 'gcry_mpi_print'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_scan: error: undefined reference to 'gcry_mpi_scan'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_release: error: undefined reference to 'gcry_mpi_release'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_prime_check: error: undefined reference to 'gcry_prime_check'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_generate_group: error: undefined reference to 'gcry_prime_generate'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_generate_group: error: undefined reference to 'gcry_prime_check'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_generate_group: error: undefined reference to 'gcry_mpi_release'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_generate_group: error: undefined reference to 'gcry_prime_release_factors'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_generate_group: error: undefined reference to 'gcry_prime_group_generator'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_generate_group: error: undefined reference to 'gcry_prime_release_factors'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_generate_group: error: undefined reference to 'gcry_mpi_release'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_generate_group: error: undefined reference to 'gcry_prime_release_factors'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_generate_group: error: undefined reference to 'gcry_mpi_release'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_get_nbits: error: undefined reference to 'gcry_mpi_get_nbits'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_new: error: undefined reference to 'gcry_mpi_new'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_div: error: undefined reference to 'gcry_mpi_div'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_div: error: undefined reference to 'gcry_mpi_get_nbits'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_div: error: undefined reference to 'gcry_mpi_new'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_mul_ui: error: undefined reference to 'gcry_mpi_mul_ui'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_mul_ui: error: undefined reference to 'gcry_mpi_get_nbits'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_mul_ui: error: undefined reference to 'gcry_mpi_new'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_sub_ui: error: undefined reference to 'gcry_mpi_sub_ui'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_sub_ui: error: undefined reference to 'gcry_mpi_get_nbits'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_sub_ui: error: undefined reference to 'gcry_mpi_new'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_add_ui: error: undefined reference to 'gcry_mpi_add_ui'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_mul: error: undefined reference to 'gcry_mpi_mul'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_sub: error: undefined reference to 'gcry_mpi_sub'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_add: error: undefined reference to 'gcry_mpi_add'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_mulm: error: undefined reference to 'gcry_mpi_mulm'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_subm: error: undefined reference to 'gcry_mpi_subm'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_addm: error: undefined reference to 'gcry_mpi_addm'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_powm: error: undefined reference to 'gcry_mpi_powm'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_set_ui: error: undefined reference to 'gcry_mpi_set_ui'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_set: error: undefined reference to 'gcry_mpi_set'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_mod: error: undefined reference to 'gcry_mpi_mod'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_cmp_ui: error: undefined reference to 'gcry_mpi_cmp_ui'
/usr/lib/i386-linux-gnu/libgnutls.a(lt3-mpi.o):function wrap_gcry_mpi_cmp: error: undefined reference to 'gcry_mpi_cmp'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_verify: error: undefined reference to 'gcry_sexp_release'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_verify: error: undefined reference to 'gcry_sexp_release'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_verify: error: undefined reference to 'gcry_sexp_release'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_verify: error: undefined reference to 'gcry_sexp_build'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_verify: error: undefined reference to 'gcry_sexp_build'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_verify: error: undefined reference to 'gcry_sexp_build'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_verify: error: undefined reference to 'gcry_sexp_build'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_verify: error: undefined reference to 'gcry_pk_verify'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_sign: error: undefined reference to 'gcry_sexp_release'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_sign: error: undefined reference to 'gcry_pk_sign'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_sign: error: undefined reference to 'gcry_sexp_find_token'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_sign: error: undefined reference to 'gcry_sexp_nth_mpi'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_sign: error: undefined reference to 'gcry_sexp_find_token'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_sign: error: undefined reference to 'gcry_sexp_nth_mpi'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_sign: error: undefined reference to 'gcry_sexp_find_token'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_sign: error: undefined reference to 'gcry_sexp_nth_mpi'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_decrypt: error: undefined reference to 'gcry_pk_decrypt'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_decrypt: error: undefined reference to 'gcry_sexp_nth_mpi'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_encrypt: error: undefined reference to 'gcry_pk_encrypt'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function _wrap_gcry_pk_encrypt: error: undefined reference to 'gcry_sexp_find_token'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function wrap_gcry_pk_fixup: error: undefined reference to 'gcry_mpi_invm'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function wrap_gcry_pk_fixup: error: undefined reference to 'gcry_mpi_invm'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function wrap_gcry_pk_generate_params: error: undefined reference to 'gcry_check_version'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function wrap_gcry_pk_generate_params: error: undefined reference to 'gcry_pk_genkey'
/usr/lib/i386-linux-gnu/libgnutls.a(pk.o):function wrap_gcry_pk_generate_params: error: undefined reference to 'gcry_pk_genkey'
/usr/lib/i386-linux-gnu/libgnutls.a(rnd.o):function wrap_gcry_rnd: error: undefined reference to 'gcry_randomize'
/usr/lib/i386-linux-gnu/libgnutls.a(rnd.o):function wrap_gcry_rnd: error: undefined reference to 'gcry_create_nonce'
/usr/lib/i386-linux-gnu/libgnutls.a(rnd.o):function wrap_gcry_rnd_init: error: undefined reference to 'gcry_create_nonce'
/usr/lib/i386-linux-gnu/libgnutls.a(rnd.o):function wrap_gcry_rnd_init: error: undefined reference to 'gcry_randomize'
/usr/lib/i386-linux-gnu/libgnutls.a(sign.o):function _gnutls_x509_pkix_sign: error: undefined reference to 'asn1_copy_node'
/usr/lib/i386-linux-gnu/libsqlite3.a(sqlite3.o):function unixDlOpen: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/i386-linux-gnu/libxml2.a(nanohttp.o):function xmlNanoHTTPConnectHost: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/i386-linux-gnu/libxml2.a(nanohttp.o):function xmlNanoHTTPConnectHost: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/i386-linux-gnu/libxml2.a(nanoftp.o):function xmlNanoFTPConnect: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/i386-linux-gnu/libxml2.a(nanoftp.o):function xmlNanoFTPConnect: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/i386-linux-gnu/libxml2.a(nanoftp.o):function xmlNanoFTPConnect: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/i386-linux-gnu/libxml2.a(nanoftp.o):function xmlNanoFTPConnect: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: ld returned 1 exit status
make[2]: *** [aria2c] Error 1
make[2]: Leaving directory /home/johny/Downloads/aria2/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/johny/Downloads/aria2'
make: *** [all] Error 2

First line of configuration file not read properly

image

This issue seems to occur on Windows only.
aria2c doesn't read the first line correctly, always giving "unknown option" warning for whatever option specified. I have to put a comment there. As you can see, comment is not recognized either.

Some options doesn't work when adding tasks via xml-rpc

Hi,

As far as I've tested, 'allow-overwrite' and 'auto-file-renaming' are not functional when adding tasks via xml-rpc like this:

aria2.addUri(['http://g.cn'], {'allow-overwrite': True, 'auto-file-renaming': False})

I haven't tested other options, which may also have this problem.

Download error with -x5 -k1M.

Download started fine but after a while it start to lost connection then error
2013-05-23 22:49:22.888032 [DEBUG] [AbstractCommand.cc:437] CUID#9 - Aborting download
If only use -x5 it lost connection to 1 but continue to work, log here.

Feature request: Don't lost completed jobs between session...

When download of torrent job is done, aria2 session doesn't save more the job in file session. If you need resume this job for seeding is needed re-add the torrent file in correct directory.

For a few torrents it's not a problem but if you try use aria2 like a torrent manager with a large number of torrent jobs is painfull resume all.

I suggest the inclusion of one option like "--persistent-job", that force aria2 always save the related job in the save session file. And it can work for all types of jobs for log purpose...

Thank for the attention and all excellent work in aria2.

Torrent download >100% complete

STR:

  • Start downloading a torrent with e.g. --select-file=3,11
  • At some point CTRL-C to cleanly shutdown
  • Resume previous download but with narrower --select-file, e.g. --select-file=3
  • Download at one point reaches 100%, but then goes beyond 100% and is not complete: Neither is the download stopped (or put into seeding mode) nor is it actually complete; there are still pieces missing.

Debian x86_64 on squeeze, aria2 1.15.1 self-built deb (official sources from sf.net; gcc 4.4; using debian/ from official squeeze package source, sans patches)

My guess is that while aria2 shows the actual download size requested, it does in fact download all missing pieces from the previous selection instead of just the pieces from the current selection (e.g. pieces for files #3 and #11 instead of just #3).

Peer refreshing

Hi,

I found that long running torrents are getting a major drop off speed after, say 10 hours. I'm left with two connections and achieving a low speed. If I pause the job and instantly get it running again, it quickly finds another 44 connections and maxes out my connection (torrent is healthy). Is there an option for updating the tracker in intervals? How can I maintain the speed and accept new connections?

Auto detect encoding of URIs and file names

Currently aria2 use percent-encoded file names if the encoding of them can not be recognized.
It may be better if you can use libraries such as Mozilla's Universal Charset Detector to detect them automatically and decode them.

input file with complited downloads

it would be nice to have a flag or option saved/added to input file to tell aria not to retry downloading them again
use case:
input-file=sessionfile
save-session=sessionfile
force-save=true
anew option say iscompete gets the download shown as complete after checking its md5sum if available and let torrents load normally (seed in most cases)

UDP tracker support

If there is no explicit reason to not support UDP trackers, it should be implemented sometime.

Task management functions

--save-session can not be saved in order to complete the task, do not automatically BitTorrent restart kinds.
ps: I hope to be able to support task management

"Too large size" on Android build

hi, i built aria2 on an Android device. But when I download a torrent file which include a file is larger than 4G, aria2 report "Too large size".
I think the reason is that off_t is 32bit on android, and in source file bittorrent_helper.cc:254
if(fileLengthData->i() > std::numeric_limits<off_t>::max()) {
throw DOWNLOAD_FAILURE_EXCEPTION(fmt(EX_TOO_LARGE_FILE, length));

Should i hack std:numeric_limits<offt_t> to numeric_limits<int64_t>?

Memory usage control

Bt prolonged use will continue to take up memory space, how to control memory usage?

How to properly seed torrents & maintain a session

Hi,

I've been using aria2 for a few days now, it is a great tool but there's one thing I can't figure out. I want to seed a few torrents simultaneously, but I can't configure it properly.

My config:

continue
dir=/home/kuba/Downloads
file-allocation=falloc
log-level=info
max-connection-per-server=4
min-split-size=5M
enable-rpc
enable-dht
bt-save-metadata
rpc-save-upload-metadata
force-save
#seed-ratio=3
check-unverified
bt-seed-unverified
save-session=/home/kuba/.aria2/session
input-file=/home/kuba/.aria2/session

What I'm aiming for is to run an instance of aria2 and then add downloads via rpc (I use webui-aria2). What happened to me when I first tried to seed multiple torrents was that torrents disappeared entirely after completion. I then figured out saving sessions, using input files, saving metadata, and recently force-save'ing. That worked fine until I got 4 jobs at the same time (4 metadata + 4 actual seeding jobs). But then I restarted the instance and I can see 4 metadata jobs, but no seeding is done (or maybe they disappear from rpc interface, I can't really tell). When I restart one of the metadata jobs, they disappear too from the webui but they're saved in the session file and they're back up again after restarting (metadata jobs, still no actual seeding).

I have no idea where to go from now, the output is cluttered with errors saying that udp is not supported yet, I don't know if it has any effect on this case.

By the way, if I can't connect to trackers via udp, does it mean I'm not connected to as many peers as I could be?

Cookies

Hi,

I'm trying to get aria2c to load chrome's cookie file under ~/Library/Application Support/Google/Chrome/Default/Cookies

It fails (twice); is there any way I can get more info on why it's failing to load the cookies file?

Thanks!

something wrong when i buiding on xubuntu 12

Hi, tatsuhiro
i want to budild aria2-1.16.1 in my xubuntu-12.04.1-desktop-i386 system. xubuntu have run "2. sudo apt-get install autoconf automake libcppunit-dev autopoint openssl libtool sphinx-common sphinxsearch libgcrypt11-dev libxml2-dev pkg-config" before i build.
I download aria2-master.zip from your web ,then i relase aria2-master.zip in xubuntu. after that i run the below command
mv aria2-master aria2-1.16.1
cd aria2-1.16.1
autoreconf โ€“i
"autoreconf -i" show the below wrong infromation:
autoreconf: configure.ac' orconfigure.in' is required

would you please advise me how to deal with this?
i want to add the newest aria2 to openwrt which i buid on xubuntu 12.04?
many thanks.

--enable-rpc fail on OS X 10.8

% aria2c --enable-rpc --rpc-listen-all=true --rpc-allow-origin-all -c

[NOTICE] IPv4 RPC: listening to port 6800

[NOTICE] IPv6 RPC: listening to port 6800

[ERROR] Failed to load trusted CA certificates from system. Cause: An unimplemented or disabled feature has been requested.

no matter i run aria2c with sudo or not, the result shows like the lines above.

any ideas?

aria2.addTorrent with options failed

Using JSON-RPC, no problem in aria2.addUri with options, but get 500 error in aria2.addTorrent with options.
It works well:

{
    "jsonrpc": "2.0",
    "id": "10",
    "method": "aria2.addUri",
    "params":
    [
        [
            "http://url/to/a.torrent"
        ],
        {
            "pause": "true"
        }
    ]
}

It is alse right:

{
    "jsonrpc": "2.0",
    "id": "11",
    "method": "aria2.addTorrent",
    "params":
    [
        "(base64 of torrent file)"
    ]
}

But it only get a 500 error using urllib2:

{
    "jsonrpc": "2.0",
    "id": "11",
    "method": "aria2.addTorrent",
    "params":
    [
        "(base64 of torrent file)",
        {"pause": "true"}
    ]
}

and, the return from aria2:

{
    "error": {
        "code": 1,
        "message": "The parameter at 1 has wrong type."
    },
    "id": "11",
    "jsonrpc": "2.0"
}

Why it is wrong?

addTorrent with external hard drive

Procedure:
Download torrent with aria2rpc addTorrent 'torrent' -d 'external hard drive'
Pause it, reboot computer torrent file disappear from aria list:
[ERROR] [download_helper.cc:415] Unrecognized URI or unsupported protocol: /Volumes/My Passport/untitled folder/untitled folder2/6a002c0f0d00808dab5b5bcfe40800cace6b945e.torrent
aria2 running as deamon.

Overall download limit does not work as far as I can tell

First things first, I'm calculating downspeed using

def downspeed
  aria2_client.tell_active.inject(0) do |sum, download|
    sum += Integer(download["downloadSpeed"])
  end
end

Sampling this 10 times with 5s pause I get

[461418, 463992, 468939, 472702, 475559, 470763, 478367, 476623, 471814, 472302].
  instance_eval { reduce(:+) / size.to_f } # => 471247.9

This is an average of 460 kilobytes. Currently there is no limit set and 460 kb is roughly my line limit. So things are working as expected. Theoretically, I should be able to halve this speed to roughly 200 kilobytes by issuing:

a.global_opts["max-overall-download-limit"] # => "0"
a.change_global_opt("max-overall-download-limit", "200K") # => "OK"
a.global_opts["max-overall-download-limit"] => "204800"

After 1 minute and 5 minutes I get the following samplings:

[787563, 687335, 737474, 616957, 379094, 261147, 762531, 712533, 713150, 528384] 
 # => avg: 618616.8
[241659, 295719, 204817, 291366, 306119, 229627, 515800, 438093, 409138, 354970]
 # => avg: 328730.8

This just seems broken to me because both average above the limit I set for aria. Furthermore, I've used out-of-band monitoring tools like the iftop command to see what the actual bandwidth consumption is. In both cases, it hovers around 460 kb which is my line speed.

It is worth noting that if I seriously restrict the usage (10K) then aria does actually limit it - but not to 10K!

[116286, 104248, 107772, 115253, 84493, 42524, 118660, 105615, 110290, 118871].
  instance_eval { reduce(:+) / size.to_f } # => 102401.2 # 100 K!

I have a couple of questions:

  1. Is my download-speed-measuring function OK? Is there anything I can do to improve it?
  2. Am I doing something stupid with the max-overall-download-limit option?

Some points to note:

  1. All my downloads are added via metalinks: I call addUri with a http://foo.metalink file.
  2. This is on Ubuntu 12.04 using the PPA. Aria is at 1.13.0.

Add optional flag to specify location of the bash_completion folder location

Hi, I'm the current packager for aria2 for archlinux.

The current behavior for autotools is that the bash_completion directory is hardcoded to install to doc_bashcompletiondir = $(docdir)/bash_completion

When installing, it might be convenient for there to be a flag to specify the location of the bash_completion folder to install the "aria2c" completion file.

The flag could be named --bashcompletiondir and if it is unspecified it would default to $(docdir)/bash_completion and would install the files that are currently installed which are "aria2c" and "README.txt". But if the flag is specified, it would only install the "aria2c" file to the location specified by --bashcompletiondir

This would be especially helpful for packagers by providing a clean interface for them to specify a bash_completion location.

For example, the current location to install bash_completions on archlinux is /usr/share/bash-completion/completions
So the flag would work like:
./configure --bashcompletiondir=/usr/share/bash-completion/completions

This is also a lot cleaner than the current method to install the bash_completion after installing aria2:

add bash completion (aria2 automatically installs to a temporary target directory)

install -d ${pkgdir}/usr/share/bash-completion/completions
install -m644 ${pkgdir}/usr/share/doc/aria2/bash_completion/aria2c
${pkgdir}/usr/share/bash-completion/completions
rm -rf ${pkgdir}/usr/share/doc/aria2/bash_completion

Resume Seeding via RPC ?

Yeah , aria2 is cool , but i have one last question is how can i resume seeding via RPC ?

I read the aria2 docs and try several parameter such as 'check-integrity' 'bt-seed-unverified' but no luck .

damaged download if 'WrDiskCacheEntry is not empty' occured

It does not alway occured, but if something just like this:

04/23 11:26:46 [WARN] WrDiskCacheEntry is not empty size=16103

in http(s) download, the file seems damaged after download complete.
It seems only appear when --disk-cache has a non-zero value, and --file-allocation is falloc or trunc (I've not try other value).

using aira2c from latest master branch.
Enabled Features: Async DNS, BitTorrent, Firefox3 Cookie, GZip, HTTPS, Message Digest, Metalink, XML-RPC
Hash Algorithms: sha-1, sha-224, sha-256, sha-384, sha-512, md5
Libraries: zlib/1.2.7 libxml2/2.8.0 sqlite3/3.7.16.1 GnuTLS/3.1.10 nettle GMP/5.0.5 c-ares/1.9.1
on Debian 3.2.41-2 x86_64 GNU/Linux.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.