@node BitTorrent
@cindex BitTorrent integration
@section BitTorrent and huge files

If dealing with @ref{Git}, @ref{Feeds, web feeds} and @ref{Multimedia,
multimedia} goes relatively fast, then BitTorrent and huge files
consumes much time. You can not wait for downloads finish, but want to
queue them after.

@pindex aria2
@url{http://aria2.github.io/, aria2} multi-protocol download utility
could be used for solving that issue conveniently. It supports HTTP,
HTTPS, FTP, SFTP and BitTorrent protocols, together with
@url{http://tools.ietf.org/html/rfc5854, Metalink} format. BitTorrent
support is fully-featured: UDP trackers, DHT, PEX, encryption, magnet
URIs, Web-seeding, selective downloads, LPD. @command{aria2} can
accelerate HTTP*/*FTP downloads by segmented multiple parallel
connections.

@pindex aria2-downloaded.sh
You can queue you files after they are completely downloaded.
@file{aria2-downloaded.sh} contents:

@verbatiminclude aria2-downloaded.sh

Also you can prepare
@url{http://aria2.github.io/manual/en/html/aria2c.html#files, input file}
with the jobs you want to download:

@example
$ cat jobs
http://www.nncpgo.org/download/nncp-0.11.tar.xz
    out=nncp.txz
http://www.nncpgo.org/download/nncp-0.11.tar.xz.sig
    out=nncp.txz.sig
$ aria2c \
    --on-download-complete aria2-downloaded.sh \
    --input-file jobs
@end example

and all that downloaded (@file{nncp.txz}, @file{nncp.txz.sig}) files
will be sent to @file{remote.node} when finished.
