aria2c.1.txt 88 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548
  1. ARIA2C(1)
  2. =========
  3. Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
  4. :man source: Aria2
  5. :man manual: Aria2 Manual
  6. :man version: 1.10.5
  7. NAME
  8. ----
  9. aria2c - The ultra fast download utility
  10. SYNOPSIS
  11. --------
  12. aria2c ['OPTIONS'] ['URI' | 'MAGNET' | 'TORRENT_FILE' | 'METALINK_FILE']...
  13. DESCRIPTION
  14. -----------
  15. aria2 is a utility for downloading files. The supported protocols are
  16. HTTP(S), FTP, BitTorrent, and Metalink. aria2 can download a file from
  17. multiple sources/protocols and tries to utilize your maximum download
  18. bandwidth. It supports downloading a file from HTTP(S)/FTP and
  19. BitTorrent at the same time, while the data downloaded from
  20. HTTP(S)/FTP is uploaded to the BitTorrent swarm. Using Metalink's
  21. chunk checksums, aria2 automatically validates chunks of data while
  22. downloading a file like BitTorrent.
  23. OPTIONS
  24. -------
  25. Basic Options
  26. ~~~~~~~~~~~~~
  27. *-d*, *--dir*=DIR::
  28. The directory to store the downloaded file.
  29. *-i*, *--input-file*=FILE::
  30. Downloads URIs found in FILE. You can specify multiple URIs for a single
  31. entity: separate URIs on a single line using the TAB character.
  32. Reads input from stdin when '-' is specified.
  33. The additional *out* and *dir* options can be specified after each line of
  34. URIs. This optional line must start with white space(s).
  35. See *<<_input_file, Input File>>* subsection for details.
  36. *-l*, *--log*=LOG::
  37. The file name of the log file. If '-' is specified, log is written to
  38. stdout. If empty string("") is specified, log is not written to file.
  39. *-j*, *--max-concurrent-downloads*=N::
  40. Set maximum number of parallel downloads for every static (HTTP/FTP) URI,
  41. torrent and metalink. See also *-s* and *-C* option.
  42. Default: '5'
  43. *-V*, *--check-integrity*[='true'|'false']::
  44. Check file integrity by validating piece hashes or a hash of entire
  45. file. This option has effect only in BitTorrent and Metalink
  46. downloads with checksums. If piece hashes are provided, this option
  47. can detect damaged portions of a file and re-download them. If a
  48. hash of entire file is provided, hash check is only done when file
  49. has benn already download. This is determined by file length. If
  50. hash check fails, file is re-downloaded from scratch. If both piece
  51. hashes and a hash of entire file are provided, only piece hashes are
  52. used. Default: 'false'
  53. *-c*, *--continue*::
  54. Continue downloading a partially downloaded file.
  55. Use this option to resume a download started by a web browser or another
  56. program which downloads files sequentially from the beginning.
  57. Currently this option is only applicable to HTTP(S)/FTP downloads.
  58. *-h*, *--help*[=TAG|KEYWORD]::
  59. The help messages are classified with tags. A tag starts with
  60. "#". For example, type "--help=#http" to get the usage for the
  61. options tagged with "#http". If non-tag word is given, print the
  62. usage for the options whose name includes that word.
  63. Available Values: '#basic', '#advanced', '#http', '#https', '#ftp',
  64. '#metalink', '#bittorrent', '#cookie', '#hook', '#file',
  65. '#xml-rpc', '#experimental', '#all'
  66. Default: '#basic'
  67. HTTP/FTP Options
  68. ~~~~~~~~~~~~~~~~
  69. *--all-proxy*=PROXY::
  70. Use this proxy server for all protocols. To erase previously
  71. defined proxy, use "". You can override this setting and specify a
  72. proxy server for a particular protocol using *--http-proxy*,
  73. *--https-proxy* and *--ftp-proxy* options. This affects all URIs.
  74. The format of PROXY is [\\http://][USER:PASSWORD@]HOST[:PORT]
  75. [NOTE]
  76. If user and password are embedded in proxy URI and they are also
  77. specified by *--{http,https,ftp,all}-proxy-{user,passwd}* options,
  78. those appeared later have precedence. For example, you have
  79. http-proxy-user="myname", http-proxy-passwd="mypass" in aria2.conf and
  80. you specify --http-proxy="http://proxy" in command-line, then you get
  81. HTTP proxy "http://proxy" with user "myname" and password
  82. "mypass". Another example: if you specified in command-line
  83. --http-proxy="http://user:pass@proxy" --http-proxy-user="myname"
  84. --http-proxy-passwd="mypass", then you will get HTTP proxy
  85. "http://proxy" with user "myname" and password "mypass". One more
  86. example: if you specified in command-line --http-proxy-user="myname"
  87. --http-proxy-passwd="mypass" --http-proxy="http://user:pass@proxy",
  88. then you get HTTP proxy "http://proxy" with user "user" and password
  89. "pass".
  90. *--all-proxy-passwd*=PASSWD::
  91. Set password for *--all-proxy* option.
  92. *--all-proxy-user*=USER::
  93. Set user for *--all-proxy* option.
  94. *--connect-timeout*=SEC::
  95. Set the connect timeout in seconds to establish connection to
  96. HTTP/FTP/proxy server. After the connection is established, this
  97. option makes no effect and *--timeout* option is used instead.
  98. Default: '60'
  99. *--dry-run*[='true'|'false']::
  100. If 'true' is given, aria2 just checks whether the remote file is
  101. available and doesn't download data. This option has effect on
  102. HTTP/FTP download. BitTorrent downloads are canceled if 'true' is
  103. specified. Default: 'false'
  104. *--lowest-speed-limit*=SPEED::
  105. Close connection if download speed is lower than or equal to this
  106. value(bytes per sec).
  107. '0' means aria2 does not have a lowest speed limit.
  108. You can append 'K' or 'M'(1K = 1024, 1M = 1024K).
  109. This option does not affect BitTorrent downloads.
  110. Default: '0'
  111. *-x*, *--max-connection-per-server*=NUM::
  112. The maximum number of connections to one server for each download.
  113. Default: '1'
  114. *--max-file-not-found*=NUM::
  115. If aria2 receives `file not found' status from the remote HTTP/FTP
  116. servers NUM times without getting a single byte, then force the
  117. download to fail. Specify '0' to disable this option. This options is
  118. effective only when using HTTP/FTP servers.
  119. Default: '0'
  120. *-m*, *--max-tries*=N::
  121. Set number of tries. '0' means unlimited.
  122. Default: '5'
  123. *-k*, *--min-split-size*=SIZE::
  124. aria2 does not split less than 2*SIZE byte range. For example,
  125. let's consider downloading 20MiB file. If SIZE is 10M, aria2 can
  126. split file into 2 range [0-10MiB) and [10MiB-20MiB) and download it
  127. using 2 sources(if *--split* >= 2, of course). If SIZE is 15M,
  128. since 2*15M > 20MiB, aria2 does not split file and download it using
  129. 1 source. You can append 'K' or 'M'(1K = 1024, 1M = 1024K).
  130. Possible Values: '1M'-'1024M' Default: '20M'
  131. *-n*, *--no-netrc*::
  132. Disables netrc support. netrc support is enabled by default.
  133. *--no-proxy*=DOMAINS::
  134. Specify comma separated hostnames, domains and network address with
  135. or without CIDR block where proxy should not be used.
  136. [NOTE]
  137. For network address with CIDR block, only IPv4 address works. Current
  138. implementation does not resolve hostname in URI to compare network
  139. address specified in *--no-proxy*. So it is only effecive if URI has
  140. numeric IP addresses.
  141. *-o*, *--out*=FILE::
  142. The file name of the downloaded file. When *-Z* option is used, this
  143. option is ignored.
  144. [NOTE]
  145. In Metalink or BitTorrent download you cannot specify file name.
  146. The file name specified here is only used when the URIs fed to aria2
  147. are done by command line without *-i*, *-Z* option. For example:
  148. aria2c -o myfile.zip "http://mirror1/file.zip" "http://mirror2/file.zip"
  149. *--proxy-method*=METHOD::
  150. Set the method to use in proxy request. 'METHOD' is either 'get' or
  151. 'tunnel'. HTTPS downloads always use 'tunnel' regardless of this
  152. option.
  153. Default: 'get'
  154. *-R*, *--remote-time*[='true'|'false']::
  155. Retrieve timestamp of the remote file from the remote HTTP/FTP
  156. server and if it is available, apply it to the local file.
  157. Default: 'false'
  158. *--reuse-uri[='true'|'false']::
  159. Reuse already used URIs if no unused URIs are left.
  160. Default: 'true'
  161. *--server-stat-of*=FILE::
  162. Specify the filename to which performance profile of the servers is
  163. saved. You can load saved data using *--server-stat-if* option. See
  164. *<<_server_performance_profile, Server Performance Profile>>*
  165. subsection below for file format.
  166. *--server-stat-if*=FILE::
  167. Specify the filename to load performance profile of the servers. The
  168. loaded data will be used in some URI selector such as 'feedback'.
  169. See also *--uri-selector* option. See
  170. *<<_server_performance_profile, Server Performance Profile>>*
  171. subsection below for file format.
  172. *--server-stat-timeout*=SEC::
  173. Specifies timeout in seconds to invalidate performance profile of
  174. the servers since the last contact to them.
  175. Default: '86400' (24hours)
  176. *-s*, *--split*=N::
  177. Download a file using N connections. If more than N URIs are given,
  178. first N URIs are used and remaining URIs are used for backup. If
  179. less than N URIs are given, those URIs are used more than once so
  180. that N connections total are made simultaneously. The number of
  181. connections to the same host is restricted by
  182. *--max-connection-per-server* option. Please see *-j* and
  183. *--min-split-size* option too. Please note that in Metalink
  184. download, this option has no effect and use *-C* option instead.
  185. Default: '5'
  186. *-t*, *--timeout*=SEC::
  187. Set timeout in seconds.
  188. Default: '60'
  189. *--uri-selector*=SELECTOR::
  190. Specify URI selection algorithm. The possible values are 'inorder',
  191. 'feedback' and 'adaptive'. If 'inorder' is given, URI is tried in
  192. the order appeared in the URI list. If 'feedback' is given, aria2
  193. uses download speed observed in the previous downloads and choose
  194. fastest server in the URI list. This also effectively skips dead
  195. mirrors. The observed download speed is a part of performance
  196. profile of servers mentioned in *--server-stat-of* and
  197. *--server-stat-if* options. If 'adaptive' is given, selects one of
  198. the best mirrors for the first and reserved connections. For
  199. supplementary ones, it returns mirrors which has not been tested
  200. yet, and if each of them has already been tested, returns mirrors
  201. which has to be tested again. Otherwise, it doesn't select anymore
  202. mirrors. Like 'feedback', it uses a performance profile of servers.
  203. Default: 'feedback'
  204. HTTP Specific Options
  205. ~~~~~~~~~~~~~~~~~~~~~
  206. *--ca-certificate*=FILE::
  207. Use the certificate authorities in FILE to verify the peers.
  208. The certificate file must be in PEM format and can contain multiple CA
  209. certificates.
  210. Use *--check-certificate* option to enable verification.
  211. *--certificate*=FILE::
  212. Use the client certificate in FILE.
  213. The certificate must be in PEM format.
  214. You may use *--private-key* option to specify the private key.
  215. *--check-certificate*[='true'|'false']::
  216. Verify the peer using certificates specified in *--ca-certificate* option.
  217. Default: 'true'
  218. *--http-accept-gzip*[='true'|'false']::
  219. Send "Accept: deflate, gzip" request header and inflate response if
  220. remote server responds with "Content-Encoding: gzip" or
  221. "Content-Encoding: deflate". Default: 'false'
  222. [NOTE]
  223. Some server responds with "Content-Encoding: gzip" for files which
  224. itself is gzipped file. aria2 inflates them anyway because of the
  225. response header.
  226. *--http-auth-challenge*[='true'|'false']::
  227. Send HTTP authorization header only when it is requested by the
  228. server. If 'false' is set, then authorization header is always sent
  229. to the server. There is an exception: if username and password are
  230. embedded in URI, authorization header is always sent to the server
  231. regardless of this option. Default: 'false'
  232. *--http-no-cache*[='true'|'false']::
  233. Send Cache-Control: no-cache and Pragma: no-cache header to avoid
  234. cached content. If 'false' is given, these headers are not sent
  235. and you can add Cache-Control header with a directive you like
  236. using *--header* option. Default: 'true'
  237. *--http-user*=USER::
  238. Set HTTP user. This affects all URIs.
  239. *--http-passwd*=PASSWD::
  240. Set HTTP password. This affects all URIs.
  241. *--http-proxy*=PROXY::
  242. Use this proxy server for HTTP. To erase previously defined proxy,
  243. use "". See also *--all-proxy* option. This affects all URIs. The
  244. format of PROXY is [\\http://][USER:PASSWORD@]HOST[:PORT]
  245. *--http-proxy-passwd*=PASSWD::
  246. Set password for *--http-proxy* option.
  247. *--http-proxy-user*=USER::
  248. Set user for *--http-proxy* option.
  249. *--https-proxy*=PROXY::
  250. Use this proxy server for HTTPS. To erase previously defined proxy,
  251. use "". See also *--all-proxy* option. This affects all URIs. The
  252. format of PROXY is [\\http://][USER:PASSWORD@]HOST[:PORT]
  253. *--https-proxy-passwd*=PASSWD::
  254. Set password for *--https-proxy* option.
  255. *--https-proxy-user*=USER::
  256. Set user for *--https-proxy* option.
  257. *--private-key*=FILE::
  258. Use the private key in FILE.
  259. The private key must be decrypted and in PEM format.
  260. The behavior when encrypted one is given is undefined.
  261. See also *--certificate* option.
  262. *--referer*=REFERER::
  263. Set Referer. This affects all URIs.
  264. *--enable-http-keep-alive*[='true'|'false']::
  265. Enable HTTP/1.1 persistent connection.
  266. Default: 'true'
  267. *--enable-http-pipelining*[='true'|'false']::
  268. Enable HTTP/1.1 pipelining.
  269. Default: 'false'
  270. [NOTE]
  271. In performance perspective, there is usually no advantage to enable
  272. this option.
  273. *--header*=HEADER::
  274. Append HEADER to HTTP request header.
  275. You can use this option repeatedly to specify more than one header:
  276. aria2c *--header*="X-A: b78" *--header*="X-B: 9J1" "http://host/file"
  277. *--load-cookies*=FILE::
  278. Load Cookies from FILE using the Firefox3 format (SQLite3),
  279. Chromium/Google Chrome (SQLite3) and the
  280. Mozilla/Firefox(1.x/2.x)/Netscape format.
  281. [NOTE]
  282. If aria2 is built without libsqlite3, then it doesn't support Firefox3
  283. and Chromium/Google Chrome cookie format.
  284. *--save-cookies*=FILE::
  285. Save Cookies to FILE in Mozilla/Firefox(1.x/2.x)/ Netscape
  286. format. If FILE already exists, it is overwritten. Session Cookies
  287. are also saved and their expiry values are treated as 0. Possible
  288. Values: '/path/to/file'
  289. *--use-head*[='true'|'false']::
  290. Use HEAD method for the first request to the HTTP server.
  291. Default: 'false'
  292. *-U*, *--user-agent*=USER_AGENT::
  293. Set user agent for HTTP(S) downloads.
  294. Default: 'aria2/$VERSION', $VERSION is replaced by package version.
  295. FTP Specific Options
  296. ~~~~~~~~~~~~~~~~~~~~
  297. *--ftp-user*=USER::
  298. Set FTP user. This affects all URIs.
  299. Default: 'anonymous'
  300. *--ftp-passwd*=PASSWD::
  301. Set FTP password. This affects all URIs.
  302. If user name is embedded but password is missing in URI, aria2 tries
  303. to resolve password using .netrc. If password is found in .netrc,
  304. then use it as password. If not, use the password specified in this
  305. option.
  306. Default: 'ARIA2USER@'
  307. *-p*, *--ftp-pasv*[='true'|'false']::
  308. Use the passive mode in FTP.
  309. If 'false' is given, the active mode will be used.
  310. Default: 'true'
  311. *--ftp-proxy*=PROXY::
  312. Use this proxy server for FTP. To erase previously defined proxy,
  313. use "". See also *--all-proxy* option. This affects all URIs. The
  314. format of PROXY is [\\http://][USER:PASSWORD@]HOST[:PORT]
  315. *--ftp-proxy-passwd*=PASSWD::
  316. Set password for *--ftp-proxy* option.
  317. *--ftp-proxy-user*=USER::
  318. Set user for *--ftp-proxy* option.
  319. *--ftp-type*=TYPE::
  320. Set FTP transfer type. TYPE is either 'binary' or 'ascii'.
  321. Default: 'binary'
  322. *--ftp-reuse-connection*[='true'|'false']::
  323. Reuse connection in FTP.
  324. Default: 'true'
  325. BitTorrent/Metalink Options
  326. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  327. *--select-file*=INDEX...::
  328. Set file to download by specifying its index.
  329. You can find the file index using the *--show-files* option.
  330. Multiple indexes can be specified by using ",", for example: '3,6'.
  331. You can also use "-" to specify a range: '1-5'.
  332. "," and "-" can be used together: '1-5,8,9'.
  333. When used with the -M option, index may vary depending on the query
  334. (see *--metalink-** options).
  335. [NOTE]
  336. In multi file torrent, the adjacent files specified by this option may
  337. also be downloaded. This is by design, not a bug.
  338. A single piece may include several files or part of files, and aria2
  339. writes the piece to the appropriate files.
  340. *-S*, *--show-files*::
  341. Print file listing of .torrent or .metalink file and exit.
  342. In case of .torrent file, additional information
  343. (infohash, piece length, etc) is also printed.
  344. BitTorrent Specific Options
  345. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  346. *--bt-enable-lpd*[='true'|'false']::
  347. Enable Local Peer Discovery. If a private flag is set in a torrent,
  348. aria2 doesn't use this feature for that download even if 'true' is
  349. given. Default: 'false'
  350. *--bt-exclude-tracker*=URI[,...]::
  351. Comma separated list of BitTorrent tracker's announce URI to
  352. remove. You can use special value "\*" which matches all URIs, thus
  353. removes all announce URIs. When specifying "\*" in shell
  354. command-line, don't forget to escape or quote it. See also
  355. *--bt-tracker* option.
  356. *--bt-external-ip*=IPADDRESS::
  357. Specify the external IP address to report to a BitTorrent
  358. tracker. Although this function is named "external", it can accept
  359. any kind of IP addresses. IPADDRESS must be a numeric IP address.
  360. *--bt-hash-check-seed*[='true'|'false']::
  361. If 'true' is given, after hash check using *--check-integrity* option and
  362. file is complete, continue to seed file. If you want to check file
  363. and download it only when it is damaged or incomplete, set this
  364. option to 'false'. This option has effect only on BitTorrent download.
  365. Default: 'true'
  366. *--bt-lpd-interface*=INTERFACE::
  367. Use given interface for Local Peer Discovery. If this option is not
  368. specified, the default interface is chosen. You can specify
  369. interface name and IP address. Possible Values: interface, IP
  370. addres
  371. *--bt-max-open-files*=NUM::
  372. Specify maximum number of files to open in each BitTorrent download.
  373. Default: '100'
  374. *--bt-max-peers*=NUM::
  375. Specify the maximum number of peers per torrent. '0' means
  376. unlimited. See also *--bt-request-peer-speed-limit* option.
  377. Default: '55'
  378. *--bt-metadata-only*[='true'|'false']::
  379. Download metadata only. The file(s) described in metadata will not
  380. be downloaded. This option has effect only when BitTorrent Magnet
  381. URI is used. See also *--bt-save-metadata* option. Default: 'false'
  382. *--bt-min-crypto-level*='plain'|'arc4'::
  383. Set minimum level of encryption method.
  384. If several encryption methods are provided by a peer, aria2 chooses the lowest
  385. one which satisfies the given level.
  386. Default: 'plain'
  387. *--bt-prioritize-piece*='head'[=SIZE],'tail'[=SIZE]::
  388. Try to download first and last pieces of each file first. This is
  389. useful for previewing files. The argument can contain 2 keywords:
  390. 'head' and 'tail'. To include both keywords, they must be separated
  391. by comma. These keywords can take one parameter, SIZE. For example,
  392. if 'head'=SIZE is specified, pieces in the range of first SIZE bytes
  393. of each file get higher priority. 'tail'=SIZE means the range of
  394. last SIZE bytes of each file. SIZE can include 'K' or 'M'(1K = 1024,
  395. 1M = 1024K). If SIZE is omitted, SIZE=1M is used.
  396. *--bt-require-crypto*='true'|'false'::
  397. If true is given, aria2 doesn't accept and establish connection with legacy
  398. BitTorrent handshake(\19BitTorrent protocol).
  399. Thus aria2 always uses Obfuscation handshake.
  400. Default: 'false'
  401. *--bt-request-peer-speed-limit*=SPEED::
  402. If the whole download speed of every torrent is lower than SPEED,
  403. aria2 temporarily increases the number of peers to try for more
  404. download speed. Configuring this option with your preferred download
  405. speed can increase your download speed in some cases.
  406. You can append 'K' or 'M'(1K = 1024, 1M = 1024K).
  407. Default: '50K'
  408. *--bt-save-metadata*[='true'|'false']::
  409. Save metadata as .torrent file. This option has effect only when
  410. BitTorrent Magnet URI is used. The filename is hex encoded info
  411. hash with suffix .torrent. The directory to be saved is the same
  412. directory where download file is saved. If the same file already
  413. exists, metadata is not saved. See also *--bt-metadata-only*
  414. option. Default: 'false'
  415. *--bt-seed-unverified*[='true'|'false']::
  416. Seed previously downloaded files without verifying piece hashes.
  417. Default: 'false'
  418. *--bt-stop-timeout*=SEC::
  419. Stop BitTorrent download if download speed is 0 in consecutive SEC
  420. seconds. If '0' is given, this feature is disabled. Default: '0'
  421. *--bt-tracker*=URI[,...]::
  422. Comma separated list of additional BitTorrent tracker's announce
  423. URI. These URIs are not affected by *--bt-exclude-tracker* option
  424. because they are added after URIs in *--bt-exclude-tracker* option are
  425. removed.
  426. *--bt-tracker-connect-timeout*=SEC::
  427. Set the connect timeout in seconds to establish connection to
  428. tracker. After the connection is established, this option makes no
  429. effect and *--bt-tracker-timeout* option is used instead. Default:
  430. '60'
  431. *--bt-tracker-interval*=SEC::
  432. Set the interval in seconds between tracker requests. This
  433. completely overrides interval value and aria2 just uses this value
  434. and ignores the min interval and interval value in the response of
  435. tracker. If '0' is set, aria2 determines interval based on the
  436. response of tracker and the download progress. Default: '0'
  437. *--bt-tracker-timeout*=SEC::
  438. Set timeout in seconds. Default: '60'
  439. *--dht-entry-point*=HOST:PORT::
  440. Set host and port as an entry point to IPv4 DHT network.
  441. *--dht-entry-point6*=HOST:PORT::
  442. Set host and port as an entry point to IPv6 DHT network.
  443. *--dht-file-path*=PATH::
  444. Change the IPv4 DHT routing table file to PATH.
  445. Default: '$HOME/.aria2/dht.dat'
  446. *--dht-file-path6*=PATH::
  447. Change the IPv6 DHT routing table file to PATH.
  448. Default: '$HOME/.aria2/dht6.dat'
  449. *--dht-listen-addr6*=ADDR::
  450. Specify address to bind socket for IPv6 DHT. It should be a global
  451. unicast IPv6 address of the host.
  452. *--dht-listen-port*=PORT...::
  453. Set UDP listening port for both IPv4 and IPv6 DHT.
  454. Multiple ports can be specified by using ",", for example: '6881,6885'.
  455. You can also use "-" to specify a range: '6881-6999'. "," and "-" can be used
  456. together.
  457. Default: '6881-6999'
  458. [NOTE]
  459. Make sure that the specified ports are open for incoming UDP traffic.
  460. *--dht-message-timeout*=SEC::
  461. Set timeout in seconds. Default: '10'
  462. *--enable-dht*[='true'|'false']::
  463. Enable IPv4 DHT functionality. If a private flag is set in a
  464. torrent, aria2 doesn't use DHT for that download even if 'true' is
  465. given. Default: 'true'
  466. *--enable-dht6*[='true'|'false']::
  467. Enable IPv6 DHT functionality. If a private flag is set in a
  468. torrent, aria2 doesn't use DHT for that download even if 'true' is
  469. given. Use *--dht-listen-port* option to specify port number to
  470. listen on. See also *--dht-listen-addr6* option.
  471. *--enable-peer-exchange*[='true'|'false']::
  472. Enable Peer Exchange extension. If a private flag is set in a torrent, this
  473. feature is disabled for that download even if 'true' is given.
  474. Default: 'true'
  475. *--follow-torrent*='true'|'false'|'mem'::
  476. If 'true' or 'mem' is specified, when a file whose suffix is ".torrent" or content
  477. type is "application/x-bittorrent" is downloaded, aria2 parses it as a torrent
  478. file and downloads files mentioned in it.
  479. If 'mem' is specified, a torrent file is not written to the disk, but is just
  480. kept in memory.
  481. If 'false' is specified, the action mentioned above is not taken.
  482. Default: 'true'
  483. *-O*, *--index-out*=INDEX=PATH::
  484. Set file path for file with index=INDEX. You can find the file index
  485. using the *--show-files* option. PATH is a relative path to the
  486. path specified in *--dir* option. You can use this option multiple
  487. times. Using this option, you can specify the output filenames of
  488. BitTorrent downloads.
  489. *--listen-port*=PORT...::
  490. Set TCP port number for BitTorrent downloads.
  491. Multiple ports can be specified by using ",", for example: '6881,6885'.
  492. You can also use "-" to specify a range: '6881-6999'.
  493. "," and "-" can be used together: '6881-6889,6999'.
  494. Default: '6881-6999'
  495. [NOTE]
  496. Make sure that the specified ports are open for incoming TCP traffic.
  497. *--max-overall-upload-limit*=SPEED::
  498. Set max overall upload speed in bytes/sec.
  499. '0' means unrestricted.
  500. You can append 'K' or 'M'(1K = 1024, 1M = 1024K).
  501. To limit the upload speed per torrent, use *--max-upload-limit* option.
  502. Default: '0'
  503. *-u*, *--max-upload-limit*=SPEED::
  504. Set max upload speed per each torrent in bytes/sec.
  505. '0' means unrestricted.
  506. You can append 'K' or 'M'(1K = 1024, 1M = 1024K).
  507. To limit the overall upload speed, use *--max-overall-upload-limit* option.
  508. Default: '0'
  509. *--peer-id-prefix*=PEER_ID_PREFIX::
  510. Specify the prefix of peer ID. The peer ID in
  511. BitTorrent is 20 byte length. If more than 20
  512. bytes are specified, only first 20 bytes are
  513. used. If less than 20 bytes are specified, random
  514. byte data are added to make its length 20 bytes.
  515. Default: 'aria2/$VERSION-', $VERSION is replaced by package version.
  516. *--seed-ratio*=RATIO::
  517. Specify share ratio. Seed completed torrents until share ratio reaches
  518. RATIO.
  519. You are strongly encouraged to specify equals or more than '1.0' here.
  520. Specify '0.0' if you intend to do seeding regardless of share ratio.
  521. If *--seed-time* option is specified along with this option, seeding ends when
  522. at least one of the conditions is satisfied.
  523. Default: '1.0'
  524. *--seed-time*=MINUTES::
  525. Specify seeding time in minutes. Also see the *--seed-ratio* option.
  526. [NOTE]
  527. Specifying *--seed-time*='0' disables seeding after download completed.
  528. *-T*, *--torrent-file*=TORRENT_FILE::
  529. The path to the .torrent file. You are not required to use this
  530. option because you can specify .torrent files without *-T*.
  531. Metalink Specific Options
  532. ~~~~~~~~~~~~~~~~~~~~~~~~~
  533. *--follow-metalink*='true'|'false'|'mem'::
  534. If 'true' or 'mem' is specified, when a file whose suffix is ".metalink" or content
  535. type of "application/metalink+xml" is downloaded, aria2 parses it as a metalink
  536. file and downloads files mentioned in it.
  537. If 'mem' is specified, a metalink file is not written to the disk, but is just
  538. kept in memory.
  539. If 'false' is specified, the action mentioned above is not taken.
  540. Default: 'true'
  541. *-M*, *--metalink-file*=METALINK_FILE::
  542. The file path to .metalink file. Reads input from stdin when '-' is
  543. specified. You are not required to use this option because you can
  544. specify .metalink files without *-M*.
  545. *-C*, *--metalink-servers*=NUM_SERVERS::
  546. The number of servers to connect to simultaneously.
  547. Some Metalinks regulate the number of servers to connect.
  548. aria2 strictly respects them.
  549. This means that if Metalink defines the maxconnections attribute lower
  550. than NUM_SERVERS, then aria2 uses the value of maxconnections attribute
  551. instead of NUM_SERVERS.
  552. See also *-s* and *-j* options.
  553. Default: '5'
  554. *--metalink-language*=LANGUAGE::
  555. The language of the file to download.
  556. *--metalink-location*=LOCATION[,...]::
  557. The location of the preferred server.
  558. A comma-delimited list of locations is acceptable, for example, 'jp,us'.
  559. *--metalink-os*=OS::
  560. The operating system of the file to download.
  561. *--metalink-version*=VERSION::
  562. The version of the file to download.
  563. *--metalink-preferred-protocol*=PROTO::
  564. Specify preferred protocol.
  565. The possible values are 'http', 'https', 'ftp' and 'none'.
  566. Specify 'none' to disable this feature.
  567. Default: 'none'
  568. *--metalink-enable-unique-protocol*='true'|'false'::
  569. If 'true' is given and several protocols are available for a mirror in a
  570. metalink file, aria2 uses one of them.
  571. Use *--metalink-preferred-protocol* option to specify the preference of
  572. protocol.
  573. Default: 'true'
  574. XML-RPC Options
  575. ~~~~~~~~~~~~~~~
  576. *--enable-xml-rpc*[='true'|'false']::
  577. Enable XML-RPC server. It is strongly recommended to set username
  578. and password using *--xml-rpc-user* and *--xml-rpc-passwd*
  579. option. See also *--xml-rpc-listen-port* option. Default: 'false'
  580. *--xml-rpc-listen-all*[='true'|'false']::
  581. Listen incoming XML-RPC requests on all network interfaces. If false
  582. is given, listen only on local loopback interface. Default: 'false'
  583. *--xml-rpc-listen-port*=PORT::
  584. Specify a port number for XML-RPC server to listen to. Possible
  585. Values: '1024'-'65535' Default: '6800'
  586. *--xml-rpc-max-request-size*=SIZE::
  587. Set max size of XML-RPC request. If aria2 detects the request is
  588. more than SIZE bytes, it drops connection. Default: '2M'
  589. *--xml-rpc-passwd*=PASSWD::
  590. Set XML-RPC password.
  591. *--xml-rpc-user*=USER::
  592. Set XML-RPC user.
  593. Advanced Options
  594. ~~~~~~~~~~~~~~~~
  595. *--allow-overwrite*='true'|'false'::
  596. Restart download from scratch if the corresponding control file
  597. doesn't exist. See also *--auto-file-renaming* option. Default:
  598. 'false'
  599. *--allow-piece-length-change*='true'|'false'::
  600. If false is given, aria2 aborts download when a piece length is different
  601. from one in a control file.
  602. If true is given, you can proceed but some download progress will be lost.
  603. Default: 'false'
  604. *--always-resume*[='true'|'false']::
  605. Always resume download. If 'true' is given, aria2 always tries to
  606. resume download and if resume is not possible, aborts download. If
  607. 'false' is given, when all given URIs do not support resume or aria2
  608. encounters 'N' URIs which does not support resume ('N' is the value
  609. specified using *--max-resume-failure-tries* option), aria2
  610. downloads file from scratch. See *--max-resume-failure-tries*
  611. option. Default: 'true'
  612. *--async-dns*[='true'|'false']::
  613. Enable asynchronous DNS.
  614. Default: 'true'
  615. *--auto-file-renaming*[='true'|'false']::
  616. Rename file name if the same file already exists.
  617. This option works only in HTTP(S)/FTP download.
  618. The new file name has a dot and a number(1..9999) appended.
  619. Default: 'true'
  620. *--auto-save-interval*=SEC::
  621. Save a control file(*.aria2) every SEC seconds.
  622. If '0' is given, a control file is not saved during download. aria2 saves a
  623. control file when it stops regardless of the value.
  624. The possible values are between '0' to '600'.
  625. Default: '60'
  626. *--conditional-get*[='true'|'false']::
  627. Download file only when the local file is older than remote
  628. file. This function only works with HTTP(S) downloads only. It does
  629. not work if file size is specified in Metalink. It also ignores
  630. Content-Disposition header. If a control file exists, this option
  631. will be ignored. This function uses If-Modified-Since header to get
  632. only newer file conditionally. When getting modification time of
  633. local file, it uses user supplied filename(see *--out* option) or
  634. filename part in URI if *--out* is not specified. Default: 'false'
  635. *--conf-path*=PATH::
  636. Change the configuration file path to PATH.
  637. Default: '$HOME/.aria2/aria2.conf'
  638. *-D*, *--daemon*::
  639. Run as daemon. The current working directory will be changed to '/'
  640. and standard input, standard output and standard error will be
  641. redirected to '/dev/null'. Default: 'false'
  642. *--disable-ipv6*[='true'|'false']::
  643. Disable IPv6. This is useful if you have to use broken DNS and want
  644. to avoid terribly slow AAAA record lookup. Default: 'false'
  645. *--enable-async-dns6*[='true'|'false']::
  646. Enable IPv6 name resolution in asynchronous DNS resolver. This
  647. option will be ignored when *--async-dns*='false'.
  648. Default: 'false'
  649. *--enable-direct-io*[='true'|'false']::
  650. Enable directI/O, which lowers cpu usage while allocating/checking files.
  651. Turn off if you encounter any error.
  652. Default: 'true'
  653. *--event-poll*=POLL::
  654. Specify the method for polling events. The possible values are
  655. 'epoll', 'kqueue', 'port', 'poll' and 'select'. For each 'epoll',
  656. 'kqueue', 'port' and 'poll', it is available if system supports it.
  657. 'epoll' is available on recent Linux. 'kqueue' is available on
  658. various *BSD systems including Mac OS X. 'port' is available on Open
  659. Solaris. The default value may vary depending on the system you use.
  660. *--file-allocation*=METHOD::
  661. Specify file allocation method.
  662. 'none' doesn't pre-allocate file space. 'prealloc' pre-allocates file space
  663. before download begins. This may take some time depending on the size of the
  664. file.
  665. If you are using newer file systems such as ext4
  666. (with extents support), btrfs or xfs, 'falloc' is
  667. your best choice. It allocates large(few GiB)
  668. files almost instantly. Don't use 'falloc' with
  669. legacy file systems such as ext3 because it takes
  670. almost same time as 'prealloc' and it blocks aria2
  671. entirely until allocation finishes. 'falloc' may
  672. not be available if your system doesn't have
  673. *posix_fallocate*() function.
  674. Possible Values: 'none', 'prealloc', 'falloc'
  675. Default: 'prealloc'
  676. *--human-readable*[='true'|'false']::
  677. Print sizes and speed in human readable format (e.g., 1.2Ki, 3.4Mi)
  678. in the console readout. Default: 'true'
  679. *--interface*=INTERFACE::
  680. Bind sockets to given interface. You can specify interface name, IP
  681. address and hostname.
  682. Possible Values: interface, IP address, hostname
  683. [NOTE]
  684. If an interface has multiple addresses, it is highly recommended to
  685. specify IP address explicitly. See also *--disable-ipv6*. If your
  686. system doesn't have getifaddrs(), this option doesn't accept interface
  687. name.
  688. *--max-download-result*=NUM::
  689. Set maximum number of download result kept in memory. The download
  690. results are completed/error/removed downloads. The download results
  691. are stored in FIFO queue and it can store at most NUM download
  692. results. When queue is full and new download result is created,
  693. oldest download result is removed from the front of the queue and
  694. new one is pushed to the back. Setting big number in this option may
  695. result high memory consumption after thousands of
  696. downloads. Specifying 0 means no download result is kept. Default:
  697. '1000'
  698. *--max-resume-failure-tries*=N::
  699. When used with *--always-resume*='false', aria2 downloads file from
  700. scratch when aria2 detects 'N' number of URIs that does not support
  701. resume. If 'N' is '0', aria2 downloads file from scratch when all
  702. given URIs do not support resume. See *--always-resume* option.
  703. Default: '0'
  704. *--log-level*=LEVEL::
  705. Set log level to output.
  706. LEVEL is either 'debug', 'info', 'notice', 'warn' or 'error'.
  707. Default: 'debug'
  708. *--on-bt-download-complete*=COMMAND::
  709. For BitTorrent, a command specified in *--on-download-complete* is
  710. called when download completes and seeding is over. On the other
  711. hand, this option set the command to be executed when download
  712. completes but before seeding. See *--on-download-start* option for
  713. the requirement of COMMAND. Possible Values: '/path/to/command'
  714. *--on-download-complete*=COMMAND::
  715. Set the command to be executed when download completes. See
  716. *--on-download-start* option for the requirement of COMMAND. See
  717. also *--on-download-stop* option. Possible Values:
  718. '/path/to/command'
  719. *--on-download-error*=COMMAND::
  720. Set the command to be executed when download aborts due to error.
  721. See *--on-download-start* option for the requirement of COMMAND.
  722. See also *--on-download-stop* option. Possible Values:
  723. '/path/to/command'
  724. *--on-download-pause*=COMMAND::
  725. Set the command to be executed when download is paused. See
  726. *--on-download-start* option for the requirement of COMMAND.
  727. Possible Values: '/path/to/command'
  728. *--on-download-start*=COMMAND::
  729. Set the command to be executed when download starts up. COMMAND must
  730. take just one argument and GID is passed to COMMAND as a first
  731. argument. Possible Values: '/path/to/command'
  732. *--on-download-stop*=COMMAND::
  733. Set the command to be executed when download stops. You can override
  734. the command to be executed for particular download result using
  735. *--on-download-complete* and *--on-download-error*. If they are
  736. specified, command specified in this option is not executed. See
  737. *--on-download-start* option for the requirement of COMMAND.
  738. Possible Values: '/path/to/command'
  739. *--summary-interval*=SEC::
  740. Set interval in seconds to output download progress summary.
  741. Setting '0' suppresses the output.
  742. Default: '60'
  743. [NOTE]
  744. In multi file torrent downloads, the files adjacent forward to the specified files
  745. are also allocated if they share the same piece.
  746. *-Z*, *--force-sequential*[='true'|'false']::
  747. Fetch URIs in the command-line sequentially and download each URI in a
  748. separate session, like the usual command-line download utilities.
  749. Default: 'false'
  750. *--max-overall-download-limit*=SPEED::
  751. Set max overall download speed in bytes/sec. '0' means
  752. unrestricted. You can append 'K' or 'M'(1K = 1024, 1M = 1024K). To
  753. limit the download speed per download, use *--max-download-limit*
  754. option. Default: '0'
  755. *--max-download-limit*=SPEED::
  756. Set max download speed per each download in bytes/sec. '0' means
  757. unrestricted. You can append 'K' or 'M'(1K = 1024, 1M = 1024K). To
  758. limit the overall download speed, use *--max-overall-download-limit*
  759. option. Default: '0'
  760. *--no-conf*::
  761. Disable loading aria2.conf file.
  762. *--no-file-allocation-limit*=SIZE::
  763. No file allocation is made for files whose size is smaller than SIZE.
  764. You can append 'K' or 'M'(1K = 1024, 1M = 1024K).
  765. Default: '5M'
  766. *-P*, *--parameterized-uri*[='true'|'false']::
  767. Enable parameterized URI support.
  768. You can specify set of parts: 'http://{sv1,sv2,sv3}/foo.iso'.
  769. Also you can specify numeric sequences with step counter:
  770. '\http://host/image[000-100:2].img'.
  771. A step counter can be omitted.
  772. If all URIs do not point to the same file, such as the second example above,
  773. -Z option is required.
  774. Default: 'false'
  775. *-q*, *--quiet*[='true'|'false']::
  776. Make aria2 quiet (no console output).
  777. Default: 'false'
  778. *--realtime-chunk-checksum*='true'|'false'::
  779. Validate chunk of data by calculating checksum while downloading a file if
  780. chunk checksums are provided.
  781. Default: 'true'
  782. *--remove-control-file*[='true'|'false']::
  783. Remove control file before download. Using with
  784. *--allow-overwrite*='true', download always starts from
  785. scratch. This will be useful for users behind proxy server which
  786. disables resume.
  787. [NOTE]
  788. For Metalink downloads, -C1 is recommended for proxy server which
  789. disables resume, in order to avoid establishing unnecessary
  790. connections.
  791. *--save-session*=FILE::
  792. Save error/unfinished downloads to FILE on exit. You can pass this
  793. output file to aria2c with *-i* option on restart. Please note that
  794. downloads added by *aria2.addTorrent* and *aria2.addMetalink*
  795. XML-RPC method are not saved.
  796. *--stop*=SEC::
  797. Stop application after SEC seconds has passed.
  798. If '0' is given, this feature is disabled.
  799. Default: '0'
  800. *-v*, *--version*::
  801. Print the version number, copyright and the configuration information and
  802. exit.
  803. Options That Take An Optional Argument
  804. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  805. The options that have its argument surrounded by square brackets([])
  806. take an optional argument. Usually omiting the argument is evaluated to 'true'.
  807. If you use short form of these options(such as '-V') and give
  808. an argument, then the option name and its argument should be concatenated(e.g.
  809. '-Vfalse'). If any spaces are inserted between the option name and the argument,
  810. the argument will be treated as URI and usually this is not what you expect.
  811. URI, MAGNET, TORRENT_FILE, METALINK_FILE
  812. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  813. You can specify multiple URIs in command-line. Unless you specify
  814. *-Z* option, all URIs must point to the same file or downloading will
  815. fail.
  816. You can specify arbitrary number of BitTorrent Magnet URI. Please note
  817. that they are always treated as a separate download. Both hex encoded
  818. 40 characters Info Hash and Base32 encoded 32 characters Info Hash are
  819. supported. The multiple "tr" parameters are supported. Because
  820. BitTorrent Magnet URI is likely to contain "&" character, it is highly
  821. recommended to always quote URI with single(') or double(") quotation.
  822. It is strongly recommended to enable DHT especially when "tr"
  823. parameter is missing. See http://www.bittorrent.org/beps/bep_0009.html
  824. for more details about BitTorrent Magnet URI.
  825. You can also specify arbitrary number of torrent files and Metalink
  826. documents stored on a local drive. Please note that they are always
  827. treated as a separate download. Both Metalink4 and Metalink version
  828. 3.0 are supported.
  829. You can specify both torrent file with -T option and URIs. By doing
  830. this, you can download a file from both torrent swarm and HTTP(S)/FTP
  831. server at the same time, while the data from HTTP(S)/FTP are uploaded
  832. to the torrent swarm. For single file torrents, URI can be a complete
  833. URI pointing to the resource or if URI ends with /, name in torrent
  834. file in torrent is added. For multi-file torrents, name and path are
  835. added to form a URI for each file.
  836. [NOTE]
  837. Make sure that URI is quoted with single(') or double(") quotation if it
  838. contains "&" or any characters that have special meaning in shell.
  839. Resuming Download
  840. ~~~~~~~~~~~~~~~~~
  841. Usually, you can resume transfer by just issuing same command(aria2c
  842. URI) if the previous transfer is made by aria2.
  843. If the previous transfer is made by a browser or wget like sequential
  844. download manager, then use -c option to continue the transfer(aria2c
  845. *-c* URI).
  846. EXIT STATUS
  847. -----------
  848. Because aria2 can handle multiple downloads at once, it encounters
  849. lots of errors in a session. aria2 returns the following exit status
  850. based on the last error encountered.
  851. *0*::
  852. If all downloads are successful.
  853. *1*::
  854. If an unknown error occurs.
  855. *2*::
  856. If time out occurs.
  857. *3*::
  858. If a resource is not found.
  859. *4*::
  860. If aria2 sees the specfied number of "resource not found" error.
  861. See *--max-file-not-found* option).
  862. *5*::
  863. If a download aborts because download speed is too slow.
  864. See *--lowest-speed-limit* option)
  865. *6*::
  866. If network problem occurs.
  867. *7*::
  868. If there are unfinished downloads. This error is only reported if
  869. all finished downloads are successful and there are unfinished
  870. downloads in a queue when aria2 exits by pressing Ctrl-C by an user
  871. or sending TERM or INT signal.
  872. *8*::
  873. If server does not support resume when resume is required to
  874. complete download.
  875. [NOTE]
  876. An error occurred in a finished download will not be reported
  877. as exit status.
  878. ENVIRONMENT
  879. -----------
  880. aria2 recognizes the following environment variables.
  881. http_proxy [\\http://][USER:PASSWORD@]HOST[:PORT]::
  882. Specify proxy server for use in HTTP.
  883. Overrides http-proxy value in configuration file.
  884. The command-line option *--http-proxy* overrides this value.
  885. https_proxy [\\http://][USER:PASSWORD@]HOST[:PORT]::
  886. Specify proxy server for use in HTTPS.
  887. Overrides https-proxy value in configuration file.
  888. The command-line option *--https-proxy* overrides this value.
  889. ftp_proxy [\\http://][USER:PASSWORD@]HOST[:PORT]::
  890. Specify proxy server for use in FTP.
  891. Overrides ftp-proxy value in configuration file.
  892. The command-line option *--ftp-proxy* overrides this value.
  893. all_proxy [\\http://][USER:PASSWORD@]HOST[:PORT]::
  894. Specify proxy server for use if no protocol-specific proxy is specified.
  895. Overrides all-proxy value in configuration file.
  896. The command-line option *--all-proxy* overrides this value.
  897. no_proxy [DOMAIN,...]::
  898. Specify comma-separated hostname, domains and network address with
  899. or without CIDR block to which proxy should not be used. Overrides
  900. no-proxy value in configuration file. The command-line option
  901. *--no-proxy* overrides this value.
  902. FILES
  903. -----
  904. aria2.conf
  905. ~~~~~~~~~~
  906. By default, aria2 parses '$HOME/.aria2/aria2.conf' as a configuraiton
  907. file. You can specify the path to configuration file using
  908. *--conf-path* option. If you don't want to use the configuraitonf
  909. file, use *--no-conf* option.
  910. The configuration file is a text file and has 1 option per each
  911. line. In each line, you can specify name-value pair in the format:
  912. NAME=VALUE, where name is the long command-line option name without
  913. "--" prefix. You can use same syntax for the command-line option. The
  914. lines beginning "#" are treated as comments.
  915. --------------------------------------
  916. # sample configuration file for aria2c
  917. listen-port=60000
  918. dht-listen-port=60000
  919. seed-ratio=1.0
  920. max-upload-limit=50K
  921. ftp-pasv=true
  922. --------------------------------------
  923. dht.dat
  924. ~~~~~~~~
  925. By default, the routing table of IPv4 DHT is saved to the path
  926. '$HOME/.aria2/dht.dat' and the routing table of IPv6 DHT is saved to
  927. the path '$HOME/.aria2/dht6.dat'.
  928. Netrc
  929. ~~~~~
  930. Netrc support is enabled by default for HTTP(S)/FTP. To disable netrc
  931. support, specify *-n* option. Your .netrc file should have correct
  932. permissions(600).
  933. If machine name starts ".", aria2 performs domain match instead of
  934. exact match. This is an extension of aria2. For example of domain
  935. match, imagine the following .netrc entry:
  936. -------------------------------------------------
  937. machine .example.org login myid password mypasswd
  938. -------------------------------------------------
  939. In domain match, aria2.example.org matches .example.org and uses myid
  940. and mypasswd. example.org also matches .example.org. But example.net
  941. does not match .example.org.
  942. Control File
  943. ~~~~~~~~~~~~
  944. aria2 uses a control file to track the progress of a download. A
  945. control file is placed in the same directory as the downloading file
  946. and its filename is the filename of downloading file with ".aria2"
  947. appended. For example, if you are downloading file.zip, then the
  948. control file should be file.zip.aria2. (There is a exception for this
  949. naming convention. If you are downloading a multi torrent, its
  950. control file is the "top directory" name of the torrent with ".aria2"
  951. appended. The "top directory" name is a value of "name" key in "info"
  952. directory in a torrent file.)
  953. Usually a control file is deleted once download completed. If aria2
  954. decides that download cannot be resumed(for example, when downloading
  955. a file from a HTTP server which doesn't support resume), a control
  956. file is not created.
  957. Normally if you lose a control file, you cannot resume download. But
  958. if you have a torrent or metalink with chunk checksums for the file,
  959. you can resume the download without a control file by giving -V option
  960. to aria2c in command-line.
  961. Input File
  962. ~~~~~~~~~~
  963. The input file can contain a list of URIs for aria2 to download. You
  964. can specify multiple URIs for a single entity: separate URIs on a
  965. single line using the TAB character.
  966. Each line is treated as if it is provided in command-line argument.
  967. Therefore they are affected by *-Z* and *-P* options.
  968. Lines starting with "#" are treated as comments and skipped.
  969. Additionally, the following options can be specified after each line
  970. of URIs. These optional lines must start with white space(s).
  971. * dir
  972. * check-integrity
  973. * continue
  974. * all-proxy
  975. * all-proxy-user
  976. * all-proxy-passwd
  977. * connect-timeout
  978. * dry-run
  979. * lowest-speed-limit
  980. * max-file-not-found
  981. * max-tries
  982. * no-proxy
  983. * out
  984. * proxy-method
  985. * remote-time
  986. * split
  987. * timeout
  988. * http-auth-challenge
  989. * http-no-cache
  990. * http-user
  991. * http-passwd
  992. * http-proxy
  993. * http-proxy-user
  994. * http-proxy-passwd
  995. * https-proxy
  996. * https-proxy-user
  997. * https-proxy-passwd
  998. * referer
  999. * enable-http-keep-alive
  1000. * enable-http-pipelining
  1001. * header
  1002. * use-head
  1003. * user-agent
  1004. * ftp-user
  1005. * ftp-passwd
  1006. * ftp-pasv
  1007. * ftp-proxy
  1008. * ftp-proxy-user
  1009. * ftp-proxy-passwd
  1010. * ftp-type
  1011. * ftp-reuse-connection
  1012. * no-netrc
  1013. * reuse-uri
  1014. * select-file
  1015. * bt-enable-lpd
  1016. * bt-external-ip
  1017. * bt-hash-check-seed
  1018. * bt-max-open-files
  1019. * bt-max-peers
  1020. * bt-metadata-only
  1021. * bt-min-crypto-level
  1022. * bt-prioritize-piece
  1023. * bt-require-crypto
  1024. * bt-request-peer-speed-limit
  1025. * bt-save-metadata
  1026. * bt-seed-unverified
  1027. * bt-stop-timeout
  1028. * bt-tracker-interval
  1029. * bt-tracker-timeout
  1030. * bt-tracker-connect-timeout
  1031. * enable-peer-exchange
  1032. * follow-torrent
  1033. * index-out
  1034. * max-upload-limit
  1035. * seed-ratio
  1036. * seed-time
  1037. * follow-metalink
  1038. * metalink-servers
  1039. * metalink-language
  1040. * metalink-location
  1041. * metalink-os
  1042. * metalink-version
  1043. * metalink-preferred-protocol
  1044. * metalink-enable-unique-protocol
  1045. * allow-overwrite
  1046. * allow-piece-length-change
  1047. * async-dns
  1048. * auto-file-renaming
  1049. * file-allocation
  1050. * max-download-limit
  1051. * no-file-allocation-limit
  1052. * parameterized-uri
  1053. * realtime-chunk-checksum
  1054. * remove-control-file
  1055. * always-resume
  1056. * max-resume-failure-tries
  1057. * http-accept-gzip
  1058. * max-connection-per-server
  1059. * min-split-size
  1060. * conditional-get
  1061. * enable-async-dns6
  1062. * bt-tracker
  1063. * bt-exclude-tracker
  1064. These options have exactly same meaning of the ones in the
  1065. command-line options, but it just applies to the URIs it belongs to.
  1066. For example, the content of uri.txt is
  1067. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1068. http://server/file.iso http://mirror/file.iso
  1069. dir=/iso_images
  1070. out=file.img
  1071. http://foo/bar
  1072. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1073. If aria2 is executed with *-i* uri.txt *-d* /tmp options, then
  1074. 'file.iso' is saved as '/iso_images/file.img' and it is downloaded
  1075. from \http://server/file.iso and \http://mirror/file.iso. The file
  1076. 'bar' is downloaded from \http://foo/bar and saved as '/tmp/bar'.
  1077. In some cases, *out* parameter has no effect. See note of *--out*
  1078. option for the restrictions.
  1079. Server Performance Profile
  1080. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1081. This section describes the format of server performance profile. The
  1082. file is plain text and each line has several NAME=VALUE pair,
  1083. delimited by comma. Currently following NAMEs are recognized:
  1084. host::
  1085. Hostname of the server. Required.
  1086. protocol::
  1087. Protocol for this profile, such as ftp, http. Required.
  1088. dl_speed::
  1089. The average download speed observed in the previous download in
  1090. bytes per sec. Required.
  1091. sc_avg_speed::
  1092. The average download speed observed in the previous download in
  1093. bytes per sec. This value is only updated if the download is done in
  1094. single connection environment and only used by
  1095. AdaptiveURISelector. Optional.
  1096. mc_avg_speed::
  1097. The average download speed observed in the previous download in
  1098. bytes per sec. This value is only updated if the download is done in
  1099. multi connection environment and only used by
  1100. AdaptiveURISelector. Optional.
  1101. counter::
  1102. How many times the server is used. Currently this value is only used
  1103. by AdaptiveURISelector. Optional.
  1104. last_updated::
  1105. Last contact time in GMT with this server, specified in the seconds
  1106. since the Epoch(00:00:00 on January 1, 1970, UTC). Required.
  1107. status::
  1108. ERROR is set when server cannot be reached or out-of-service or
  1109. timeout occurred. Otherwise, OK is set.
  1110. Those fields must exist in one line. The order of the fields is not
  1111. significant. You can put pairs other than the above; they are simply
  1112. ignored.
  1113. An example follows:
  1114. --------------------------------------------------------------------------------
  1115. host=localhost, protocol=http, dl_speed=32000, last_updated=1222491640, status=OK
  1116. host=localhost, protocol=ftp, dl_speed=0, last_updated=1222491632, status=ERROR
  1117. --------------------------------------------------------------------------------
  1118. XML-RPC INTERFACE
  1119. -----------------
  1120. Terminology
  1121. ~~~~~~~~~~~
  1122. GID::
  1123. GID(or gid) is the key to manage each download. Each download has an
  1124. unique GID. Currently GID looks like an integer, but don't treat it
  1125. as integer because it may be changed to another type in the future
  1126. release. Please note that GID is session local and not persisted
  1127. when aria2 exits.
  1128. Methods
  1129. ~~~~~~~
  1130. All code examples come from Python2.7 interpreter.
  1131. *aria2.addUri* ('uris[, options[, position]]')
  1132. This method adds new HTTP(S)/FTP/BitTorrent Magnet URI. 'uris' is of
  1133. type array and its element is URI which is of type string. For
  1134. BitTorrent Magnet URI, 'uris' must have only one element and it should
  1135. be BitTorrent Magnet URI. URIs in 'uris' must point to the same file.
  1136. If you mix other URIs which point to another file, aria2 does not
  1137. complain but download may fail. 'options' is of type struct and its
  1138. members are a pair of option name and value. See *Options* below for
  1139. more details. If 'position' is given as an integer starting from 0,
  1140. the new download is inserted at 'position' in the waiting queue. If
  1141. 'position' is not given or 'position' is larger than the size of the
  1142. queue, it is appended at the end of the queue. This method returns
  1143. GID of registered download.
  1144. Adding \http://example.org/file to aria2:
  1145. ----------------------------------------------------------
  1146. >>> import xmlrpclib
  1147. >>> s = xmlrpclib.ServerProxy('http://localhost:6800/rpc')
  1148. >>> s.aria2.addUri(['http://example.org/file'])
  1149. '1'
  1150. ----------------------------------------------------------
  1151. Adding 2 sources and some options:
  1152. --------------------------------------------------------------------------
  1153. >>> s.aria2.addUri(['http://example.org/file'], dict(dir="/tmp"))
  1154. '2'
  1155. --------------------------------------------------------------------------
  1156. Adding a download and insert it to the front of waiting downloads:
  1157. ---------------------------------------------------------------
  1158. >>> s.aria2.addUri(['http://example.org/file'], {}, 0)
  1159. '3'
  1160. ---------------------------------------------------------------
  1161. *aria2.addTorrent* ('torrent[, uris[, options[, position]]]')
  1162. This method adds BitTorrent download by uploading .torrent file. If
  1163. you want to add BitTorrent Magnet URI, use *aria2.addUri* method
  1164. instead. 'torrent' is of type base64 which contains Base64-encoded
  1165. .torrent file. 'uris' is of type array and its element is URI which
  1166. is of type string. 'uris' is used for Web-seeding. For single file
  1167. torrents, URI can be a complete URI pointing to the resource or if URI
  1168. ends with /, name in torrent file is added. For multi-file torrents,
  1169. name and path in torrent are added to form a URI for each file.
  1170. 'options' is of type struct and its members are a pair of option name
  1171. and value. See *Options* below for more details. If 'position' is
  1172. given as an integer starting from 0, the new download is inserted at
  1173. 'position' in the waiting queue. If 'position' is not given or
  1174. 'position' is larger than the size of the queue, it is appended at the
  1175. end of the queue. This method returns GID of registered download.
  1176. Please note that the downloads added by this method are not saved by
  1177. *--save-session*.
  1178. Adding local file file.torrent to aria2:
  1179. ---------------------------------------------------------------------
  1180. >>> import xmlrpclib
  1181. >>> s = xmlrpclib.ServerProxy('http://localhost:6800/rpc')
  1182. >>> s.aria2.addTorrent(xmlrpclib.Binary(open('file.torrent').read()))
  1183. '6'
  1184. ---------------------------------------------------------------------
  1185. *aria2.addMetalink* ('metalink[, options[, position]]')
  1186. This method adds Metalink download by uploading .metalink file.
  1187. 'metalink' is of type base64 which contains Base64-encoded .metalink
  1188. file. 'options' is of type struct and its members are a pair of
  1189. option name and value. See *Options* below for more details. If
  1190. 'position' is given as an integer starting from 0, the new download is
  1191. inserted at 'position' in the waiting queue. If 'position' is not
  1192. given or 'position' is larger than the size of the queue, it is
  1193. appended at the end of the queue. This method returns array of GID of
  1194. registered download. Please note that the downloads added by this
  1195. method are not saved by *--save-session*.
  1196. Adding local file file.meta4 to aria2:
  1197. --------------------------------------------------------------------
  1198. >>> import xmlrpclib
  1199. >>> s = xmlrpclib.ServerProxy('http://localhost:6800/rpc')
  1200. >>> s.aria2.addMetalink(xmlrpclib.Binary(open('file.meta4').read()))
  1201. ['8']
  1202. --------------------------------------------------------------------
  1203. *aria2.remove* ('gid')
  1204. This method removes the download denoted by 'gid'. 'gid' is of type
  1205. string. If specified download is in progress, it is stopped at
  1206. first. The status of removed download becomes "removed". This method
  1207. returns GID of removed download.
  1208. Removing download whose GID is '3':
  1209. --------------------------------------------------------------------
  1210. >>> import xmlrpclib
  1211. >>> s = xmlrpclib.ServerProxy('http://localhost:6800/rpc')
  1212. >>> s.aria2.remove('3')
  1213. '3'
  1214. --------------------------------------------------------------------
  1215. *aria2.forceRemove* ('gid')
  1216. This method removes the download denoted by 'gid'. This method
  1217. behaves just like *aria2.remove* except that this method removes
  1218. download without any action which takes time such as contacting
  1219. BitTorrent tracker.
  1220. *aria2.pause* ('gid')
  1221. This method pauses the download denoted by 'gid'. 'gid' is of type
  1222. string. The status of paused download becomes "paused". If the
  1223. download is active, the download is placed on the first position of
  1224. waiting queue. As long as the status is "paused", the download is not
  1225. started. To change status to "waiting", use *aria2.unpause* method.
  1226. This method returns GID of paused download.
  1227. *aria2.pauseAll* ()
  1228. This method is equal to calling *aria2.pause* for every active/waiting
  1229. download. This methods returns "OK" for success.
  1230. *aria2.forcePause* ('pid')
  1231. This method pauses the download denoted by 'gid'. This method
  1232. behaves just like *aria2.pause* except that this method pauses
  1233. download without any action which takes time such as contacting
  1234. BitTorrent tracker.
  1235. *aria2.forcePauseAll* ()
  1236. This method is equal to calling *aria2.forcePause* for every
  1237. active/waiting download. This methods returns "OK" for success.
  1238. *aria2.unpause* ('gid')
  1239. This method changes the status of the download denoted by 'gid' from
  1240. "paused" to "waiting". This makes the download eligible to restart.
  1241. 'gid' is of type string. This method returns GID of unpaused
  1242. download.
  1243. *aria2.unpauseAll* ()
  1244. This method is equal to calling *aria2.unpause* for every active/waiting
  1245. download. This methods returns "OK" for success.
  1246. *aria2.tellStatus* ('gid[, keys]')
  1247. This method returns download progress of the download denoted by
  1248. 'gid'. 'gid' is of type string. 'keys' is array of string. If it is
  1249. specified, the response contains only keys in 'keys' array. If 'keys'
  1250. is empty or not specified, the response contains all keys. This is
  1251. useful when you just want specific keys and avoid unnecessary
  1252. transfers. For example, *aria2.tellStatus*("1", ["gid", "status"])
  1253. returns 'gid' and 'status' key. The response is of type struct and it
  1254. contains following keys. The value type is string.
  1255. gid::
  1256. GID of this download.
  1257. status::
  1258. "active" for currently downloading/seeding entry. "waiting" for the
  1259. entry in the queue; download is not started. "paused" for the
  1260. paused entry. "error" for the stopped download because of
  1261. error. "complete" for the stopped and completed download. "removed"
  1262. for the download removed by user.
  1263. totalLength::
  1264. Total length of this download in bytes.
  1265. completedLength::
  1266. Completed length of this download in bytes.
  1267. uploadLength::
  1268. Uploaded length of this download in bytes.
  1269. bitfield::
  1270. Hexadecimal representation of the download progress. The highest bit
  1271. corresponds to piece index 0. The set bits indicate the piece is
  1272. available and unset bits indicate the piece is missing. The spare
  1273. bits at the end are set to zero. When download has not started yet,
  1274. this key will not be included in the response.
  1275. downloadSpeed::
  1276. Download speed of this download measured in bytes/sec.
  1277. uploadSpeed::
  1278. Upload speed of this download measured in bytes/sec.
  1279. infoHash::
  1280. InfoHash. BitTorrent only.
  1281. numSeeders::
  1282. The number of seeders the client has connected to. BitTorrent only.
  1283. pieceLength::
  1284. Piece length in bytes.
  1285. numPieces::
  1286. The number of pieces.
  1287. connections::
  1288. The number of peers/servers the client has connected to.
  1289. errorCode::
  1290. The last error code occurred in this download. The value is of type
  1291. string. The error codes are defined in *<<_exit_status, EXIT
  1292. STATUS>>* section. This value is only available for
  1293. stopped/completed downloads.
  1294. followedBy::
  1295. List of GIDs which are generated by the consequence of this
  1296. download. For example, when aria2 downloaded Metalink file, it
  1297. generates downloads described in it(see *--follow-metalink*
  1298. option). This value is useful to track these auto generated
  1299. downloads. If there is no such downloads, this key will not
  1300. be included in the response.
  1301. belongsTo::
  1302. GID of a parent download. Some downloads are a part of another
  1303. download. For example, if a file in Metalink has BitTorrent
  1304. resource, the download of .torrent is a part of that file. If this
  1305. download has no parent, this key will not be included in the
  1306. response.
  1307. dir::
  1308. Directory to save files. This key is not available for stopped
  1309. downloads.
  1310. files::
  1311. Returns the list of files. The element of list is the same struct
  1312. used in *aria2.getFiles* method.
  1313. bittorrent::
  1314. Struct which contains information retrieved from .torrent
  1315. file. BitTorrent only. It contains following keys.
  1316. announceList;;
  1317. List of lists of announce URI. If .torrent file contains announce
  1318. and no announce-list, announce is converted to announce-list
  1319. format.
  1320. comment;;
  1321. The comment for the torrent. comment.utf-8 is used if available.
  1322. creationDate;;
  1323. The creation time of the torrent. The value is an integer since
  1324. the Epoch, measured in seconds.
  1325. mode;;
  1326. File mode of the torrent. The value is either 'single' or 'multi'.
  1327. info;;
  1328. Struct which contains data from Info dictionary. It contains
  1329. following keys.
  1330. name:::
  1331. name in info dictionary. name.utf-8 is used if available.
  1332. Get information about download whose GID is '1':
  1333. --------------------------------------------------------------------
  1334. >>> import xmlrpclib
  1335. >>> from pprint import pprint
  1336. >>> s = xmlrpclib.ServerProxy('http://localhost:6800/rpc')
  1337. >>> r = s.aria2.tellStatus('1')
  1338. >>> pprint(r)
  1339. {'bitfield': 'ffff80',
  1340. 'completedLength': '34896138',
  1341. 'connections': '0',
  1342. 'dir': '/downloads',
  1343. 'downloadSpeed': '0',
  1344. 'errorCode': '0',
  1345. 'files': [{'index': '1',
  1346. 'length': '34896138',
  1347. 'path': '/downloads/file',
  1348. 'selected': 'true',
  1349. 'uris': [{'status': 'used',
  1350. 'uri': 'http://example.org/file'}]}],
  1351. 'gid': '1',
  1352. 'numPieces': '17',
  1353. 'pieceLength': '2097152',
  1354. 'status': 'complete',
  1355. 'totalLength': '34896138',
  1356. 'uploadLength': '0',
  1357. 'uploadSpeed': '0'}
  1358. --------------------------------------------------------------------
  1359. Get information specifying keys you are interested in:
  1360. --------------------------------------------------------------------------
  1361. >>> r = s.aria2.tellStatus('1', ['gid', 'totalLength', 'completedLength'])
  1362. >>> pprint(r)
  1363. {'completedLength': '34896138', 'gid': '1', 'totalLength': '34896138'}
  1364. --------------------------------------------------------------------------
  1365. *aria2.getUris* ('gid')
  1366. This method returns URIs used in the download denoted by 'gid'. 'gid'
  1367. is of type string. The response is of type array and its element is of
  1368. type struct and it contains following keys. The value type is string.
  1369. uri::
  1370. URI
  1371. status::
  1372. 'used' if the URI is already used. 'waiting' if the URI is waiting
  1373. in the queue.
  1374. *aria2.getFiles* ('gid')
  1375. This method returns file list of the download denoted by 'gid'. 'gid'
  1376. is of type string. The response is of type array and its element is of
  1377. type struct and it contains following keys. The value type is string.
  1378. index::
  1379. Index of file. Starting with 1. This is the same order with the
  1380. files in multi-file torrent.
  1381. path::
  1382. File path.
  1383. length::
  1384. File size in bytes.
  1385. selected::
  1386. "true" if this file is selected by *--select-file* option. If
  1387. *--select-file* is not specified or this is single torrent or no
  1388. torrent download, this value is always "true". Otherwise "false".
  1389. uris::
  1390. Returns the list of URI for this file. The element of list is the
  1391. same struct used in *aria2.getUris* method.
  1392. *aria2.getPeers* ('gid')
  1393. This method returns peer list of the download denoted by 'gid'. 'gid'
  1394. is of type string. This method is for BitTorrent only. The response
  1395. is of type array and its element is of type struct and it contains
  1396. following keys. The value type is string.
  1397. peerId::
  1398. Percent-encoded peer ID.
  1399. ip::
  1400. IP address of the peer.
  1401. port::
  1402. Port number of the peer.
  1403. bitfield::
  1404. Hexadecimal representation of the download progress of the peer. The
  1405. highest bit corresponds to piece index 0. The set bits indicate the
  1406. piece is available and unset bits indicate the piece is missing. The
  1407. spare bits at the end are set to zero.
  1408. amChoking::
  1409. "true" if this client is choking the peer. Otherwise "false".
  1410. peerChoking::
  1411. "true" if the peer is choking this client. Otherwise "false".
  1412. downloadSpeed::
  1413. Download speed (byte/sec) that this client obtains from the peer.
  1414. uploadSpeed::
  1415. Upload speed(byte/sec) that this client uploads to the peer.
  1416. seeder::
  1417. "true" is this client is a seeder. Otherwise "false".
  1418. *aria2.getServers* ('gid')
  1419. This method returns currently connected HTTP(S)/FTP servers of the download denoted by 'gid'. 'gid' is of type string. The response
  1420. is of type array and its element is of type struct and it contains
  1421. following keys. The value type is string.
  1422. index::
  1423. Index of file. Starting with 1. This is the same order with the
  1424. files in multi-file torrent.
  1425. servers::
  1426. The list of struct which contains following keys.
  1427. uri;;
  1428. URI originally added.
  1429. currentUri;;
  1430. This is the URI currently used for downloading. If redirection is
  1431. involved, currentUri and uri may differ.
  1432. downloadSpeed;;
  1433. Download speed (byte/sec)
  1434. *aria2.tellActive* ('[keys]')
  1435. This method returns the list of active downloads. The response is of
  1436. type array and its element is the same struct returned by
  1437. *aria2.tellStatus* method. For 'keys' parameter, please refer to
  1438. *aria2.tellStatus* method.
  1439. *aria2.tellWaiting* ('offset, num, [keys]')
  1440. This method returns the list of waiting download, including paused
  1441. downloads. 'offset' is of type integer and specifies the offset from
  1442. the download waiting at the front. 'num' is of type integer and
  1443. specifies the number of downloads to be returned. For 'keys'
  1444. parameter, please refer to *aria2.tellStatus* method.
  1445. If offset is a positive integer, this method returns downloads in the
  1446. range of ['offset', 'offset'+'num').
  1447. 'offset' can be a negative integer. 'offset' == -1 points last
  1448. download in the waiting queue and 'offset' == -2 points the download
  1449. before the last download, and so on. The downloads in the response are
  1450. in reversed order.
  1451. For example, imagine that three downloads "A","B" and "C" are waiting
  1452. in this order. aria2.tellWaiting(0, 1) returns
  1453. ["A"]. aria2.tellWaiting(1, 2) returns ["B", "C"].
  1454. aria2.tellWaiting(-1, 2) returns ["C", "B"].
  1455. The response is of type array and its element is the same struct
  1456. returned by *aria2.tellStatus* method.
  1457. *aria2.tellStopped* ('offset, num, [keys]')
  1458. This method returns the list of stopped download. 'offset' is of type
  1459. integer and specifies the offset from the oldest download. 'num' is of
  1460. type integer and specifies the number of downloads to be returned.
  1461. For 'keys' parameter, please refer to *aria2.tellStatus* method.
  1462. 'offset' and 'num' have the same semantics as *aria2.tellWaiting*
  1463. method.
  1464. The response is of type array and its element is the same struct
  1465. returned by *aria2.tellStatus* method.
  1466. *aria2.changePosition* ('gid, pos, how')
  1467. This method changes the position of the download denoted by
  1468. 'gid'. 'pos' is of type integer. 'how' is of type string. If 'how' is
  1469. "POS_SET", it moves the download to a position relative to the
  1470. beginning of the queue. If 'how' is "POS_CUR", it moves the download
  1471. to a position relative to the current position. If 'how' is "POS_END",
  1472. it moves the download to a position relative to the end of the
  1473. queue. If the destination position is less than 0 or beyond the end of
  1474. the queue, it moves the download to the beginning or the end of the
  1475. queue respectively. The response is of type integer and it is the
  1476. destination position.
  1477. For example, if GID#1 is placed in position 3, aria2.changePosition(1,
  1478. -1, POS_CUR) will change its position to 2. Additional
  1479. aria2.changePosition(1, 0, POS_SET) will change its position to 0(the
  1480. beginning of the queue).
  1481. *aria2.changeUri* ('gid, fileIndex, delUris, addUris[, position]')
  1482. This method removes URIs in 'delUris' from and appends URIs in
  1483. 'addUris' to download denoted by 'gid'. 'delUris' and 'addUris' are
  1484. list of string. A download can contain multiple files and URIs are
  1485. attached to each file. 'fileIndex' is used to select which file to
  1486. remove/attach given URIs. 'fileIndex' is 1-based. 'position' is used
  1487. to specify where URIs are inserted in the existing waiting URI
  1488. list. 'position' is 0-based. When 'position' is omitted, URIs are
  1489. appended to the back of the list. This method first execute removal
  1490. and then addition. 'position' is the position after URIs are removed,
  1491. not the position when this method is called. When removing URI, if
  1492. same URIs exist in download, only one of them is removed for each URI
  1493. in 'delUris'. In other words, there are three URIs
  1494. "http://example.org/aria2" and you want remove them all, you have to
  1495. specify (at least) 3 "http://example.org/aria2" in 'delUris'. This
  1496. method returns a list which contains 2 integers. The first integer is
  1497. the number of URIs deleted. The second integer is the number of URIs
  1498. added.
  1499. *aria2.getOption* ('gid')
  1500. This method returns options of the download denoted by 'gid'. The
  1501. response is of type struct. Its key is the name of option. The value type
  1502. is string.
  1503. *aria2.changeOption* ('gid, options')
  1504. This method changes options of the download denoted by 'gid'
  1505. dynamically. 'gid' is of type string. 'options' is of type struct
  1506. and the available options are: *bt-max-peers*,
  1507. *bt-request-peer-speed-limit*, *max-download-limit* and
  1508. *max-upload-limit*. This method returns "OK" for success.
  1509. *aria2.getGlobalOption* ()
  1510. This method returns global options. The response is of type
  1511. struct. Its key is the name of option. The value type is string.
  1512. Because global options are used as a template for the options of newly
  1513. added download, the response contains keys returned by
  1514. *aria2.getOption* method.
  1515. *aria2.changeGlobalOption* ('options')
  1516. This method changes global options dynamically. 'options' is of type
  1517. struct and the available options are *max-concurrent-downloads*,
  1518. *max-overall-download-limit*, *max-overall-upload-limit*, *log-level*
  1519. and *log*. Using *log* option, you can dynamically start logging or
  1520. change log file. To stop logging, give empty string("") as a parameter
  1521. value. Note that log file is always opened in append mode. This method
  1522. returns "OK" for success.
  1523. *aria2.purgeDownloadResult* ()
  1524. This method purges completed/error/removed downloads to free memory.
  1525. This method returns "OK".
  1526. *aria2.getVersion* ()
  1527. This method returns version of the program and the list of enabled
  1528. features. The response is of type struct and contains following keys.
  1529. version::
  1530. Version number of the program in string.
  1531. enabledFeatures::
  1532. List of enabled features. Each feature name is of type string.
  1533. --------------------------------------------------------------------
  1534. >>> import xmlrpclib
  1535. >>> from pprint import pprint
  1536. >>> s = xmlrpclib.ServerProxy('http://localhost:6800/rpc')
  1537. >>> r = s.aria2.getVersion()
  1538. >>> pprint(r)
  1539. {'enabledFeatures': ['Async DNS',
  1540. 'BitTorrent',
  1541. 'Firefox3 Cookie',
  1542. 'GZip',
  1543. 'HTTPS',
  1544. 'Message Digest',
  1545. 'Metalink',
  1546. 'XML-RPC'],
  1547. 'version': '1.10.5'}
  1548. --------------------------------------------------------------------
  1549. *aria2.getSessionInfo* ()
  1550. This method returns session information.
  1551. The response is of type struct and contains following key.
  1552. sessionId::
  1553. Session ID, which is generated each time when aria2 is invoked.
  1554. --------------------------------------------------------------------
  1555. >>> import xmlrpclib
  1556. >>> s = xmlrpclib.ServerProxy('http://localhost:6800/rpc')
  1557. >>> s.aria2.getSessionInfo()
  1558. {'sessionId': 'cd6a3bc6a1de28eb5bfa181e5f6b916d44af31a9'}
  1559. --------------------------------------------------------------------
  1560. *aria2.shutdown* ()
  1561. This method shutdowns aria2. This method returns "OK".
  1562. *aria2.forceShutdown* ()
  1563. This method shutdowns aria2. This method behaves like *aria2.shutdown*
  1564. except that any actions which takes time such as contacting BitTorrent
  1565. tracker are skipped. This method returns "OK".
  1566. *system.multicall* ('methods')
  1567. This methods encapsulates multiple method calls in a single request.
  1568. 'methods' is of type array and its element is struct. The struct
  1569. contains two keys: "methodName" and "params". "methodName" is the
  1570. method name to call and "params" is array containing parameters to the
  1571. method. This method returns array of responses. The element of array
  1572. will either be a one-item array containing the return value of each
  1573. method call or struct of fault element if an encapsulated method call
  1574. fails.
  1575. In the following example, we add 2 downloads. First one is
  1576. \http://example.org/file and second one is file.torrent:
  1577. ----------------------------------------------------------------------
  1578. >>> import xmlrpclib
  1579. >>> s = xmlrpclib.ServerProxy('http://localhost:6800/rpc')
  1580. >>> mc = xmlrpclib.MultiCall(s)
  1581. >>> mc.aria2.addUri(['http://example.org/file'])
  1582. >>> mc.aria2.addTorrent(xmlrpclib.Binary(open('file.torrent').read()))
  1583. >>> r = mc()
  1584. >>> tuple(r)
  1585. ('2', '3')
  1586. ----------------------------------------------------------------------
  1587. Error Handling
  1588. ~~~~~~~~~~~~~~
  1589. In case of error, aria2 returns faultCode=1 and the error message in
  1590. faultString.
  1591. Options
  1592. ~~~~~~~
  1593. Same options for *-i* list are available. See *<<_input_file, Input
  1594. File>>* subsection for complete list of options.
  1595. In the option struct, name element is option name(without preceding
  1596. "--") and value element is argument as string.
  1597. -------------------------------------------------
  1598. <struct>
  1599. <member>
  1600. <name>split</name>
  1601. <value><string>1</string></value>
  1602. </member>
  1603. <member>
  1604. <name>http-proxy</name>
  1605. <value><string>http://proxy/</string></value>
  1606. </member>
  1607. </struct>
  1608. -------------------------------------------------
  1609. *header* and *index-out* option are allowed multiple times in
  1610. command-line. Since name should be unique in struct(many XML-RPC
  1611. library implementation uses hash or dict for struct), single string is
  1612. not enough. To overcome this situation, they can take array as value
  1613. as well as string.
  1614. ---------------------------------------------------------------
  1615. <struct>
  1616. <member>
  1617. <name>header</name>
  1618. <value>
  1619. <array>
  1620. <data>
  1621. <value><string>Accept-Language: ja</string></value>
  1622. <value><string>Accept-Charset: utf-8</string></value>
  1623. </data>
  1624. </array>
  1625. </value>
  1626. </member>
  1627. </struct>
  1628. ---------------------------------------------------------------
  1629. Following example adds a download with 2 options: dir and header.
  1630. header option has 2 values, so it uses a list:
  1631. -------------------------------------------------------------------------
  1632. >>> import xmlrpclib
  1633. >>> s = xmlrpclib.ServerProxy('http://localhost:6800/rpc')
  1634. >>> opts = dict(dir='/tmp',
  1635. ... header=['Accept-Language: ja',
  1636. ... 'Accept-Charset: utf-8'])
  1637. >>> s.aria2.addUri(['http://example.org/file'], opts)
  1638. '1'
  1639. --------------------------------------------------------------------------
  1640. Sample XML-RPC Client Code
  1641. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1642. The following Ruby script adds 'http://localhost/aria2.tar.bz2' to
  1643. aria2c operated on localhost with option *--dir*='/downloads' and
  1644. prints its reponse.
  1645. ----------------------------------------------
  1646. #!/usr/bin/env ruby
  1647. require 'xmlrpc/client'
  1648. require 'pp'
  1649. client=XMLRPC::Client.new2("http://localhost:6800/rpc")
  1650. options={ "dir" => "/downloads" }
  1651. result=client.call("aria2.addUri", [ "http://localhost/aria2.tar.bz2" ], options)
  1652. pp result
  1653. ----------------------------------------------
  1654. If you are a Python lover, you can use xmlrpclib(for Python3.x, use
  1655. xmlrpc.client instead) to interact with aria2.
  1656. ----------------------------------------------
  1657. import xmlrpclib
  1658. from pprint import pprint
  1659. s = xmlrpclib.ServerProxy("http://localhost:6800/rpc")
  1660. r = s.aria2.addUri(["http://localhost/aria2.tar.bz2"], {"dir":"/downloads"})
  1661. pprint(r)
  1662. ----------------------------------------------
  1663. EXAMPLE
  1664. -------
  1665. HTTP/FTP Segmented Download
  1666. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1667. Download a file
  1668. ^^^^^^^^^^^^^^^
  1669. --------------------------------
  1670. aria2c "http://host/file.zip"
  1671. --------------------------------
  1672. [NOTE]
  1673. To stop a download, press Ctrl-C. You can resume the transfer by running aria2c with the same argument in the same directory. You can change URIs as long as they are pointing to the same file.
  1674. Download a file from 2 different HTTP servers
  1675. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1676. ------------------------------------------------------
  1677. aria2c "http://host/file.zip" "http://mirror/file.zip"
  1678. ------------------------------------------------------
  1679. Download a file from 1 host using 2 connections
  1680. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1681. ------------------------------------------------------
  1682. aria2c -x2 -k1M "http://host/file.zip"
  1683. ------------------------------------------------------
  1684. Download a file from HTTP and FTP servers
  1685. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1686. -----------------------------------------------------
  1687. aria2c "http://host1/file.zip" "ftp://host2/file.zip"
  1688. -----------------------------------------------------
  1689. Download files listed in a text file concurrently
  1690. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1691. ------------------------
  1692. aria2c -ifiles.txt -j2
  1693. ------------------------
  1694. [NOTE]
  1695. -j option specifies the number of parallel downloads.
  1696. Using proxy
  1697. ^^^^^^^^^^^
  1698. For HTTP:
  1699. ----------------------------------------------------------
  1700. aria2c --http-proxy="http://proxy:8080" "http://host/file"
  1701. ----------------------------------------------------------
  1702. ----------------------------------------------------------
  1703. aria2c --http-proxy="http://proxy:8080" --no-proxy="localhost,127.0.0.1,192.168.0.0/16" "http://host/file"
  1704. ----------------------------------------------------------
  1705. For FTP:
  1706. --------------------------------------------------------
  1707. aria2c --ftp-proxy="http://proxy:8080" "ftp://host/file"
  1708. --------------------------------------------------------
  1709. [NOTE]
  1710. See *--http-proxy*, *--https-proxy*, *--ftp-proxy*, *--all-proxy* and
  1711. *--no-proxy* for details. You can specify proxy in the environment
  1712. variables. See *<<_environment, ENVIRONMENT>>* section.
  1713. Proxy with authorization
  1714. ^^^^^^^^^^^^^^^^^^^^^^^^
  1715. ----------------------------------------------------------------------------
  1716. aria2c --http-proxy="http://username:password@proxy:8080" "http://host/file"
  1717. ----------------------------------------------------------------------------
  1718. ----------------------------------------------------------------------------
  1719. aria2c --http-proxy="http://proxy:8080" --http-proxy-user="username" --http-proxy-passwd="password" "http://host/file"
  1720. ----------------------------------------------------------------------------
  1721. Metalink Download
  1722. ~~~~~~~~~~~~~~~~~
  1723. Download files with remote Metalink
  1724. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1725. --------------------------------------------------------
  1726. aria2c --follow-metalink=mem "http://host/file.metalink"
  1727. --------------------------------------------------------
  1728. Download using a local metalink file
  1729. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1730. ----------------------------------------------------------
  1731. aria2c -p --lowest-speed-limit=4000 file.metalink
  1732. ----------------------------------------------------------
  1733. [NOTE]
  1734. To stop a download, press Ctrl-C.
  1735. You can resume the transfer by running aria2c with the same argument in the same
  1736. directory.
  1737. Download several local metalink files
  1738. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1739. ----------------------------------------
  1740. aria2c -j2 file1.metalink file2.metalink
  1741. ----------------------------------------
  1742. Download only selected files using index
  1743. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1744. -------------------------------------------
  1745. aria2c --select-file=1-4,8 file.metalink
  1746. -------------------------------------------
  1747. [NOTE]
  1748. The index is printed to the console using -S option.
  1749. Download a file using a local .metalink file with user preference
  1750. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1751. ------------------------------------------------------------------------------
  1752. aria2c --metalink-location=jp,us --metalink-version=1.1 --metalink-language=en-US file.metalink
  1753. ------------------------------------------------------------------------------
  1754. BitTorrent Download
  1755. ~~~~~~~~~~~~~~~~~~~
  1756. Download files from remote BitTorrent file
  1757. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1758. ------------------------------------------------------
  1759. aria2c --follow-torrent=mem "http://host/file.torrent"
  1760. ------------------------------------------------------
  1761. Download using a local torrent file
  1762. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1763. ---------------------------------------------
  1764. aria2c --max-upload-limit=40K file.torrent
  1765. ---------------------------------------------
  1766. [NOTE]
  1767. --max-upload-limit specifies the max of upload rate.
  1768. [NOTE]
  1769. To stop a download, press Ctrl-C. You can resume the transfer by running aria2c with the same argument in the same directory.
  1770. Download using BitTorrent Magnet URI
  1771. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1772. ------------------------------------------------------------------------------
  1773. aria2c "magnet:?xt=urn:btih:248D0A1CD08284299DE78D5C1ED359BB46717D8C&dn=aria2"
  1774. ------------------------------------------------------------------------------
  1775. [NOTE]
  1776. Don't forget to quote BitTorrent Magnet URI which includes "&"
  1777. character with single(') or double(") quotation.
  1778. Download 2 torrents
  1779. ^^^^^^^^^^^^^^^^^^^
  1780. --------------------------------------
  1781. aria2c -j2 file1.torrent file2.torrent
  1782. --------------------------------------
  1783. Download a file using torrent and HTTP/FTP server
  1784. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1785. ------------------------------------------------------------
  1786. aria2c -Ttest.torrent "http://host1/file" "ftp://host2/file"
  1787. ------------------------------------------------------------
  1788. [NOTE]
  1789. Downloading multi file torrent with HTTP/FTP is not supported.
  1790. Download only selected files using index(usually called "selectable download")
  1791. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1792. ---------------------------------------
  1793. aria2c --select-file=1-4,8 file.torrent
  1794. ---------------------------------------
  1795. [NOTE]
  1796. The index is printed to the console using -S option.
  1797. Specify output filename
  1798. ^^^^^^^^^^^^^^^^^^^^^^^
  1799. To specify output filename for BitTorrent downloads, you need to know
  1800. the index of file in torrent file using *-S* option. For example, the
  1801. output looks like this:
  1802. --------------------------
  1803. idx|path/length
  1804. ===+======================
  1805. 1|dist/base-2.6.18.iso
  1806. |99.9MiB
  1807. ---+----------------------
  1808. 2|dist/driver-2.6.18.iso
  1809. |169.0MiB
  1810. ---+----------------------
  1811. --------------------------
  1812. To save 'dist/base-2.6.18.iso' in '/tmp/mydir/base.iso' and
  1813. 'dist/driver-2.6.18.iso' in '/tmp/dir/driver.iso', use the following
  1814. command:
  1815. -----------------------------------------------------------------------------------------
  1816. aria2c --dir=/tmp --index-out=1=mydir/base.iso --index-out=2=dir/driver.iso file.torrent
  1817. -----------------------------------------------------------------------------------------
  1818. Change the listening port for incoming peer
  1819. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1820. ---------------------------------------------------
  1821. aria2c --listen-port=7000-7001,8000 file.torrent
  1822. ---------------------------------------------------
  1823. [NOTE]
  1824. Since aria2 doesn't configure firewall or router for port forwarding, it's up
  1825. to you to do it manually.
  1826. Specify the condition to stop program after torrent download finished
  1827. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1828. -------------------------------------------------------
  1829. aria2c --seed-time=120 --seed-ratio=1.0 file.torrent
  1830. -------------------------------------------------------
  1831. [NOTE]
  1832. In the above example, the program exits when the 120 minutes has elapsed since download completed or seed ratio reaches 1.0.
  1833. Throttle upload speed
  1834. ^^^^^^^^^^^^^^^^^^^^^
  1835. ----------------------------------------------
  1836. aria2c --max-upload-limit=100K file.torrent
  1837. ----------------------------------------------
  1838. Enable IPv4 DHT
  1839. ^^^^^^^^^^^^^^^
  1840. ---------------------------------------------------------
  1841. aria2c --enable-dht --dht-listen-port=6881 file.torrent
  1842. ---------------------------------------------------------
  1843. [NOTE]
  1844. DHT uses udp port. Since aria2 doesn't configure firewall or router for port
  1845. forwarding, it's up to you to do it manually.
  1846. Enable IPv6 DHT
  1847. ^^^^^^^^^^^^^^^
  1848. -----------------------------------------------------------------------------------------------------------
  1849. aria2c --enable-dht6 --dht-listen-port=6881 --dht-listen-addr6=YOUR_GLOBAL_UNICAST_IPV6_ADDR --enable-async-dns6
  1850. -----------------------------------------------------------------------------------------------------------
  1851. [NOTE]
  1852. If aria2c is not built with c-ares, *--enable-async-dns6* is
  1853. unnecessary. aria2 shares same port between IPv4 and IPv6 DHT.
  1854. Add and remove tracker URI
  1855. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  1856. Removes all tracker announce URIs described in file.torrent and use
  1857. "http://tracker1/announce" and "http://tracker2/announce" instead.
  1858. ---------------------------------------------------------------------------------------------------------
  1859. aria2c --bt-exclude-tracker="*" --bt-tracker="http://tracker1/announce,http://tracker2/announce" file.torrent
  1860. ---------------------------------------------------------------------------------------------------------
  1861. More advanced HTTP features
  1862. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1863. Load cookies
  1864. ^^^^^^^^^^^^
  1865. --------------------------------------------------------
  1866. aria2c --load-cookies=cookies.txt "http://host/file.zip"
  1867. --------------------------------------------------------
  1868. [NOTE]
  1869. You can use Firefox/Mozilla/Chromium's cookie file without modification.
  1870. Resume download started by web browsers or another programs
  1871. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1872. -------------------------------------------------------
  1873. aria2c -c -s2 "http://host/partiallydownloadedfile.zip"
  1874. -------------------------------------------------------
  1875. Client certificate authorization for SSL/TLS
  1876. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1877. ------------------------------------------------------------------------------------------
  1878. aria2c --certificate=/path/to/mycert.pem --private-key=/path/to/mykey.pem https://host/file
  1879. ------------------------------------------------------------------------------------------
  1880. [NOTE]
  1881. The file specified in *--private-key* must be decrypted. The behavior when
  1882. encrypted one is given is undefined.
  1883. Verify peer in SSL/TLS using given CA certificates
  1884. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1885. ------------------------------------------------------------------------------------------
  1886. aria2c --ca-certificate=/path/to/ca-certificates.crt --check-certificate https://host/file
  1887. ------------------------------------------------------------------------------------------
  1888. And more advanced features
  1889. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1890. Throttle download speed
  1891. ^^^^^^^^^^^^^^^^^^^^^^^
  1892. -------------------------------------------------
  1893. aria2c --max-download-limit=100K file.metalink
  1894. -------------------------------------------------
  1895. Repair a damaged download
  1896. ^^^^^^^^^^^^^^^^^^^^^^^^^
  1897. -----------------------
  1898. aria2c -V file.metalink
  1899. -----------------------
  1900. [NOTE]
  1901. This option is only available used with BitTorrent or metalink with chunk
  1902. checksums.
  1903. Drop connection if download speed is lower than specified value
  1904. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1905. ------------------------------------------------
  1906. aria2c --lowest-speed-limit=10K file.metalink
  1907. ------------------------------------------------
  1908. Parameterized URI support
  1909. ^^^^^^^^^^^^^^^^^^^^^^^^^
  1910. You can specify set of parts:
  1911. -----------------------------------------------
  1912. aria2c -P "http://{host1,host2,host3}/file.iso"
  1913. -----------------------------------------------
  1914. You can specify numeric sequence:
  1915. ---------------------------------------------
  1916. aria2c -Z -P "http://host/image[000-100].png"
  1917. ---------------------------------------------
  1918. [NOTE]
  1919. -Z option is required if the all URIs don't point to the same file, such as the above example.
  1920. You can specify step counter:
  1921. -------------------------------------------
  1922. aria2c -Z -P "http://host/image[A-Z:2].png"
  1923. -------------------------------------------
  1924. Parallel downloads of arbitrary number of URI,metalink,torrent
  1925. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1926. --------------------------------------------------------------
  1927. aria2c -j3 -Z "http://host/file1" file2.torrent file3.metalink
  1928. --------------------------------------------------------------
  1929. BitTorrent Encryption
  1930. ^^^^^^^^^^^^^^^^^^^^^
  1931. Encrypt whole payload using ARC4:
  1932. -------------------------------------------------------------------------
  1933. aria2c --bt-min-crypto-level=arc4 --bt-require-crypto=true file.torrent
  1934. -------------------------------------------------------------------------
  1935. SEE ALSO
  1936. --------
  1937. Project Web Site: http://aria2.sourceforge.net/
  1938. aria2 Wiki: http://sourceforge.net/apps/trac/aria2/wiki
  1939. Metalink Homepage: http://www.metalinker.org/
  1940. The Metalink Download Description Format: http://tools.ietf.org/html/rfc5854
  1941. COPYRIGHT
  1942. ---------
  1943. Copyright (C) 2006, 2010 Tatsuhiro Tsujikawa
  1944. This program is free software; you can redistribute it and/or modify
  1945. it under the terms of the GNU General Public License as published by
  1946. the Free Software Foundation; either version 2 of the License, or
  1947. (at your option) any later version.
  1948. This program is distributed in the hope that it will be useful,
  1949. but WITHOUT ANY WARRANTY; without even the implied warranty of
  1950. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1951. GNU General Public License for more details.
  1952. You should have received a copy of the GNU General Public License
  1953. along with this program; if not, write to the Free Software
  1954. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  1955. In addition, as a special exception, the copyright holders give
  1956. permission to link the code of portions of this program with the
  1957. OpenSSL library under certain conditions as described in each
  1958. individual source file, and distribute linked combinations
  1959. including the two.
  1960. You must obey the GNU General Public License in all respects
  1961. for all of the code used other than OpenSSL. If you modify
  1962. file(s) with this exception, you may extend this exception to your
  1963. version of the file(s), but you are not obligated to do so. If you
  1964. do not wish to do so, delete this exception statement from your
  1965. version. If you delete this exception statement from all source
  1966. files in the program, then also delete it here.