xref: /aria2/
NameDateSize

..16-Mar-201612 KiB

.gitignore03-Apr-2014449

.travis.yml01-Jun-2015615

android/26-May-20154 KiB

android-config26-May-20152.1 KiB

android-make03-Apr-20141.6 KiB

android-release03-Apr-20142 KiB

AUTHORS03-Apr-2014166

build_test.sh28-Sep-20151.7 KiB

ChangeLog03-Apr-20140

ChangeLog.old03-Apr-2014848.7 KiB

configure.ac09-Dec-201533.8 KiB

COPYING03-Apr-201417.6 KiB

deps/03-Apr-20144 KiB

doc/03-Apr-20144 KiB

Dockerfile.mingw09-Dec-20153.1 KiB

Dockerfile.raspberrypi27-Apr-20153.2 KiB

examples/03-Apr-20144 KiB

import-po03-Apr-20141.2 KiB

lib/03-Apr-20144 KiB

LICENSE.OpenSSL03-Apr-20146.8 KiB

m4/03-Apr-20144 KiB

Makefile.am26-May-2015891

makerelease03-Apr-2014746

makerelease-osx.mk24-Jun-201514.8 KiB

mingw-build-memo18-May-20152 KiB

mingw-config18-May-20152.8 KiB

mingw-release03-Apr-20142 KiB

NEWS09-Dec-20158.8 KiB

osx-package/03-Apr-20144 KiB

po/03-Apr-20144 KiB

README03-Apr-201415

README.android09-Dec-20152.8 KiB

README.mingw28-Sep-20151.5 KiB

README.rst16-Nov-201522 KiB

script-helper03-Apr-20141.6 KiB

src/14-Dec-201540 KiB

test/30-Nov-201512 KiB

README

README.android

