aria2c.1.txt 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642
  1. ARIA2C(1)
  2. =========
  3. Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
  4. NAME
  5. ----
  6. aria2c - The ultra fast download utility
  7. SYNOPSIS
  8. --------
  9. aria2c ['OPTIONS'] ['URL' | 'TORRENT_FILE' | 'METALINK_FILE']...
  10. DESCRIPTION
  11. -----------
  12. aria2 is a utility for downloading files. The supported protocols are
  13. HTTP(S), FTP, BitTorrent, and Metalink. aria2 can download a file from
  14. multiple sources/protocols and tries to utilize your maximum download
  15. bandwidth. It supports downloading a file from HTTP(S)/FTP and
  16. BitTorrent at the same time, while the data downloaded from
  17. HTTP(S)/FTP is uploaded to the BitTorrent swarm. Using Metalink's
  18. chunk checksums, aria2 automatically validates chunks of data while
  19. downloading a file like BitTorrent.
  20. OPTIONS
  21. -------
  22. Basic Options
  23. ~~~~~~~~~~~~~
  24. *-d*, *--dir*=DIR::
  25. The directory to store the downloaded file.
  26. *-i*, *--input-file*=FILE::
  27. Downloads URIs found in FILE. You can specify multiple URIs for a single
  28. entity: separate URIs on a single line using the TAB character.
  29. Reads input from stdin when '-' is specified.
  30. The additional *out* and *dir* options can be specified after each line of
  31. URIs. This optional line must start with white space(s).
  32. See *Input File* subsection for details.
  33. *-l*, *--log*=LOG::
  34. The file name of the log file. If '-' is specified, log is written to
  35. stdout.
  36. *-j*, *--max-concurrent-downloads*=N::
  37. Set maximum number of parallel downloads for every static (HTTP/FTP) URL,
  38. torrent and metalink. See also *-s* and *-C* option.
  39. Default: '5'
  40. *-V*, *--check-integrity*[='true'|'false']::
  41. Check file integrity by validating piece hashes.
  42. This option has effect only in BitTorrent and Metalink downloads with
  43. chunk checksums.
  44. Use this option to re-download a damaged portion of a file.
  45. Default: 'false'
  46. *-c*, *--continue*::
  47. Continue downloading a partially downloaded file.
  48. Use this option to resume a download started by a web browser or another
  49. program which downloads files sequentially from the beginning.
  50. Currently this option is only applicable to HTTP(S)/FTP downloads.
  51. *-h*, *--help*[=CATEGORY]::
  52. Print usage and exit.
  53. The help messages are classified in several categories.
  54. For example, type "*--help*=http" for detailed explanation for the options
  55. related to HTTP. If no matching category is found, search option name using
  56. a given word in middle match and print the result.
  57. Available Values: 'basic', 'advanced', 'http', 'https', 'ftp', 'metalink',
  58. 'bittorrent', 'all'
  59. Default: 'basic'
  60. HTTP/FTP Options
  61. ~~~~~~~~~~~~~~~~
  62. *--all-proxy*=PROXY::
  63. Use this proxy server for all protocols.
  64. You can override this setting and specify a proxy server for a particular
  65. protocol using *--http-proxy*, *--https-proxy* and *--ftp-proxy* options.
  66. This affects all URLs.
  67. The format of PROXY is [\http://][USER:PASSWORD@]HOST[:PORT]
  68. *--connect-timeout*=SEC::
  69. Set the connect timeout in seconds to establish connection to
  70. HTTP/FTP/proxy server. After the connection is established, this
  71. option makes no effect and *--timeout* option is used instead.
  72. Default: '60'
  73. *--dry-run*[='true'|'false']::
  74. If 'true' is given, aria2 just checks whether the remote file is
  75. available and doesn't download data. This option has effect on
  76. HTTP/FTP download. BitTorrent downloads are canceled if 'true' is
  77. specified. Default: 'false'
  78. *--lowest-speed-limit*=SPEED::
  79. Close connection if download speed is lower than or equal to this
  80. value(bytes per sec).
  81. '0' means aria2 does not have a lowest speed limit.
  82. You can append 'K' or 'M'(1K = 1024, 1M = 1024K).
  83. This option does not affect BitTorrent downloads.
  84. Default: '0'
  85. *--max-file-not-found*=NUM::
  86. If aria2 receives `file not found' status from the remote HTTP/FTP
  87. servers NUM times without getting a single byte, then force the
  88. download to fail. Specify '0' to disable this option. This options is
  89. effective only when using HTTP/FTP servers.
  90. Default: '0'
  91. *-m*, *--max-tries*=N::
  92. Set number of tries. '0' means unlimited.
  93. Default: '5'
  94. *-n*, *--no-netrc*::
  95. Disables netrc support. netrc support is enabled by default.
  96. *--no-proxy*=DOMAINS::
  97. Specify comma separated hostnames or domains where proxy should not be
  98. used.
  99. *-o*, *--out*=FILE::
  100. The file name of the downloaded file.
  101. [NOTE]
  102. In Metalink or BitTorrent download you cannot specify file name.
  103. The file name specified here is only used when the URLs fed to aria2
  104. are done by command line without *-i*, *-Z* option. For example:
  105. aria2c -o myfile.zip "http://mirror1/file.zip" "http://mirror2/file.zip"
  106. *--proxy-method*=METHOD::
  107. Set the method to use in proxy request. 'METHOD' is either 'get' or
  108. 'tunnel'. HTTPS downloads always use 'tunnel' regardless of this
  109. option.
  110. Default: 'get'
  111. *-R*, *--remote-time*[='true'|'false']::
  112. Retrieve timestamp of the remote file from the remote HTTP/FTP
  113. server and if it is available, apply it to the local file.
  114. Default: 'false'
  115. *--retry-wait*=SEC::
  116. Set the seconds to wait to retry after an error has occured.
  117. Specify a value between '0' and '60'.
  118. Default: '5'
  119. *--server-stat-of*=FILE::
  120. Specify the filename to which performance profile of the servers is
  121. saved. You can load saved data using *--server-stat-if* option. See
  122. *Server Performance Profile* subsection below for file format.
  123. *--server-stat-if*=FILE::
  124. Specify the filename to load performance profile of the servers. The
  125. loaded data will be used in some URI selector such as 'feedback'.
  126. See also *--uri-selector* option. See *Server Performance Profile*
  127. subsection below for file format.
  128. *--server-stat-timeout*=SEC::
  129. Specifies timeout in seconds to invalidate performance profile of
  130. the servers since the last contact to them.
  131. Default: '86400' (24hours)
  132. *-s*, *--split*=N::
  133. Download a file using N connections.
  134. If more than N URLs are given, first N URLs are used and remaining URLs are
  135. used for backup.
  136. If less than N URLs are given, those URLs are used more than once so that N
  137. connections total are made simultaneously.
  138. Please see *-j* option too.
  139. Please note that in Metalink download, this option has no effect and use
  140. *-C* option instead.
  141. Default: '5'
  142. *-t*, *--timeout*=SEC::
  143. Set timeout in seconds.
  144. Default: '60'
  145. *--uri-selector*=SELECTOR::
  146. Specify URI selection algorithm. The possible values are 'inorder',
  147. 'feedback' and 'adaptive'. If 'inorder' is given, URI is tried in
  148. the order appeared in the URI list. If 'feedback' is given, aria2
  149. uses download speed observed in the previous downloads and choose
  150. fastest server in the URI list. This also effectively skips dead
  151. mirrors. The observed download speed is a part of performance
  152. profile of servers mentioned in *--server-stat-of* and
  153. *--server-stat-if* options. If 'adaptive' is given, selects one of
  154. the best mirrors for the first and reserved connections. For
  155. supplementary ones, it returns mirrors which has not been tested
  156. yet, and if each of them has already been tested, returns mirrors
  157. which has to be tested again. Otherwise, it doesn't select anymore
  158. mirrors. Like 'feedback', it uses a performance profile of servers.
  159. Default: 'feedback'
  160. HTTP Specific Options
  161. ~~~~~~~~~~~~~~~~~~~~~
  162. *--ca-certificate*=FILE::
  163. Use the certificate authorities in FILE to verify the peers.
  164. The certificate file must be in PEM format and can contain multiple CA
  165. certificates.
  166. Use *--check-certificate* option to enable verification.
  167. *--certificate*=FILE::
  168. Use the client certificate in FILE.
  169. The certificate must be in PEM format.
  170. You may use *--private-key* option to specify the private key.
  171. *--check-certificate*[='true'|'false']::
  172. Verify the peer using certificates specified in *--ca-certificate* option.
  173. Default: 'true'
  174. *--http-auth-challenge*[='true'|'false']::
  175. Send HTTP authorization header only when it is requested by the
  176. server. If 'false' is set, then authorization header is always sent
  177. to the server. There is an exception: if username and password are
  178. embedded in URI, authorization header is always sent to the server
  179. regardless of this option. Default: 'false'
  180. *--http-auth-scheme*=SCHEME::
  181. Set HTTP authentication scheme.
  182. Currently, 'basic' is the only supported scheme.
  183. Default: 'basic'
  184. *--http-user*=USER::
  185. Set HTTP user. This affects all URLs.
  186. *--http-passwd*=PASSWD::
  187. Set HTTP password. This affects all URLs.
  188. *--http-proxy*=PROXY::
  189. Use this proxy server for HTTP. See also *--all-proxy* option.
  190. This affects all URLs.
  191. The format of PROXY is [\http://][USER:PASSWORD@]HOST[:PORT]
  192. *--https-proxy*=PROXY::
  193. Use this proxy server for HTTPS. See also *--all-proxy* option.
  194. This affects all URLs.
  195. The format of PROXY is [\http://][USER:PASSWORD@]HOST[:PORT]
  196. *--private-key*=FILE::
  197. Use the private key in FILE.
  198. The private key must be decrypted and in PEM format.
  199. The behavior when encrypted one is given is undefined.
  200. See also *--certificate* option.
  201. *--referer*=REFERER::
  202. Set Referer. This affects all URLs.
  203. *--enable-http-keep-alive*[='true'|'false']::
  204. Enable HTTP/1.1 persistent connection.
  205. Default: 'true'
  206. *--enable-http-pipelining*[='true'|'false']::
  207. Enable HTTP/1.1 pipelining.
  208. Default: 'false'
  209. *--header*=HEADER::
  210. Append HEADER to HTTP request header.
  211. You can use this option repeatedly to specify more than one header:
  212. aria2c *--header*="X-A: b78" *--header*="X-B: 9J1" "http://host/file"
  213. *--load-cookies*=FILE::
  214. Load Cookies from FILE using the Firefox3 format (SQLite3) and the
  215. Mozilla/Firefox(1.x/2.x)/Netscape format.
  216. [NOTE]
  217. If aria2 is built without libsqlite3, then it doesn't support Firefox3 cookie format.
  218. *--save-cookies*=FILE::
  219. Save Cookies to FILE in Mozilla/Firefox(1.x/2.x)/ Netscape
  220. format. If FILE already exists, it is overwritten. Session Cookies
  221. are also saved and their expiry values are treated as 0. Possible
  222. Values: '/path/to/file'
  223. *--use-head*[='true'|'false']::
  224. Use HEAD method for the first request to the HTTP server.
  225. Default: 'true'
  226. *-U*, *--user-agent*=USER_AGENT::
  227. Set user agent for HTTP(S) downloads.
  228. FTP Specific Options
  229. ~~~~~~~~~~~~~~~~~~~~
  230. *--ftp-user*=USER::
  231. Set FTP user. This affects all URLs.
  232. Default: 'anonymous'
  233. *--ftp-passwd*=PASSWD::
  234. Set FTP password. This affects all URLs.
  235. Default: 'ARIA2USER@'
  236. *-p*, *--ftp-pasv*[='true'|'false']::
  237. Use the passive mode in FTP.
  238. If 'false' is given, the active mode will be used.
  239. Default: 'true'
  240. *--ftp-proxy*=PROXY::
  241. Use this proxy server for FTP. See also *--all-proxy* option.
  242. This affects all URLs.
  243. The format of PROXY is [\http://][USER:PASSWORD@]HOST[:PORT]
  244. *--ftp-type*=TYPE::
  245. Set FTP transfer type. TYPE is either 'binary' or 'ascii'.
  246. Default: 'binary'
  247. *--ftp-reuse-connection*[='true'|'false']::
  248. Reuse connection in FTP.
  249. Default: 'true'
  250. BitTorrent/Metalink Options
  251. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  252. *--select-file*=INDEX...::
  253. Set file to download by specifying its index.
  254. You can find the file index using the *--show-files* option.
  255. Multiple indexes can be specified by using ",", for example: '3,6'.
  256. You can also use "-" to specify a range: '1-5'.
  257. "," and "-" can be used together: '1-5,8,9'.
  258. When used with the -M option, index may vary depending on the query
  259. (see *--metalink-** options).
  260. [NOTE]
  261. In multi file torrent, the adjacent files specified by this option may
  262. also be downloaded. This is by design, not a bug.
  263. A single piece may include several files or part of files, and aria2
  264. writes the piece to the appropriate files.
  265. *-S*, *--show-files*::
  266. Print file listing of .torrent or .metalink file and exit.
  267. In case of .torrent file, additional information
  268. (infohash, piece length, etc) is also printed.
  269. BitTorrent Specific Options
  270. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  271. *--bt-external-ip*=IPADDRESS::
  272. Specify the external IP address to report to a BitTorrent
  273. tracker. Although this function is named "external", it can accept
  274. any kind of IP addresses. IPADDRESS must be a numeric IP address.
  275. *--bt-hash-check-seed*[='true'|'false']::
  276. If 'true' is given, after hash check using *--check-integrity* option and
  277. file is complete, continue to seed file. If you want to check file
  278. and download it only when it is damaged or incomplete, set this
  279. option to 'false'. This option has effect only on BitTorrent download.
  280. Default: 'true'
  281. *--bt-max-open-files*=NUM::
  282. Specify maximum number of files to open in each BitTorrent download.
  283. Default: '100'
  284. *--bt-max-peers*=NUM::
  285. Specify the maximum number of peers per torrent. '0' means
  286. unlimited. See also *--bt-request-peer-speed-limit* option.
  287. Default: '55'
  288. *--bt-min-crypto-level*='plain'|'arc4'::
  289. Set minimum level of encryption method.
  290. If several encryption methods are provided by a peer, aria2 chooses the lowest
  291. one which satisfies the given level.
  292. Default: 'plain'
  293. *--bt-require-crypto*='true'|'false'::
  294. If true is given, aria2 doesn't accept and establish connection with legacy
  295. BitTorrent handshake(\19BitTorrent protocol).
  296. Thus aria2 always uses Obfuscation handshake.
  297. Default: 'false'
  298. *--bt-request-peer-speed-limit*=SPEED::
  299. If the whole download speed of every torrent is lower than SPEED,
  300. aria2 temporarily increases the number of peers to try for more
  301. download speed. Configuring this option with your preferred download
  302. speed can increase your download speed in some cases.
  303. You can append 'K' or 'M'(1K = 1024, 1M = 1024K).
  304. Default: '50K'
  305. *--bt-seed-unverified*[='true'|'false']::
  306. Seed previously downloaded files without verifying piece hashes.
  307. Default: 'false'
  308. *--bt-tracker-interval*=SEC::
  309. Set the interval in seconds between tracker requests. This
  310. completely overrides interval value and aria2 just uses this value
  311. and ignores the min interval and interval value in the response of
  312. tracker. If '0' is set, aria2 determines interval based on the
  313. response of tracker and the download progress. Default: '0'
  314. *--dht-entry-point*=HOST:PORT::
  315. Set host and port as an entry point to DHT network.
  316. *--dht-file-path*=PATH::
  317. Change the DHT routing table file to PATH.
  318. Default: '$HOME/.aria2/dht.dat'
  319. *--dht-listen-port*=PORT...::
  320. Set UDP listening port for DHT.
  321. Multiple ports can be specified by using ",", for example: '6881,6885'.
  322. You can also use "-" to specify a range: '6881-6999'. "," and "-" can be used
  323. together.
  324. Default: '6881-6999'
  325. [NOTE]
  326. Make sure that the specified ports are open for incoming UDP traffic.
  327. *--enable-dht*[='true'|'false']::
  328. Enable DHT functionality. If a private flag is set in a torrent, aria2
  329. doesn't use DHT for that download even if 'true' is given.
  330. Default: 'false'
  331. *--enable-peer-exchange*[='true'|'false']::
  332. Enable Peer Exchange extension. If a private flag is set in a torrent, this
  333. feature is disabled for that download even if 'true' is given.
  334. Default: 'true'
  335. *--follow-torrent*='true'|'false'|'mem'::
  336. If 'true' or 'mem' is specified, when a file whose suffix is ".torrent" or content
  337. type is "application/x-bittorrent" is downloaded, aria2 parses it as a torrent
  338. file and downloads files mentioned in it.
  339. If 'mem' is specified, a torrent file is not written to the disk, but is just
  340. kept in memory.
  341. If 'false' is specified, the action mentioned above is not taken.
  342. Default: 'true'
  343. *-O*, *--index-out*=INDEX=PATH::
  344. Set file path for file with index=INDEX. You can find the file index
  345. using the *--show-files* option. PATH is a relative path to the
  346. path specified in *--dir* option. You can use this option multiple
  347. times. Using this option, you can specify the output filenames of
  348. BitTorrent downloads.
  349. *--listen-port*=PORT...::
  350. Set TCP port number for BitTorrent downloads.
  351. Multiple ports can be specified by using ",", for example: '6881,6885'.
  352. You can also use "-" to specify a range: '6881-6999'.
  353. "," and "-" can be used together: '6881-6889,6999'.
  354. Default: '6881-6999'
  355. [NOTE]
  356. Make sure that the specified ports are open for incoming TCP traffic.
  357. *--max-overall-upload-limit*=SPEED::
  358. Set max overall upload speed in bytes/sec.
  359. '0' means unrestricted.
  360. You can append 'K' or 'M'(1K = 1024, 1M = 1024K).
  361. To limit the upload speed per torrent, use *--max-upload-limit* option.
  362. Default: '0'
  363. *-u*, *--max-upload-limit*=SPEED::
  364. Set max upload speed per each torrent in bytes/sec.
  365. '0' means unrestricted.
  366. You can append 'K' or 'M'(1K = 1024, 1M = 1024K).
  367. To limit the overall upload speed, use *--max-overall-upload-limit* option.
  368. Default: '0'
  369. *--peer-id-prefix*=PEERI_ID_PREFIX::
  370. Specify the prefix of peer ID. The peer ID in BitTorrent is 20 byte length.
  371. If more than 20 bytes are specified, only first 20 bytes are used.
  372. If less than 20 bytes are specified, the random alphabet characters are
  373. added to make it's length 20 bytes.
  374. Default: '-aria2-'
  375. *--seed-ratio*=RATIO::
  376. Specify share ratio. Seed completed torrents until share ratio reaches
  377. RATIO.
  378. You are strongly encouraged to specify equals or more than '1.0' here.
  379. Specify '0.0' if you intend to do seeding regardless of share ratio.
  380. If *--seed-time* option is specified along with this option, seeding ends when
  381. at least one of the conditions is satisfied.
  382. Default: '1.0'
  383. *--seed-time*=MINUTES::
  384. Specify seeding time in minutes. Also see the *--seed-ratio* option.
  385. *-T*, *--torrent-file*=TORRENT_FILE::
  386. The path to the .torrent file.
  387. You are not required to use this option because you can specify a torrent file without -T.
  388. Metalink Specific Options
  389. ~~~~~~~~~~~~~~~~~~~~~~~~~
  390. *--follow-metalink*='true'|'false'|'mem'::
  391. If 'true' or 'mem' is specified, when a file whose suffix is ".metaink" or content
  392. type of "application/metalink+xml" is downloaded, aria2 parses it as a metalink
  393. file and downloads files mentioned in it.
  394. If 'mem' is specified, a metalink file is not written to the disk, but is just
  395. kept in memory.
  396. If 'false' is specified, the action mentioned above is not taken.
  397. Default: 'true'
  398. *-M*, *--metalink-file*=METALINK_FILE::
  399. The file path to .metalink file. You are not required to use this option because you can
  400. specify a metalink file without -M.
  401. *-C*, *--metalink-servers*=NUM_SERVERS::
  402. The number of servers to connect to simultaneously.
  403. Some Metalinks regulate the number of servers to connect.
  404. aria2 strictly respects them.
  405. This means that if Metalink defines the maxconnections attribute lower
  406. than NUM_SERVERS, then aria2 uses the value of maxconnections attribute
  407. instead of NUM_SERVERS.
  408. See also *-s* and *-j* options.
  409. Default: '5'
  410. *--metalink-language*=LANGUAGE::
  411. The language of the file to download.
  412. *--metalink-location*=LOCATION[,...]::
  413. The location of the preferred server.
  414. A comma-delimited list of locations is acceptable, for example, 'JP,US'.
  415. *--metalink-os*=OS::
  416. The operating system of the file to download.
  417. *--metalink-version*=VERSION::
  418. The version of the file to download.
  419. *--metalink-preferred-protocol*=PROTO::
  420. Specify preferred protocol.
  421. The possible values are 'http', 'https', 'ftp' and 'none'.
  422. Specify 'none' to disable this feature.
  423. Default: 'none'
  424. *--metalink-enable-unique-protocol*='true'|'false'::
  425. If 'true' is given and several protocols are available for a mirror in a
  426. metalink file, aria2 uses one of them.
  427. Use *--metalink-preferred-protocol* option to specify the preference of
  428. protocol.
  429. Default: 'true'
  430. XML-RPC Options
  431. ~~~~~~~~~~~~~~~
  432. *--enable-xml-rpc*[='true'|'false']::
  433. Enable XML-RPC server. It is strongly recommended to set username
  434. and password using *--xml-rpc-user* and *--xml-rpc-passwd*
  435. option. See also *--xml-rpc-listen-port* option. Default: 'false'
  436. *--xml-rpc-listen-port*=PORT::
  437. Specify a port number for XML-RPC server to listen to. Possible
  438. Values: '1024'-'65535' Default: '6800'
  439. *--xml-rpc-max-request-size*=SIZE::
  440. Set max size of XML-RPC request. If aria2 detects the request is
  441. more than SIZE bytes, it drops connection. Default: '2M'
  442. *--xml-rpc-passwd*=PASSWD::
  443. Set XML-RPC password.
  444. *--xml-rpc-user*=USER::
  445. Set XML-RPC user.
  446. Advanced Options
  447. ~~~~~~~~~~~~~~~~
  448. *--allow-overwrite*='true'|'false'::
  449. If 'false' is given, and a file already exists but the corresponding
  450. control file (filename.aria2) doesn't exist, then aria2 will not
  451. re-download the file. See also *--auto-file-renaming* option.
  452. Default: 'false'
  453. *--allow-piece-length-change*='true'|'false'::
  454. If false is given, aria2 aborts download when a piece length is different
  455. from one in a control file.
  456. If true is given, you can proceed but some download progress will be lost.
  457. Default: 'false'
  458. *--async-dns*[='true'|'false']::
  459. Enable asynchronous DNS.
  460. Default: 'true'
  461. *--auto-file-renaming*[='true'|'false']::
  462. Rename file name if the same file already exists.
  463. This option works only in HTTP(S)/FTP download.
  464. The new file name has a dot and a number(1..9999) appended.
  465. Default: 'true'
  466. *--auto-save-interval*=SEC::
  467. Save a control file(*.aria2) every SEC seconds.
  468. If '0' is given, a control file is not saved during download. aria2 saves a
  469. control file when it stops regardless of the value.
  470. The possible values are between '0' to '600'.
  471. Default: '60'
  472. *--conf-path*=PATH::
  473. Change the configuration file path to PATH.
  474. Default: '$HOME/.aria2/aria2.conf'
  475. *-D*, *--daemon*::
  476. Run as daemon.
  477. *--enable-direct-io*[='true'|'false']::
  478. Enable directI/O, which lowers cpu usage while allocating/checking files.
  479. Turn off if you encounter any error.
  480. Default: 'true'
  481. *--event-poll*=POLL::
  482. Specify the method for polling events. The possible Values are
  483. 'epoll' and 'select'. If you use recent Linux that has epoll, then
  484. the default value is 'epoll'. Otherwise, the default value is
  485. 'select'.
  486. *--file-allocation*=METHOD::
  487. Specify file allocation method.
  488. 'none' doesn't pre-allocate file space. 'prealloc' pre-allocates file space
  489. before download begins. This may take some time depending on the size of the
  490. file.
  491. If you are using newer file systems such as ext4
  492. (with extents support), btrfs or xfs, 'falloc' is
  493. your best choice. It allocates large(few GiB)
  494. files almost instantly. Don't use 'falloc' with
  495. legacy file systems such as ext3 because it takes
  496. almost same time as 'prealloc' and it blocks aria2
  497. entirely until allocation finishes. 'falloc' may
  498. not be available if your system doesn't have
  499. *posix_fallocate*() function.
  500. Possible Values: 'none', 'prealloc', 'falloc'
  501. Default: 'prealloc'
  502. *--log-level*=LEVEL::
  503. Set log level to output.
  504. LEVEL is either 'debug', 'info', 'notice', 'warn' or 'error'.
  505. Default: 'debug'
  506. *--on-download-complete*=COMMAND::
  507. Set the command to be executed when download completes. See
  508. *--on-download-start* option for the requirement of COMMAND. See
  509. also *--on-download-stop* option. Possible Values:
  510. '/path/to/command'
  511. *--on-download-error*=COMMAND::
  512. Set the command to be executed when download aborts due to error.
  513. See *--on-download-start* option for the requirement of COMMAND.
  514. See also *--on-download-stop* option. Possible Values:
  515. '/path/to/command'
  516. *--on-download-start*=COMMAND::
  517. Set the command to be executed when download starts up. COMMAND must
  518. take just one argument and GID is passed to COMMAND as a first
  519. argument. Possible Values: '/path/to/command'
  520. *--on-download-stop*=COMMAND::
  521. Set the command to be executed when download stops. You can override
  522. the command to be executed for particular download result using
  523. *--on-download-complete* and *--on-download-error*. If they are
  524. specified, command specified in this option is not executed. See
  525. *--on-download-start* option for the requirement of COMMAND.
  526. Possible Values: '/path/to/command'
  527. *--summary-interval*=SEC::
  528. Set interval in seconds to output download progress summary.
  529. Setting '0' suppresses the output.
  530. Default: '60'
  531. [NOTE]
  532. In multi file torrent downloads, the files adjacent forward to the specified files
  533. are also allocated if they share the same piece.
  534. *-Z*, *--force-sequential*[='true'|'false']::
  535. Fetch URIs in the command-line sequentially and download each URI in a
  536. separate session, like the usual command-line download utilities.
  537. Default: 'false'
  538. *--max-overall-download-limit*=SPEED::
  539. Set max overall download speed in bytes/sec. '0' means
  540. unrestricted. You can append 'K' or 'M'(1K = 1024, 1M = 1024K). To
  541. limit the download speed per download, use *--max-download-limit*
  542. option. Default: '0'
  543. *--max-download-limit*=SPEED::
  544. Set max download speed per each download in bytes/sec. '0' means
  545. unrestricted. You can append 'K' or 'M'(1K = 1024, 1M = 1024K). To
  546. limit the overall download speed, use *--max-overall-download-limit*
  547. option. Default: '0'
  548. *--no-conf*::
  549. Disable loading aria2.conf file.
  550. *--no-file-allocation-limit*=SIZE::
  551. No file allocation is made for files whose size is smaller than SIZE.
  552. You can append 'K' or 'M'(1K = 1024, 1M = 1024K).
  553. Default: '5M'
  554. *-P*, *--parameterized-uri*[='true'|'false']::
  555. Enable parameterized URI support.
  556. You can specify set of parts: 'http://{sv1,sv2,sv3}/foo.iso'.
  557. Also you can specify numeric sequences with step counter:
  558. '\http://host/image[000-100:2].img'.
  559. A step counter can be omitted.
  560. If all URIs do not point to the same file, such as the second example above,
  561. -Z option is required.
  562. Default: 'false'
  563. *-q*, *--quiet*[='true'|'false']::
  564. Make aria2 quiet (no console output).
  565. Default: 'false'
  566. *--realtime-chunk-checksum*='true'|'false'::
  567. Validate chunk of data by calculating checksum while downloading a file if
  568. chunk checksums are provided.
  569. Default: 'true'
  570. *--stop*=SEC::
  571. Stop application after SEC seconds has passed.
  572. If '0' is given, this feature is disabled.
  573. Default: '0'
  574. *-v*, *--version*::
  575. Print the version number, copyright and the configuration information and
  576. exit.
  577. Options That Take An Optional Argument
  578. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  579. The options that have its argument surrounded by square brackets([])
  580. take an optional argument. Usually omiting the argument is evaluated to 'true'.
  581. If you use short form of these options(such as '-V') and give
  582. an argument, then the option name and its argument should be concatenated(e.g.
  583. '-Vfalse'). If any spaces are inserted between the option name and the argument,
  584. the argument will be treated as URI and usually this is not what you expect.
  585. URL, TORRENT_FILE, METALINK_FILE
  586. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  587. You can specify multiple URLs in command-line.
  588. Unless you specify *-Z* option, all URLs must point to the same file or downloading will fail.
  589. You can also specify arbitrary number of torrent files and metalink files
  590. stored on a local drive. Please note that they are always treated as a
  591. separate download.
  592. You can specify both torrent file with -T option and URLs. By doing this,
  593. you can download a file from both torrent swarm and HTTP(S)/FTP server at the same time,
  594. while the data from HTTP(S)/FTP are uploaded to the torrent swarm. Note that
  595. only single file torrent can be integrated with HTTP(S)/FTP.
  596. [NOTE]
  597. Make sure that URL is quoted with single(') or double(") quotation if it
  598. contains "&" or any characters that have special meaning in shell.
  599. Resuming Download
  600. ~~~~~~~~~~~~~~~~~
  601. Usually, you can resume transfer by just issuing same command(aria2c
  602. URL) if the previous transfer is made by aria2.
  603. If the previous transfer is made by a browser or wget like sequential
  604. download manager, then use -c option to continue the transfer(aria2c
  605. *-c* URL).
  606. EXIT STATUS
  607. -----------
  608. Because aria2 can handle multiple downloads at once, it encounters
  609. lots of errors in a session. aria2 returns the following exit status
  610. based on the last error encountered.
  611. *0*::
  612. If all downloads are successful.
  613. *1*::
  614. If an unknown error occurs.
  615. *2*::
  616. If time out occurs.
  617. *3*::
  618. If a resource is not found.
  619. *4*::
  620. If aria2 sees the specfied number of "resource not found" error.
  621. See *--max-file-not-found* option).
  622. *5*::
  623. If a download aborts because download speed is too slow.
  624. See *--lowest-speed-limit* option)
  625. *6*::
  626. If network problem occurs.
  627. *7*::
  628. If there are unfinished downloads. This error is only reported if
  629. all finished downloads are successful and there are unfinished
  630. downloads in a queue when aria2 exits by pressing Ctrl-C by an user
  631. or sending TERM or INT signal.
  632. [NOTE]
  633. An error occurred in a finished download will not be reported
  634. as exit status.
  635. ENVIRONMENT
  636. -----------
  637. aria2 recognizes the following environment variables.
  638. http_proxy [\http://][USER:PASSWORD@]HOST[:PORT]::
  639. Specify proxy server for use in HTTP.
  640. Overrides http-proxy value in configuration file.
  641. The command-line option *--http-proxy* overrides this value.
  642. https_proxy [\http://][USER:PASSWORD@]HOST[:PORT]::
  643. Specify proxy server for use in HTTPS.
  644. Overrides https-proxy value in configuration file.
  645. The command-line option *--https-proxy* overrides this value.
  646. ftp_proxy [\http://][USER:PASSWORD@]HOST[:PORT]::
  647. Specify proxy server for use in FTP.
  648. Overrides ftp-proxy value in configuration file.
  649. The command-line option *--ftp-proxy* overrides this value.
  650. all_proxy [\http://][USER:PASSWORD@]HOST[:PORT]::
  651. Specify proxy server for use if no protocol-specific proxy is specified.
  652. Overrides all-proxy value in configuration file.
  653. The command-line option *--all-proxy* overrides this value.
  654. no_proxy [DOMAIN,...]::
  655. Specify comma-separated hostname or domains to which proxy should not be used.
  656. Overrides no-proxy value in configuration file.
  657. The command-line option *--no-proxy* overrides this value.
  658. FILES
  659. -----
  660. aria2.conf
  661. ~~~~~~~~~~
  662. By default, aria2 parses '$HOME/.aria2/aria2.conf' as a configuraiton
  663. file. You can specify the path to configuration file using
  664. *--conf-path* option. If you don't want to use the configuraitonf
  665. file, use *--no-conf* option.
  666. The configuration file is a text file and has 1 option per each
  667. line. In each line, you can specify name-value pair in the format:
  668. NAME=VALUE, where name is the long command-line option name without
  669. "--" prefix. You can use same syntax for the command-line option. The
  670. lines beginning "#" are treated as comments.
  671. --------------------------------------
  672. # sample configuration file for aria2c
  673. listen-port=60000
  674. dht-listen-port=60000
  675. seed-ratio=1.0
  676. max-upload-limit=50K
  677. ftp-pasv=true
  678. --------------------------------------
  679. dht.dat
  680. ~~~~~~~~
  681. By default, the routing table of DHT is saved to the path $HOME/.aria2/dht.dat.
  682. Control File
  683. ~~~~~~~~~~~~
  684. aria2 uses a control file to track the progress of a download. A
  685. control file is placed in the same directory as the downloading file
  686. and its filename is the filename of downloading file with ".aria2"
  687. appended. For example, if you are downloading file.zip, then the
  688. control file should be file.zip.aria2. (There is a exception for this
  689. naming convention. If you are downloading a multi torrent, its
  690. control file is the "top directory" name of the torrent with ".aria2"
  691. appended. The "top directory" name is a value of "name" key in "info"
  692. directory in a torrent file.)
  693. Usually a control file is deleted once download completed. If aria2
  694. decides that download cannot be resumed(for example, when downloading
  695. a file from a HTTP server which doesn't support resume), a control
  696. file is not created.
  697. Normally if you lose a control file, you cannot resume download. But
  698. if you have a torrent or metalink with chunk checksums for the file,
  699. you can resume the download without a control file by giving -V option
  700. to aria2c in command-line.
  701. Input File
  702. ~~~~~~~~~~
  703. The input file can contain a list of URIs for aria2 to download. You
  704. can specify multiple URIs for a single entity: separate URIs on a
  705. single line using the TAB character.
  706. Each line is treated as if it is provided in command-line argument.
  707. Therefore they are affected by *-Z* and *-P* options.
  708. Additionally, the following options can be specified after each line
  709. of URIs. These optional lines must start with white space(s).
  710. * dir
  711. * check-integrity
  712. * continue
  713. * all-proxy
  714. * connect-timeout
  715. * dry-run
  716. * lowest-speed-limit
  717. * max-file-not-found
  718. * max-tries
  719. * no-proxy
  720. * out
  721. * proxy-method
  722. * remote-time
  723. * retry-wait
  724. * split
  725. * timeout
  726. * http-auth-challenge
  727. * http-user
  728. * http-passwd
  729. * http-proxy
  730. * https-proxy
  731. * referer
  732. * enable-http-keep-alive
  733. * enable-http-pipelining
  734. * header
  735. * use-head
  736. * user-agent
  737. * ftp-user
  738. * ftp-passwd
  739. * ftp-pasv
  740. * ftp-proxy
  741. * ftp-type
  742. * ftp-reuse-connection
  743. * no-netrc
  744. * select-file
  745. * bt-external-ip
  746. * bt-hash-check-seed
  747. * bt-max-open-files
  748. * bt-max-peers
  749. * bt-min-crypto-level
  750. * bt-require-crypto
  751. * bt-request-peer-speed-limit
  752. * bt-seed-unverified
  753. * bt-tracker-interval
  754. * enable-peer-exchange
  755. * follow-torrent
  756. * index-out
  757. * max-upload-limit
  758. * peer-id-prefix
  759. * seed-ratio
  760. * seed-time
  761. * follow-metalink
  762. * metalink-servers
  763. * metalink-language
  764. * metalink-location
  765. * metalink-os
  766. * metalink-version
  767. * metalink-preferred-protocol
  768. * metalink-enable-unique-protocol
  769. * allow-overwrite
  770. * allow-piece-length-change
  771. * async-dns
  772. * auto-file-renaming
  773. * file-allocation
  774. * max-download-limit
  775. * no-file-allocation-limit
  776. * parameterized-uri
  777. * realtime-chunk-checksum
  778. These options have exactly same meaning of the ones in the
  779. command-line options, but it just applies to the URIs it belongs to.
  780. For example, the content of uri.txt is
  781. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  782. http://server/file.iso http://mirror/file.iso
  783. dir=/iso_images
  784. out=file.img
  785. http://foo/bar
  786. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  787. If aria2 is executed with *-i* uri.txt *-d* /tmp options, then
  788. 'file.iso' is saved as '/iso_images/file.img' and it is downloaded
  789. from \http://server/file.iso and \http://mirror/file.iso. The file
  790. 'bar' is downloaded from \http://foo/bar and saved as '/tmp/bar'.
  791. In some cases, *out* parameter has no effect. See note of *--out*
  792. option for the restrictions.
  793. Server Performance Profile
  794. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  795. This section describes the format of server performance profile. The
  796. file is plain text and each line has several NAME=VALUE pair,
  797. delimited by comma. Currently following NAMEs are recognized:
  798. host::
  799. Hostname of the server. Required.
  800. protocol::
  801. Protocol for this profile, such as ftp, http. Required.
  802. dl_speed::
  803. The average download speed observed in the previous download in
  804. bytes per sec. Required.
  805. sc_avg_speed::
  806. The average download speed observed in the previous download in
  807. bytes per sec. This value is only updated if the download is done in
  808. single connection environment and only used by
  809. AdaptiveURISelector. Optional.
  810. mc_avg_speed::
  811. The average download speed observed in the previous download in
  812. bytes per sec. This value is only updated if the download is done in
  813. multi connection environment and only used by
  814. AdaptiveURISelector. Optional.
  815. counter::
  816. How many times the server is used. Currently this value is only used
  817. by AdaptiveURISelector. Optional.
  818. last_updated::
  819. Last contact time in GMT with this server, specified in the seconds
  820. from the Epoch. Required.
  821. status::
  822. ERROR is set when server cannot be reached or out-of-service or
  823. timeout occurred. Otherwise, OK is set.
  824. Those fields must exist in one line. The order of the fields is not
  825. significant. You can put pairs other than the above; they are simply
  826. ignored.
  827. An example follows:
  828. --------------------------------------------------------------------------------
  829. host=localhost, protocol=http, dl_speed=32000, last_updated=1222491640, status=OK
  830. host=localhost, protocol=ftp, dl_speed=0, last_updated=1222491632, status=ERROR
  831. --------------------------------------------------------------------------------
  832. XML-RPC INTERFACE
  833. -----------------
  834. Terminology
  835. ~~~~~~~~~~~
  836. GID::
  837. GID(or gid) is the key to manage each download. Each download has an
  838. unique GID. Currently GID looks like an integer, but don't treat it
  839. as integer because it may be changed to another type in the future
  840. release.
  841. Methods
  842. ~~~~~~~
  843. *aria2.addUri* 'uris[, options[, position]]'
  844. This method adds new HTTP(S)/FTP download. 'uris' is of type array
  845. and its element is URI which is of type string. URI should be
  846. percent-encoded. 'options' is of type struct and its members are a
  847. pair of option name and value. See *Options* below for more details.
  848. If 'position' is given as an integer, the new download is inserted at
  849. 'position' in the waiting queue. If 'position' is not given or
  850. 'position' is larger than the size of the queue, it is appended at the
  851. end of the queue. This method returns GID of registered download.
  852. *aria2.addTorrent* 'torrent[, uris[, options[, position]]]'
  853. This method adds BitTorrent download by uploading .torrent file.
  854. 'torrent' is of type base64 which contains Base64-encoded .torrent
  855. file. 'uris' is of type array and its element is URI which is of type
  856. string. 'uris' is used for Web-seeding. Note that 'uris' is ignored if
  857. specified torrent is a multi-file torrent. 'options' is of type
  858. struct and its members are a pair of option name and value. See
  859. *Options* below for more details. If 'position' is given as an
  860. integer, the new download is inserted at 'position' in the waiting
  861. queue. If 'position' is not given or 'position' is larger than the
  862. size of the queue, it is appended at the end of the queue. This
  863. method returns GID of registered download.
  864. *aria2.addMetalink* 'metalink[, options[, position]]'
  865. This method adds Metalink download by uploading .metalink file.
  866. 'metalink' is of type base64 which contains Base64-encoded .metalink
  867. file. 'options' is of type struct and its members are a pair of
  868. option name and value. See *Options* below for more details. If
  869. 'position' is given as an integer, the new download is inserted at
  870. 'position' in the waiting queue. If 'position' is not given or
  871. 'position' is larger than the size of the queue, it is appended at the
  872. end of the queue. This method returns GID of registered download.
  873. *aria2.remove* 'gid'
  874. This method removes the download denoted by 'gid'. 'gid' is of type
  875. string. If specified download is in progress, it is stopped at
  876. first. The status of removed download becomes "removed". This method
  877. returns GID of removed download.
  878. *aria2.tellStatus* 'gid'
  879. This method returns download progress of the download denoted by
  880. 'gid'. 'gid' is of type string. The response is of type struct and it
  881. contains following keys. The value type is string.
  882. gid::
  883. GID of this download.
  884. status::
  885. "active" for currently downloading/seeding entry. "waiting" for the
  886. entry in the queue; download is not started. "error" for the stopped
  887. download because of error. "complete" for the stopped and completed
  888. download. "removed" for the download removed by user.
  889. totalLength::
  890. Total length of this download in bytes.
  891. completedLength::
  892. Completed length of this download in bytes.
  893. bitfield::
  894. Hexadecimal representation of the download progress. The highest bit
  895. corresponds to piece index 0. The set bits indicate the piece is
  896. available and unset bits indicate the piece is missing. The spare
  897. bits at the end are set to zero.
  898. downloadSpeed::
  899. Download speed of this download measured in bytes/sec.
  900. uploadSpeed::
  901. Upload speed of this download measured in bytes/sec.
  902. infoHash::
  903. InfoHash. BitTorrent only.
  904. pieceLength::
  905. Piece length in bytes.
  906. numPieces::
  907. The number of pieces.
  908. connections::
  909. The number of peers/servers the client has connected to.
  910. *aria2.getUris* 'gid'
  911. This method returns URIs used in the download denoted by 'gid'. 'gid'
  912. is of type string. The response is of type array and its element is of
  913. type struct and it contains following keys. The value type is string.
  914. uri::
  915. URI
  916. *aria2.getFiles* 'gid'
  917. This method returns file list of the download denoted by 'gid'. 'gid'
  918. is of type string. The response is of type array and its element is of
  919. type struct and it contains following keys. The value type is string.
  920. index::
  921. Index of file. Starting with 1. This is the same order with the
  922. files in multi-file torrent.
  923. path::
  924. File path.
  925. length::
  926. File size in bytes.
  927. selected::
  928. "true" if this file is selected by *--select-file* option. If
  929. *--select-file* is not specified or this is single torrent or no
  930. torrent download, this value is always "true". Otherwise "false".
  931. *aria2.getPeers* 'gid'
  932. This method returns peer list of the download denoted by 'gid'. 'gid'
  933. is of type string. This method is for BitTorrent only. The response
  934. is of type array and its element is of type struct and it contains
  935. following keys. The value type is string.
  936. peerId::
  937. Percent-encoded peer ID.
  938. ip::
  939. IP address of the peer.
  940. port::
  941. Port number of the peer.
  942. bitfield::
  943. Hexadecimal representation of the download progress of the peer. The
  944. highest bit corresponds to piece index 0. The set bits indicate the
  945. piece is available and unset bits indicate the piece is missing. The
  946. spare bits at the end are set to zero.
  947. amChoking::
  948. "true" if this client is choking the peer. Otherwise "false".
  949. peerChoking::
  950. "true" if the peer is choking this client. Otherwise "false".
  951. downloadSpeed::
  952. Download speed (byte/sec) that this client obtains from the peer.
  953. uploadSpeed::
  954. Upload speed(byte/sec) that this client uploads to the peer.
  955. *aria2.tellActive*
  956. This method returns the list of active downloads. The respose is of
  957. type array and its element is the same struct returned by
  958. *aria2.tellStatus* method.
  959. *aria2.changeOption* 'gid, options'
  960. This method changes options of the download denoted by 'gid'
  961. dynamically. 'gid' is of type string. 'options' is of type struct
  962. and the available options are *max-download-limit* and *max-upload-limit*.
  963. This method returns "OK" for success.
  964. *aria2.changeGlobalOption* 'options'
  965. This method changes global options dynamically. 'options' is of type
  966. struct and the available options are *max-overall-download-limit* and
  967. *max-overall-upload-limit*. This method returns "OK" for success.
  968. *aria2.purgeDownloadResult*
  969. This method purges completed/error/removed downloads to free memory.
  970. This method returns "OK".
  971. Error Handling
  972. ~~~~~~~~~~~~~~
  973. In case of error, aria2 returns faultCode=1 and the error message in
  974. faultString.
  975. Options
  976. ~~~~~~~
  977. Same options for *-i* list are available. See *Input File* subsection
  978. for complete list of options.
  979. In the option struct, name element is option name(without preceeding
  980. "--") and value element is argument as string.
  981. -------------------------------------------------
  982. <struct>
  983. <member>
  984. <name>split</name>
  985. <value><string>1</string></value>
  986. </member>
  987. <member>
  988. <name>http-proxy</name>
  989. <value><string>http://proxy/</string></value>
  990. </member>
  991. </struct>
  992. -------------------------------------------------
  993. *header* and *index-out* option are allowed multiple times in
  994. command-line. Since name should be unique in struct(many XML-RPC
  995. library implementation uses hash or dict for struct), single string is
  996. not enough. To overcome this situation, they can take array as value
  997. as well as string.
  998. ---------------------------------------------------------------
  999. <struct>
  1000. <member>
  1001. <name>header</name>
  1002. <value>
  1003. <array>
  1004. <data>
  1005. <value><string>Accept-Language: ja</string></value>
  1006. <value><string>Accept-Charset: utf-8</string></value>
  1007. </data>
  1008. </array>
  1009. </value>
  1010. </member>
  1011. </struct>
  1012. ---------------------------------------------------------------
  1013. Sample XML-RPC Client Code
  1014. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1015. The following Ruby script adds 'http://localhost/aria2.tar.bz2' to
  1016. aria2c operated on localhost with option *--dir*='/downloads' and
  1017. prints its reponse.
  1018. ----------------------------------------------
  1019. #!/usr/bin/env ruby
  1020. require 'xmlrpc/client'
  1021. require 'pp'
  1022. client=XMLRPC::Client.new2("http://localhost:6800/rpc")
  1023. options={ "dir" => "/downloads" }
  1024. result=client.call("aria2.addUri", [ "http://localhost/aria2.tar.bz2" ], options)
  1025. pp result
  1026. ----------------------------------------------
  1027. EXAMPLE
  1028. -------
  1029. HTTP/FTP Segmented Download
  1030. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1031. Download a file
  1032. ^^^^^^^^^^^^^^^
  1033. --------------------------------
  1034. aria2c "http://host/file.zip"
  1035. --------------------------------
  1036. [NOTE]
  1037. aria2 uses 5 connections to download 1 file by default.
  1038. Download a file using 1 connection
  1039. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1040. ----------------------------------
  1041. aria2c -s1 "http://host/file.zip"
  1042. ----------------------------------
  1043. [NOTE]
  1044. aria2 uses 5 connections to download 1 file by default.
  1045. -s1 limits the number of connections to just 1.
  1046. [NOTE]
  1047. To pause a download, press Ctrl-C. You can resume the transfer by running aria2c with the same argument in the same directory. You can change URLs as long as they are pointing to the same file.
  1048. Download a file from 2 different HTTP servers
  1049. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1050. ------------------------------------------------------
  1051. aria2c "http://host/file.zip" "http://mirror/file.zip"
  1052. ------------------------------------------------------
  1053. Download a file from HTTP and FTP servers
  1054. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1055. -----------------------------------------------------
  1056. aria2c "http://host1/file.zip" "ftp://host2/file.zip"
  1057. -----------------------------------------------------
  1058. Download files listed in a text file concurrently
  1059. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1060. ------------------------
  1061. aria2c -ifiles.txt -j2
  1062. ------------------------
  1063. [NOTE]
  1064. -j option specifies the number of parallel downloads.
  1065. Using proxy
  1066. ^^^^^^^^^^^
  1067. For HTTP:
  1068. ----------------------------------------------------------
  1069. aria2c --http-proxy="http://proxy:8080" "http://host/file"
  1070. ----------------------------------------------------------
  1071. For FTP:
  1072. --------------------------------------------------------
  1073. aria2c --ftp-proxy="http://proxy:8080" "ftp://host/file"
  1074. --------------------------------------------------------
  1075. [NOTE]
  1076. See *--http-proxy*, *--https-proxy*, *--ftp-proxy* and *--all-proxy* for
  1077. details.
  1078. You can specify proxy in the environment variables. See *ENVIRONMENT* section.
  1079. Proxy with authorization
  1080. ^^^^^^^^^^^^^^^^^^^^^^^^
  1081. ----------------------------------------------------------------------------
  1082. aria2c --http-proxy="http://username:password@proxy:8080" "http://host/file"
  1083. ----------------------------------------------------------------------------
  1084. Metalink Download
  1085. ~~~~~~~~~~~~~~~~~
  1086. Download files with remote Metalink
  1087. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1088. --------------------------------------------------------
  1089. aria2c --follow-metalink=mem "http://host/file.metalink"
  1090. --------------------------------------------------------
  1091. Download using a local metalink file
  1092. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1093. ----------------------------------------------------------
  1094. aria2c -p --lowest-speed-limit=4000 file.metalink
  1095. ----------------------------------------------------------
  1096. [NOTE]
  1097. To pause a download, press Ctrl-C.
  1098. You can resume the transfer by running aria2c with the same argument in the same
  1099. directory.
  1100. Download several local metalink files
  1101. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1102. ----------------------------------------
  1103. aria2c -j2 file1.metalink file2.metalink
  1104. ----------------------------------------
  1105. Download only selected files using index
  1106. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1107. -------------------------------------------
  1108. aria2c --select-file=1-4,8 file.metalink
  1109. -------------------------------------------
  1110. [NOTE]
  1111. The index is printed to the console using -S option.
  1112. Download a file using a local .metalink file with user preference
  1113. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1114. ------------------------------------------------------------------------------
  1115. aria2c --metalink-location=JP,US --metalink-version=1.1 --metalink-language=en-US file.metalink
  1116. ------------------------------------------------------------------------------
  1117. BitTorrent Download
  1118. ~~~~~~~~~~~~~~~~~~~
  1119. Download files from remote BitTorrent file
  1120. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1121. ------------------------------------------------------
  1122. aria2c --follow-torrent=mem "http://host/file.torrent"
  1123. ------------------------------------------------------
  1124. Download using a local torrent file
  1125. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1126. ---------------------------------------------
  1127. aria2c --max-upload-limit=40K file.torrent
  1128. ---------------------------------------------
  1129. [NOTE]
  1130. --max-upload-limit specifies the max of upload rate.
  1131. [NOTE]
  1132. To pause a download, press Ctrl-C. You can resume the transfer by running aria2c with the same argument in the same directory.
  1133. Download 2 torrents
  1134. ^^^^^^^^^^^^^^^^^^^
  1135. --------------------------------------
  1136. aria2c -j2 file1.torrent file2.torrent
  1137. --------------------------------------
  1138. Download a file using torrent and HTTP/FTP server
  1139. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1140. ------------------------------------------------------------
  1141. aria2c -Ttest.torrent "http://host1/file" "ftp://host2/file"
  1142. ------------------------------------------------------------
  1143. [NOTE]
  1144. Downloading multi file torrent with HTTP/FTP is not supported.
  1145. Download only selected files using index(usually called "selectable download")
  1146. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1147. ---------------------------------------
  1148. aria2c --select-file=1-4,8 file.torrent
  1149. ---------------------------------------
  1150. [NOTE]
  1151. The index is printed to the console using -S option.
  1152. Specify output filename
  1153. ^^^^^^^^^^^^^^^^^^^^^^^
  1154. To specify output filename for BitTorrent downloads, you need to know
  1155. the index of file in torrent file using *-S* option. For example, the
  1156. output looks like this:
  1157. --------------------------
  1158. idx|path/length
  1159. ===+======================
  1160. 1|dist/base-2.6.18.iso
  1161. |99.9MiB
  1162. ---+----------------------
  1163. 2|dist/driver-2.6.18.iso
  1164. |169.0MiB
  1165. ---+----------------------
  1166. --------------------------
  1167. To save 'dist/base-2.6.18.iso' in '/tmp/mydir/base.iso' and
  1168. 'dist/driver-2.6.18.iso' in '/tmp/dir/driver.iso', use the following
  1169. command:
  1170. -----------------------------------------------------------------------------------------
  1171. aria2c --dir=/tmp --index-out=1=mydir/base.iso --index-out=2=dir/driver.iso file.torrent
  1172. -----------------------------------------------------------------------------------------
  1173. Change the listening port for incoming peer
  1174. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1175. ---------------------------------------------------
  1176. aria2c --listen-port=7000-7001,8000 file.torrent
  1177. ---------------------------------------------------
  1178. [NOTE]
  1179. Since aria2 doesn't configure firewall or router for port forwarding, it's up
  1180. to you to do it manually.
  1181. Specify the condition to stop program after torrent download finished
  1182. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1183. -------------------------------------------------------
  1184. aria2c --seed-time=120 --seed-ratio=1.0 file.torrent
  1185. -------------------------------------------------------
  1186. [NOTE]
  1187. In the above example, the program exits when the 120 minutes has elapsed since download completed or seed ratio reaches 1.0.
  1188. Throttle upload speed
  1189. ^^^^^^^^^^^^^^^^^^^^^
  1190. ----------------------------------------------
  1191. aria2c --max-upload-limit=100K file.torrent
  1192. ----------------------------------------------
  1193. Enable DHT
  1194. ^^^^^^^^^^
  1195. ---------------------------------------------------------
  1196. aria2c --enable-dht --dht-listen-port=6881 file.torrent
  1197. ---------------------------------------------------------
  1198. [NOTE]
  1199. DHT uses udp port. Since aria2 doesn't configure firewall or router for port
  1200. forwarding, it's up to you to do it manually.
  1201. More advanced HTTP features
  1202. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1203. Load cookies
  1204. ^^^^^^^^^^^^
  1205. --------------------------------------------------------
  1206. aria2c --load-cookies=cookies.txt "http://host/file.zip"
  1207. --------------------------------------------------------
  1208. [NOTE]
  1209. You can use Firefox/Mozilla's cookie file without modification.
  1210. Resume download started by web browsers or another programs
  1211. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1212. -------------------------------------------------------
  1213. aria2c -c -s2 "http://host/partiallydownloadedfile.zip"
  1214. -------------------------------------------------------
  1215. Client certificate authorization for SSL/TLS
  1216. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1217. ------------------------------------------------------------------------------------------
  1218. aria2c --certificate=/path/to/mycert.pem --private-key=/path/to/mykey.pem https://host/file
  1219. ------------------------------------------------------------------------------------------
  1220. [NOTE]
  1221. The file specified in *--private-key* must be decrypted. The behavior when
  1222. encrypted one is given is undefined.
  1223. Verify peer in SSL/TLS using given CA certificates
  1224. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1225. ------------------------------------------------------------------------------------------
  1226. aria2c --ca-certificate=/path/to/ca-certificates.crt --check-certificate https://host/file
  1227. ------------------------------------------------------------------------------------------
  1228. And more advanced features
  1229. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1230. Throttle download speed
  1231. ^^^^^^^^^^^^^^^^^^^^^^^
  1232. -------------------------------------------------
  1233. aria2c --max-download-limit=100K file.metalink
  1234. -------------------------------------------------
  1235. Repair a damaged download using -V option
  1236. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1237. -----------------------
  1238. aria2c -V file.metalink
  1239. -----------------------
  1240. [NOTE]
  1241. This option is only available used with BitTorrent or metalink with chunk
  1242. checksums.
  1243. Drop connection if download speed is lower than specified value
  1244. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1245. ------------------------------------------------
  1246. aria2c --lowest-speed-limit=10K file.metalink
  1247. ------------------------------------------------
  1248. Parameterized URI support
  1249. ^^^^^^^^^^^^^^^^^^^^^^^^^
  1250. You can specify set of parts:
  1251. -----------------------------------------------
  1252. aria2c -P "http://{host1,host2,host3}/file.iso"
  1253. -----------------------------------------------
  1254. You can specify numeric sequence:
  1255. ---------------------------------------------
  1256. aria2c -Z -P "http://host/image[000-100].png"
  1257. ---------------------------------------------
  1258. [NOTE]
  1259. -Z option is required if the all URIs don't point to the same file, such as the above example.
  1260. You can specify step counter:
  1261. -------------------------------------------
  1262. aria2c -Z -P "http://host/image[A-Z:2].png"
  1263. -------------------------------------------
  1264. Parallel downloads of arbitrary number of URL,metalink,torrent
  1265. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1266. --------------------------------------------------------------
  1267. aria2c -j3 -Z "http://host/file1" file2.torrent file3.metalink
  1268. --------------------------------------------------------------
  1269. BitTorrent Encryption
  1270. ^^^^^^^^^^^^^^^^^^^^^
  1271. Encrypt whole payload using ARC4:
  1272. -------------------------------------------------------------------------
  1273. aria2c --bt-min-crypto-level=arc4 --bt-require-crypto=true file.torrent
  1274. -------------------------------------------------------------------------
  1275. SEE ALSO
  1276. --------
  1277. Project Web Site: http://aria2.sourceforge.net/
  1278. aria2 Wiki: http://apps.sourceforge.net/trac/aria2/wiki
  1279. Metalink Homepage: http://www.metalinker.org/
  1280. COPYRIGHT
  1281. ---------
  1282. Copyright (C) 2006, 2009 Tatsuhiro Tsujikawa
  1283. This program is free software; you can redistribute it and/or modify
  1284. it under the terms of the GNU General Public License as published by
  1285. the Free Software Foundation; either version 2 of the License, or
  1286. (at your option) any later version.
  1287. This program is distributed in the hope that it will be useful,
  1288. but WITHOUT ANY WARRANTY; without even the implied warranty of
  1289. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1290. GNU General Public License for more details.
  1291. You should have received a copy of the GNU General Public License
  1292. along with this program; if not, write to the Free Software
  1293. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  1294. In addition, as a special exception, the copyright holders give
  1295. permission to link the code of portions of this program with the
  1296. OpenSSL library under certain conditions as described in each
  1297. individual source file, and distribute linked combinations
  1298. including the two.
  1299. You must obey the GNU General Public License in all respects
  1300. for all of the code used other than OpenSSL. If you modify
  1301. file(s) with this exception, you may extend this exception to your
  1302. version of the file(s), but you are not obligated to do so. If you
  1303. do not wish to do so, delete this exception statement from your
  1304. version. If you delete this exception statement from all source
  1305. files in the program, then also delete it here.