aria2c.1.txt 57 KB

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