1aria2 for Android devices
2=========================
3
4aria2 is a lightweight multi-protocol & multi-source download utility
5operated in command-line. It supports HTTP/HTTPS, FTP, BitTorrent and
6Metalink.
7
8Install
9-------
10
11aria2 is not an ordinary Android Java application. It is a C++ native
12application and operates in command-line.  You don't have to 'root'
13your device to use aria2.  Because aria2 is a command-line program,
14you need a terminal emulator. First install Android Terminal Emulator
15from Android Market (or build it from source and install. See
16https://github.com/jackpal/Android-Terminal-Emulator/).
17
181. Copy aria2c executable to ``/mnt/sdcard`` on your device.
192. Run Android Terminal Emulator.
203. ``mkdir /data/data/jackpal.androidterm/aria2``
214. ``cat /mnt/sdcard/aria2c > /data/data/jackpal.androidterm/aria2/aria2c``
225. ``chmod 744 /data/data/jackpal.androidterm/aria2/aria2c``
236. Add the following commands to the initial command of Android
24   Terminal Emulator::
25
26       export HOME=/data/data/jackpal.androidterm/aria2; cd $HOME
27
287. Exit Android Terminal Emulator.
298. Run Android Terminal Emulator again.
309. See whether aria2c actually works by invoking ``./aria2c -v``
31
32How to use
33----------
34
35See `the online manual
36<http://aria2.sourceforge.net/manual/en/html/>`_.
37
38Notes
39-----
40
41aria2c executable was generated using android-ndk-r10d.
42
43The following libraries were statically linked.
44
45* openssl 1.0.2e
46* expat 2.1.0
47* c-ares 1.10.0
48* libssh2 1.6.0
49
50Since Android does not have ``/etc/resolv.conf``, c-ares (asynchronous
51DNS resolver) is disabled by default. But name resolution is sometimes
52a little bit slow, so I recommend to enable c-ares. You can enable it
53using ``--async-dns`` and specify DNS servers using
54``--async-dns-server`` option, like this::
55
56  --async-dns --async-dns-server=`getprop net.dns1`,`getprop net.dns2`
57
58Additionally, the CA certificates shipped with Android don't locate in
59the same place as those of normal Unix-like systems do, so this
60workaround might be useful to securely download files via HTTPS::
61
62   cat /etc/security/cacerts/* | aria2c --ca-certificate=/proc/self/fd/0 $@
63
64Because it is tedious to type these long parameters every time you use
65aria2c, the following wrapper shell script would be handy::
66
67    #!/system/bin/sh
68    cat /etc/security/cacerts/* | \
69    /data/data/jackpal.androidterm/aria2c \
70      --ca-certificate=/proc/self/fd/0 \
71      --async-dns \
72      --async-dns-server=`getprop net.dns1`,`getprop net.dns2` \
73      "$@"
74
75Please note that you need to add executable file mode bit to this
76wrapper script too. (e.g., ``chmod 744 /PATH/TO/SCRIPT``)
77
78Known Issues
79------------
80
81* Since Android does not have ``/dev/stdout``, ``-l-`` does not work.
82  ``/proc/self/fd/0`` is a workaround for Android.
83
84* Android Terminal Emulator sometimes stops updating console. It looks
85  like aria2c hangs, but aria2c continues to run.
86

README.mingw

1aria2 Windows build
2===================
3
4aria2 Windows build is provided in 2 flavors: 32bit version and 64bit
5version. The executable was compiled using mingw-w64 cross compiler on
6Debian Linux.
7
8* gcc-mingw-w64               4.9.2-21+15.4
9* binutils-mingw-w64-i686     2.25-8+6.2
10* binutils-mingw-w64-x86-64   2.25-8+6.2
11
12The executable is statically linked, so no extra DLLs are
13necessary. The linked libraries are:
14
15* gmp 6.0.0
16* expat 2.1.0
17* sqlite 3.8.11.1
18* zlib 1.2.8
19* c-ares 1.10.0 with the dns.patch [1] applied
20* libssh2 1.6.0
21
22[1] http://c-ares.haxx.se/mail/c-ares-archive-2014-05/0008.shtml
23
24This build has the following difference from the original release:
25
26* 32bit version only: ``--disable-ipv6`` is enabled by default. (In
27  other words, IPv6 support is disabled by default).
28
29Known Issues
30------------
31
32* When Ctrl-C is pressed, aria2 shows "Shutdown sequence
33  commencing... Press Ctrl-C again for emergency shutdown." But
34  mingw32 build cannot handle second Ctrl-C properly. The second
35  Ctrl-C just kills aria2 instantly without proper shutdown sequence
36  and you may lose data. So don't press Ctrl-C twice.
37
38* --daemon option doesn't work.
39
40* 32bit version only: When ``--disable-ipv6=false`` is given,
41  BitTorrent DHT may not work properly.
42
43* 32bit version only: Most of the IPv6 functionality does not work
44even if ``--disable-ipv6=false`` is given.
45
46References
47----------
48
49* http://smithii.com/aria2
50* http://kemovitra.blogspot.com/2009/12/download-aria2-163.html
51

README.rst

1aria2 - The ultra fast download utility
2=======================================
3:Author:    Tatsuhiro Tsujikawa
4:Email:     t-tujikawa_at_users_dot_sourceforge_dot_net
5
6Disclaimer
7----------
8This program comes with no warranty.
9You must use this program at your own risk.
10
11Introduction
12------------
13
14aria2 is a utility for downloading files. The supported protocols are
15HTTP(S), FTP, SFTP, BitTorrent, and Metalink. aria2 can download a
16file from multiple sources/protocols and tries to utilize your maximum
17download bandwidth. It supports downloading a file from
18HTTP(S)/FTP/SFTP and BitTorrent at the same time, while the data
19downloaded from HTTP(S)/FTP/SFTP is uploaded to the BitTorrent
20swarm. Using Metalink's chunk checksums, aria2 automatically validates
21chunks of data while downloading a file like BitTorrent.
22
23The project page is located at http://aria2.sourceforge.net/.
24
25See `aria2 Online Manual
26<http://aria2.sourceforge.net/manual/en/html/>`_ (`Russian translation
27<http://aria2.sourceforge.net/manual/ru/html/>`_, `Portuguese
28translation <http://aria2.sourceforge.net/manual/pt/html/>`_) to learn
29how to use aria2.
30
31Features
32--------
33
34Here is a list of features:
35
36* Command-line interface
37* Download files through HTTP(S)/FTP/SFTP/BitTorrent
38* Segmented downloading
39* Metalink version 4 (RFC 5854) support(HTTP/FTP/SFTP/BitTorrent)
40* Metalink version 3.0 support(HTTP/FTP/SFTP/BitTorrent)
41* Metalink/HTTP (RFC 6249) support
42* HTTP/1.1 implementation
43* HTTP Proxy support
44* HTTP BASIC authentication support
45* HTTP Proxy authentication support
46* Well-known environment variables for proxy: ``http_proxy``,
47  ``https_proxy``, ``ftp_proxy``, ``all_proxy`` and ``no_proxy``
48* HTTP gzip, deflate content encoding support
49* Verify peer using given trusted CA certificate in HTTPS
50* Client certificate authentication in HTTPS
51* Chunked transfer encoding support
52* Load Cookies from file using the Firefox3 format, Chromium/Google Chrome
53  and the Mozilla/Firefox
54  (1.x/2.x)/Netscape format.
55* Save Cookies in the Mozilla/Firefox (1.x/2.x)/Netscape format.
56* Custom HTTP Header support
57* Persistent Connections support
58* FTP/SFTP through HTTP Proxy
59* Download/Upload speed throttling
60* BitTorrent extensions: Fast extension, DHT, PEX, MSE/PSE,
61  Multi-Tracker, UDP tracker
62* BitTorrent `WEB-Seeding <http://getright.com/seedtorrent.html>`_.
63  aria2 requests chunks more than piece size to reduce the request
64  overhead. It also supports pipelined requests with piece size.
65* BitTorrent Local Peer Discovery
66* Rename/change the directory structure of BitTorrent downloads
67  completely
68* JSON-RPC (over HTTP and WebSocket)/XML-RPC interface
69* Run as a daemon process
70* Selective download in multi-file torrent/Metalink
71* Chunk checksum validation in Metalink
72* Can disable segmented downloading in Metalink
73* Netrc support
74* Configuration file support
75* Download URIs found in a text file or stdin and the destination
76  directory and output file name can be specified optionally
77* Parameterized URI support
78* IPv6 support with Happy Eyeballs
79* Disk cache to reduce disk activity
80
81How to get source code
82----------------------
83
84We maintain the source code at Github:
85https://github.com/tatsuhiro-t/aria2
86
87To get the latest source code, run following command::
88
89    $ git clone https://github.com/tatsuhiro-t/aria2.git
90
91This will create aria2 directory in your current directory and source
92files are stored there.
93
94Dependency
95----------
96
97
98======================== ========================================
99features                  dependency
100======================== ========================================
101HTTPS                    OSX or GnuTLS or OpenSSL or Windows
102SFTP                     libssh2
103BitTorrent               None. Optional: libnettle+libgmp or libgcrypt
104                         or OpenSSL (see note)
105Metalink                 libxml2 or Expat.
106Checksum                 None. Optional: OSX or libnettle or libgcrypt
107                         or OpenSSL or Windows (see note)
108gzip, deflate in HTTP    zlib
109Async DNS                C-Ares
110Firefox3/Chromium cookie libsqlite3
111XML-RPC                  libxml2 or Expat.
112JSON-RPC over WebSocket  libnettle or libgcrypt or OpenSSL
113======================== ========================================
114
115
116.. note::
117
118  libxml2 has precedence over Expat if both libraries are installed.
119  If you prefer Expat, run configure with ``--without-libxml2``.
120
121.. note::
122
123  On Apple OSX the OS-level SSL/TLS support will be preferred. Hence
124  neither GnuTLS nor OpenSSL are required on that platform. If you'd
125  like to disable this behavior, run configure with
126  ``--without-appletls``.
127
128  GnuTLS has precedence over OpenSSL if both libraries are installed.
129  If you prefer OpenSSL, run configure with ``--without-gnutls``
130  ``--with-openssl``.
131
132  On Windows there is SSL implementation available that is based on
133  the native Windows SSL capabilities (Schannel) and it will be
134  preferred.  Hence neither GnuTLS nor OpenSSL are required on that
135  platform.  If you'd like to disable this behavior, run configure
136  with ``--without-wintls``.
137
138.. note::
139
140  On Apple OSX the OS-level checksum support will be preferred,
141  unless aria2 is configured with ``--without-appletls``.
142
143  libnettle has precedence over libgcrypt if both libraries are
144  installed.  If you prefer libgcrypt, run configure with
145  ``--without-libnettle --with-libgcrypt``. If OpenSSL is selected over
146  GnuTLS, neither libnettle nor libgcrypt will be used.
147
148  If none of the optional dependencies are installed, an internal
149  implementation that only supports md5 and sha1 will be used.
150
151  On Windows there is SSL implementation available that is based on
152  the native Windows capabilities and it will be preferred, unless
153  aria2 is configured with ``--without-wintls``.
154
155A user can have one of the following configurations for SSL and crypto
156libraries:
157
158* libgcrypt
159* libnettle
160* OpenSSL
161* GnuTLS + libgcrypt
162* GnuTLS + libnettle
163
164You can disable BitTorrent and Metalink support by providing
165``--disable-bittorrent`` and ``--disable-metalink`` to the configure
166script respectively.
167
168In order to enable async DNS support, you need c-ares.
169
170* c-ares: http://daniel.haxx.se/projects/c-ares/
171
172How to build
173------------
174
175aria2 is primarily written in C++. Initially it was written based on
176C++98/C++03 standard features. We are now migrating aria2 to C++11
177standard. The current source code requires C++11 aware compiler. For
178well-known compilers, such as g++ and clang, the ``-std=c++11`` or
179``-std=c++0x`` flag must be supported.
180
181In order to build aria2 from the source package, you need following
182development packages (package name may vary depending on the
183distribution you use):
184
185* libgnutls-dev    (Required for HTTPS, BitTorrent, Checksum support)
186* nettle-dev       (Required for BitTorrent, Checksum support)
187* libgmp-dev       (Required for BitTorrent)
188* libssh2-1-dev    (Required for SFTP support)
189* libc-ares-dev    (Required for async DNS support)
190* libxml2-dev      (Required for Metalink support)
191* zlib1g-dev       (Required for gzip, deflate decoding support in HTTP)
192* libsqlite3-dev   (Required for Firefox3/Chromium cookie support)
193* pkg-config       (Required to detect installed libraries)
194
195You can use libgcrypt-dev instead of nettle-dev and libgmp-dev:
196
197* libgpg-error-dev (Required for BitTorrent, Checksum support)
198* libgcrypt-dev    (Required for BitTorrent, Checksum support)
199
200You can use libssl-dev instead of
201libgnutls-dev, nettle-dev, libgmp-dev, libgpg-error-dev and libgcrypt-dev:
202
203* libssl-dev       (Required for HTTPS, BitTorrent, Checksum support)
204
205You can use libexpat1-dev instead of libxml2-dev:
206
207* libexpat1-dev    (Required for Metalink support)
208
209On Fedora you need the following packages: gcc, gcc-c++, kernel-devel,
210libgcrypt-devel, libxml2-devel, openssl-devel, gettext-devel, cppunit
211
212If you downloaded source code from git repository, you have to install
213following packages to get autoconf macros:
214
215* libxml2-dev
216* libcppunit-dev
217* autoconf
218* automake
219* autotools-dev
220* autopoint
221* libtool
222
223And run following command to generate configure script and other files
224necessary to build the program::
225
226    $ autoreconf -i
227
228Also you need `Sphinx <http://sphinx.pocoo.org/>`_ to build man page.
229
230If you are building aria2 for Mac OS X, take a look at
231the make-release-os.mk GNU Make makefile.
232
233The quickest way to build aria2 is first run configure script::
234
235    $ ./configure
236
237To build statically linked aria2, use ``ARIA2_STATIC=yes``
238command-line option::
239
240    $ ./configure ARIA2_STATIC=yes
241
242After configuration is done, run ``make`` to compile the program::
243
244    $ make
245
246See `Cross-compiling Windows binary`_ to create a Windows binary.
247See `Cross-compiling Android binary`_ to create an Android binary.
248
249The configure script checks available libraries and enables as many
250features as possible except for experimental features not enabled by
251default.
252
253Since 1.1.0, aria2 checks the certificate of HTTPS servers by default.
254If you build with OpenSSL or the recent version of GnuTLS which has
255``gnutls_certificate_set_x509_system_trust()`` function and the
256library is properly configured to locate the system-wide CA
257certificates store, aria2 will automatically load those certificates
258at the startup. If it is not the case, I recommend to supply the path
259to the CA bundle file. For example, in Debian the path to CA bundle
260file is '/etc/ssl/certs/ca-certificates.crt' (in ca-certificates
261package). This may vary depending on your distribution. You can give
262it to configure script using ``--with-ca-bundle option``::
263
264    $ ./configure --with-ca-bundle='/etc/ssl/certs/ca-certificates.crt'
265    $ make
266
267Without ``--with-ca-bundle`` option, you will encounter the error when
268accessing HTTPS servers because the certificate cannot be verified
269without CA bundle. In such case, you can specify the CA bundle file
270using aria2's ``--ca-certificate`` option.  If you don't have CA bundle
271file installed, then the last resort is disable the certificate
272validation using ``--check-certificate=false``.
273
274Using the native OSX (AppleTLS) and/or Windows (WinTLS) implementation
275will automatically use the system certificate store, so
276``--with-ca-bundle`` is not necessary and will be ignored when using
277these implementations.
278
279By default, the bash_completion file named ``aria2c`` is installed to
280the directory ``$prefix/share/doc/aria2/bash_completion``.  To change
281the install directory of the file, use ``--with-bashcompletiondir``
282option.
283
284After a ``make`` the executable is located at ``src/aria2c``.
285
286aria2 uses CppUnit for automated unit testing. To run the unit test::
287
288    $ make check
289
290Cross-compiling Windows binary
291------------------------------
292
293In this section, we describe how to build a Windows binary using a
294mingw-w64 (http://mingw-w64.sourceforge.net/) cross-compiler on Debian
295Linux. The MinGW (http://www.mingw.org/) may not be able to build
296aria2.
297
298The easiest way to build Windows binary is use Dockerfile.mingw.  See
299Dockerfile.mingw how to build binary.  If you cannot use Dockerfile,
300then continue to read following paragraphs.
301
302Basically, after compiling and installing depended libraries, you can
303do cross-compile just passing appropriate ``--host`` option and
304specifying ``CPPFLAGS``, ``LDFLAGS`` and ``PKG_CONFIG_LIBDIR``
305variables to configure. For convenience and lowering our own
306development cost, we provide easier way to configure the build
307settings.
308
309``mingw-config`` script is a configure script wrapper for mingw-w64.
310We use it to create official Windows build.  This script assumes
311following libraries have been built for cross-compile:
312
313* c-ares
314* expat
315* sqlite3
316* zlib
317* libssh2
318* cppunit
319
320Some environment variables can be adjusted to change build settings:
321
322``HOST``
323  cross-compile to build programs to run on ``HOST``. It defaults to
324  ``i686-w64-mingw32``. To build 64bit binary, specify
325  ``x86_64-w64-mingw32``.
326
327``PREFIX``
328  Prefix to the directory where dependent libraries are installed.  It
329  defaults to ``/usr/local/$HOST``. ``-I$PREFIX/include`` will be
330  added to ``CPPFLAGS``. ``-L$PREFIX/lib`` will be added to
331  ``LDFLAGS``. ``$PREFIX/lib/pkgconfig`` will be set to
332  ``PKG_CONFIG_LIBDIR``.
333
334For example, to build 64bit binary do this::
335
336    $ HOST=x86_64-w64-mingw32 ./mingw-config
337
338If you want libaria2 dll with ``--enable-libaria2``, then don't use
339``ARIA2_STATIC=yes`` and prepare the DLL version of external
340libraries.
341
342Cross-compiling Android binary
343------------------------------
344
345In this section, we describe how to build Android binary using Android
346NDK cross-compiler on Debian Linux.
347
348At the time of this writing, android-ndk-r9 should compile aria2
349without errors.
350
351``android-config`` script is a configure script wrapper for Android
352build.  We use it to create official Android build.  This script
353assumes the following libraries have been built for cross-compile:
354
355* c-ares
356* openssl
357* expat
358* zlib
359* libssh2
360
361When building the above libraries, make sure that disable shared
362library and enable only static library. We are going to link those
363libraries statically.
364
365We use zlib which comes with Android NDK, so we don't have to build it
366by ourselves.
367
368``android-config`` assumes the existence of ``$ANDROID_HOME``
369environment variable which must fulfill the following conditions:
370
371* Android NDK toolchain is installed under
372  ``$ANDROID_HOME/toolchain``.  Refer to "4/ Invoking the compiler
373  (the easy way):" section in Android NDK
374  ``docs/STANDALONE-TOOLCHAIN.html`` to install custom toolchain.
375
376  For example, to install toolchain under ``$ANDROID_HOME/toolchain``,
377  do this::
378
379      $NDK/build/tools/make-standalone-toolchain.sh \
380        --install-dir=$ANDROID_HOME/toolchain \
381        --toolchain=arm-linux-androideabi-4.9 \
382        --platform=android-16
383
384  You may need to add ``--system=linux-x86_64`` to the above
385  command-line for x86_64 Linux host.
386
387* The dependent libraries must be installed under
388  ``$ANDROID_HOME/usr/local``.
389
390Before running ``android-config`` and ``android-make``,
391``$ANDROID_HOME`` environment variable must be set to point to the
392correct path.
393
394After ``android-config``, run ``android-make`` to compile sources.
395
396Building documentation
397----------------------
398
399`Sphinx <http://sphinx.pocoo.org/>`_ is used to build the
400documentation. aria2 man pages will be build when you run ``make`` if
401they are not up-to-date.  You can also build HTML version of aria2 man
402page by ``make html``. The HTML version manual is also available at
403`online <http://aria2.sourceforge.net/manual/en/html/>`_ (`Russian
404translation <http://aria2.sourceforge.net/manual/ru/html/>`_,
405`Portuguese translation
406<http://aria2.sourceforge.net/manual/pt/html/>`_).
407
408BitTorrent
409-----------
410
411About file names
412~~~~~~~~~~~~~~~~
413The file name of the downloaded file is determined as follows:
414
415single-file mode
416    If "name" key is present in .torrent file, file name is the value
417    of "name" key. Otherwise, file name is the base name of .torrent
418    file appended by ".file". For example, .torrent file is
419    "test.torrent", then file name is "test.torrent.file".  The
420    directory to store the downloaded file can be specified by -d
421    option.
422
423multi-file mode
424    The complete directory/file structure mentioned in .torrent file
425    is created.  The directory to store the top directory of
426    downloaded files can be specified by -d option.
427
428Before download starts, a complete directory structure is created if
429needed. By default, aria2 opens at most 100 files mentioned in
430.torrent file, and directly writes to and reads from these files. 
431The number of files to open simultaneously can be controlled by
432``--bt-max-open-files`` option.
433
434DHT
435~~~
436
437aria2 supports mainline compatible DHT. By default, the routing table
438for IPv4 DHT is saved to ``$XDG_CACHE_HOME/aria2/dht.dat`` and the
439routing table for IPv6 DHT is saved to
440``$XDG_CACHE_HOME/aria2/dht6.dat`` unless files exist at
441``$HOME/.aria2/dht.dat`` or ``$HOME/.aria2/dht6.dat``. aria2 uses same
442port number to listen on for both IPv4 and IPv6 DHT.
443
444UDP tracker
445~~~~~~~~~~~
446
447UDP tracker support is enabled when IPv4 DHT is enabled.  The port
448number of UDP tracker is shared with DHT. Use ``--dht-listen-port``
449option to change the port number.
450
451Other things should be noted
452~~~~~~~~~~~~~~~~~~~~~~~~~~~~
453
454* ``-o`` option is used to change the file name of .torrent file itself,
455  not a file name of a file in .torrent file. For this purpose, use
456  ``--index-out`` option instead.
457* The port numbers that aria2 uses by default are 6881-6999 for TCP
458  and UDP.
459* aria2 doesn't configure port-forwarding automatically. Please
460  configure your router or firewall manually.
461* The maximum number of peers is 55. This limit may be exceeded when
462  download rate is low. This download rate can be adjusted using
463  ``--bt-request-peer-speed-limit`` option.
464* As of release 0.10.0, aria2 stops sending request message after
465  selective download completes.
466
467Metalink
468--------
469
470The current implementation supports HTTP(S)/FTP/SFTP/BitTorrent.  The
471other P2P protocols are ignored. Both Metalink4 (RFC 5854) and
472Metalink version 3.0 documents are supported.
473
474For checksum verification, md5, sha-1, sha-224, sha-256, sha-384 and
475sha-512 are supported. If multiple hash algorithms are provided, aria2
476uses stronger one. If whole file checksum verification fails, aria2
477doesn't retry the download and just exits with non-zero return code.
478
479The supported user preferences are version, language, location,
480protocol and os.
481
482If chunk checksums are provided in Metalink file, aria2 automatically
483validates chunks of data during download. This behavior can be turned
484off by a command-line option.
485
486If signature is included in a Metalink file, aria2 saves it as a file
487after the completion of the download.  The file name is download
488file name + ".sig". If same file already exists, the signature file is
489not saved.
490
491In Metalink4, multi-file torrent could appear in metalink:metaurl
492element.  Since aria2 cannot download 2 same torrents at the same
493time, aria2 groups files in metalink:file element which has same
494BitTorrent metaurl and downloads them from a single BitTorrent swarm.
495This is basically multi-file torrent download with file selection, so
496the adjacent files which is not in Metalink document but shares same
497piece with selected file are also created.
498
499If relative URI is specified in metalink:url or metalink:metaurl
500element, aria2 uses the URI of Metalink file as base URI to resolve
501the relative URI. If relative URI is found in Metalink file which is
502read from local disk, aria2 uses the value of ``--metalink-base-uri``
503option as base URI. If this option is not specified, the relative URI
504will be ignored.
505
506Metalink/HTTP
507-------------
508
509The current implementation only uses rel=duplicate links only.  aria2
510understands Digest header fields and check whether it matches the
511digest value from other sources. If it differs, drop connection.
512aria2 also uses this digest value to perform checksum verification
513after download finished. aria2 recognizes geo value. To tell aria2
514which location you prefer, you can use ``--metalink-location`` option.
515
516netrc
517-----
518
519netrc support is enabled by default for HTTP(S)/FTP/SFTP.  To disable
520netrc support, specify -n command-line option.  Your .netrc file
521should have correct permissions(600).
522
523WebSocket
524---------
525
526The WebSocket server embedded in aria2 implements the specification
527defined in RFC 6455. The supported protocol version is 13.
528
529libaria2
530--------
531
532The libaria2 is a C++ library which offers aria2 functionality to the
533client code. Currently, libaria2 is not built by default. To enable
534libaria2, use ``--enable-libaria2`` configure option.  By default,
535only the shared library is built. To build static library, use
536``--enable-static`` configure option as well. See libaria2
537documentation to know how to use API.
538
539References
540----------
541
542* `aria2 Online Manual <http://aria2.sourceforge.net/manual/en/html/>`_
543* http://aria2.sourceforge.net/
544* https://github.com/tatsuhiro-t/aria2
545* `RFC 959 FILE TRANSFER PROTOCOL (FTP) <http://tools.ietf.org/html/rfc959>`_
546* `RFC 1738 Uniform Resource Locators (URL) <http://tools.ietf.org/html/rfc1738>`_
547* `RFC 2428 FTP Extensions for IPv6 and NATs <http://tools.ietf.org/html/rfc2428>`_
548* `RFC 2616 Hypertext Transfer Protocol -- HTTP/1.1 <http://tools.ietf.org/html/rfc2616>`_
549* `RFC 3659 Extensions to FTP <http://tools.ietf.org/html/rfc3659>`_
550* `RFC 3986 Uniform Resource Identifier (URI): Generic Syntax <http://tools.ietf.org/html/rfc3986>`_
551* `RFC 4038 Application Aspects of IPv6 Transition <http://tools.ietf.org/html/rfc4038>`_
552* `RFC 5854 The Metalink Download Description Format <http://tools.ietf.org/html/rfc5854>`_
553* `RFC 6249 Metalink/HTTP: Mirrors and Hashes <http://tools.ietf.org/html/rfc6249>`_
554* `RFC 6265 HTTP State Management Mechanism <http://tools.ietf.org/html/rfc6265>`_
555* `RFC 6266 Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP) <http://tools.ietf.org/html/rfc6266>`_
556* `RFC 6455 The WebSocket Protocol <http://tools.ietf.org/html/rfc6455>`_
557* `RFC 6555 Happy Eyeballs: Success with Dual-Stack Hosts <http://tools.ietf.org/html/rfc6555>`_
558
559* `The BitTorrent Protocol Specification <http://www.bittorrent.org/beps/bep_0003.html>`_
560* `BitTorrent: DHT Protocol <http://www.bittorrent.org/beps/bep_0005.html>`_
561* `BitTorrent: Fast Extension <http://www.bittorrent.org/beps/bep_0006.html>`_
562* `BitTorrent: IPv6 Tracker Extension <http://www.bittorrent.org/beps/bep_0007.html>`_
563* `BitTorrent: Extension for Peers to Send Metadata Files <http://www.bittorrent.org/beps/bep_0009.html>`_
564* `BitTorrent: Extension Protocol <http://www.bittorrent.org/beps/bep_0010.html>`_
565* `BitTorrent: Multitracker Metadata Extension <http://www.bittorrent.org/beps/bep_0012.html>`_
566* `BitTorrent: UDP Tracker Protocol for BitTorrent <http://www.bittorrent.org/beps/bep_0015.html>`_
567  and `BitTorrent udp-tracker protocol specification <http://www.rasterbar.com/products/libtorrent/udp_tracker_protocol.html>`_.
568* `BitTorrent: WebSeed - HTTP/FTP Seeding (GetRight style) <http://www.bittorrent.org/beps/bep_0019.html>`_
569* `BitTorrent: Private Torrents <http://www.bittorrent.org/beps/bep_0027.html>`_
570* `BitTorrent: BitTorrent DHT Extensions for IPv6 <http://www.bittorrent.org/beps/bep_0032.html>`_
571* `BitTorrent: Message Stream Encryption <http://wiki.vuze.com/w/Message_Stream_Encryption>`_
572* `Kademlia: A Peer-to-peer Information System Based on the  XOR Metric <http://pdos.csail.mit.edu/~petar/papers/maymounkov-kademlia-lncs.pdf>`_
573