README 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. aria2 - The ultra fast download utility
  2. =======================================
  3. :Author: Tatsuhiro Tsujikawa
  4. :Email: tujikawa_at_users_dot_sourceforge_dot_net
  5. Disclaimer
  6. ----------
  7. This program comes with no warranty.
  8. You must use this program at your own risk.
  9. Introduction
  10. ------------
  11. aria2 is a utility for downloading files. The supported protocols are HTTP(S),
  12. FTP, BitTorrent, and Metalink.
  13. It can download a file from multiple sources/protocols and tries to utilize
  14. your maximum download bandwidth.
  15. It supports downloading a file from HTTP(S)/FTP and BitTorrent at the same
  16. time, while the data downloaded from HTTP(S)/FTP is uploaded to the BitTorrent
  17. swarm.
  18. Using Metalink's chunk checksums, aria2 automatically validates chunks of data
  19. while downloading a file like BitTorrent.
  20. Here is a list of features.
  21. * Command-line interface
  22. * Download files through HTTP(S)/FTP/BitTorrent
  23. * Segmented downloading
  24. * Metalink version 3.0 support(HTTP/FTP/BitTorrent)
  25. * HTTP/1.1 implementation
  26. * HTTP Proxy support
  27. * HTTP BASIC authentication support
  28. * HTTP Proxy authentication support
  29. * HTTP gzip, deflate content encoding support
  30. * Chunked transfer encoding support
  31. * Load Cookies from file using the Firefox3 format and the Mozilla/Firefox
  32. (1.x/2.x)/Netscape format.
  33. * Custom HTTP Header support
  34. * Persistent Connections support
  35. * FTP through HTTP Proxy
  36. * Download/Upload speed throttling
  37. * BitTorrent extensions: Fast extension, DHT, PEX, MSE/PSE, Multi-Tracker
  38. * Run as a daemon process.
  39. * Selective download in multi-file torrent/Metalink
  40. * Chunk checksum validation in Metalink
  41. * Can disable segmented downloading in Metalink
  42. * Netrc support
  43. * Configuration file support
  44. * Download URIs found in a text file or stdin
  45. * Parameterized URI support
  46. Dependency
  47. ----------
  48. .External Library Dependency
  49. [frame="all", grid="all"]
  50. `--------------------`---------------------------
  51. features dependency
  52. -------------------------------------------------
  53. HTTPS GnuTLS or OpenSSL
  54. BitTorrent GnuTLS+Libgcrypt or OpenSSL
  55. Metalink libxml2 or Expat.
  56. Checksum GnuTLS+Libgcrypt or OpenSSL
  57. gzip, deflate in HTTP zlib
  58. Async DNS C-Ares
  59. Firefox3 cookie libsqlite3
  60. -------------------------------------------------
  61. Note;;
  62. GNU TLS has precedence over OpenSSL if both libraries are installed.
  63. If you prefer OpenSSL, run configure with "--without-gnutls".
  64. Note;;
  65. libxml2 has precedence over Expat if both libraries are installed.
  66. If you prefer Expat, run configure with "--without-libxml2".
  67. You can disable BitTorrent, Metalink support by providing --disable-bittorrent,
  68. --disable-metalink respectively to configure script.
  69. In order to enable async DNS support, you need c-ares
  70. * c-ares: http://daniel.haxx.se/projects/c-ares/
  71. How to build
  72. ------------
  73. In order to build aria2 from the source package, you need following development
  74. packages(package name may vary depending on the distribution you use):
  75. * libgnutls-dev (Required for HTTPS, BitTorrent, Checksum support)
  76. * libgpg-error-dev (Required for BitTorrent, Checksum support)
  77. * libgcrypt-dev (Required for BitTorrent, Checksum support)
  78. * libc-ares-dev (Required for async DNS support)
  79. * libxml2-dev (Required for Metalink support)
  80. * libz1g-dev (Required for gzip, deflate decoding support in HTTP)
  81. * libsqlite3-dev (Required for Firefox3 cookie support)
  82. You can use libssl-dev instead of libgnutls-dev,libgpg-error-dev,libgcrypt-dev:
  83. * libssl-dev (Required for HTTPS, BitTorrent, Checksum support)
  84. You can use libexpat1-dev instead of libxml2-dev:
  85. * libexpat1-dev (Required for Metalink support)
  86. The build process is fairly standard way for *nix programs:
  87. -------------
  88. $ ./configure
  89. $ make
  90. -------------
  91. The executable is aria2c in src directory.
  92. aria2 uses CppUnit for automated unit testing. To run run the unit test:
  93. ------------
  94. $ make check
  95. ------------
  96. BitTorrrent
  97. -----------
  98. About filename
  99. ~~~~~~~~~~~~~~
  100. The filename of the downloaded file is determined as follows:
  101. single-file mode::
  102. If "name" key is present in .torrent file, filename is the value of "name"
  103. key. Otherwise, filename is the basename of .torrent file appended by
  104. ".file". For example, .torrent file is "test.torrrent", then filename is
  105. "test.torrent.file".
  106. The directory to store the downloaded file can be specified by -d option.
  107. multi-file mode::
  108. The complete directory/file structure mentioned in .torrent file is
  109. created.
  110. The directory to store the top directory of downloaded files can be
  111. specified by -d option.
  112. In the default behavior, before download starts, complete directory structure
  113. is created if needed. By default, aria2 opens at most 100 files mentioned in
  114. .torrent file, directly writes to and reads from these files. The number of
  115. files to open can be controlled by "--bt-max-open-files" option.
  116. If "--direct-file-mapping" option set to be false, aria2 creates temporary
  117. file in the store directory. The length of this file is the sum of length of
  118. the files in .torrent file, so at least 2 times more disk space than the file
  119. size itself is required. Writing and reading is done against this file.
  120. After download completes, aria2 creates complete directory structure if needed,
  121. and copies whole file or a part of it to the destination.
  122. DHT
  123. ~~~
  124. As of release 0.13.0, aria2 supports DHT. By default, the routing table is saved
  125. to $HOME/.aria2/dht.dat.
  126. Other things should be noted
  127. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  128. * -o option is used to change the filename of .torrent file itself, not a
  129. filename of a file in .torrent file.
  130. * The port numbers that aria2 uses by default are 6881-6999 for TCP and UDP.
  131. * aria2 doesn't configure port-forwarding automatically. Please configure your
  132. router or firewall manually.
  133. * The maximum number of peers is 55. This limit may be exceeded when download
  134. rate is low.
  135. * As of release 0.10.0, aria2 stops sending request message after selective
  136. download completes,
  137. Metalink
  138. --------
  139. The current implementation supports HTTP/FTP/BitTorrent.
  140. The other P2P protocols are ignored.
  141. For checksum checking, MD5, SHA1, SHA256 are supported. If multiple hash
  142. algorithms are provided, aria2 uses SHA1. If checksum checking is failed, aria2
  143. doesn't retry the download and just exits with non-zero return code.
  144. The supported user preferences are version, language, location, protocol and
  145. os.
  146. If chunk checksums are provided in Metalink file, aria2 automatically validate
  147. a chunk of file while downloading it. This behavior can be turned off by
  148. a command-line option.
  149. If signature is included in a Metalink file, aria2 saves it as a file after the
  150. download completed.
  151. The filename is download filename + ".sig". If same file already exists, the
  152. signature file is not saved.
  153. netrc
  154. -----
  155. netrc support is enabled by default for HTTP(S)/FTP.
  156. To disable netrc support, specify -n command-line option.
  157. Your .netrc file should have correct permissions(600).
  158. SERVER PERFORMANCE PROFILE
  159. --------------------------
  160. This section describes the format of server performance profile.
  161. The file is plain text and each line has several NAME=VALUE pair, delimited by
  162. comma.
  163. Currently following NAMEs are recognized:
  164. host::
  165. Hostname of the server. Required.
  166. protocol::
  167. Protocol for this profile, such as ftp, http. Required.
  168. dl_speed::
  169. The average download speed observed in the previous download in bytes per sec.
  170. Required.
  171. last_updated::
  172. Last contact time in GMT with this server, specified in the seconds from the
  173. Epoch. Required.
  174. status::
  175. ERROR is set when server cannot be reached or out-of-service or timeout
  176. occurred. Otherwise, OK is set.
  177. Those fields must exist in one line. The order of the fields is not significant.
  178. You can put pairs other than above; they are simply ignored.
  179. An example is follow:
  180. --------------------------------------------------------------------------------
  181. host=localhost, protocol=http, dl_speed=32000, last_updated=1222491640, status=OK
  182. host=localhost, protocol=ftp, dl_speed=0, last_updated=1222491632, status=ERROR
  183. --------------------------------------------------------------------------------
  184. Configuration file
  185. ------------------
  186. Configuration file must be placed under $HOME/.aria2 and must be named as
  187. aria2.conf.
  188. In each line, there is 1 parameter whose syntax is name=value pair,
  189. where name is the long command-line option name without '--' prefix.
  190. The lines beginning '#' are treated as comments.
  191. Example:
  192. --------------------------------------
  193. # sample configuration file for aria2c
  194. file-allocation=prealloc
  195. listen-port=60000
  196. seed-ratio=1.0
  197. max-upload-limit=40K
  198. ftp-pasv=true
  199. ---------------------------------------