aria2c.1 71 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346
  1. '\" t
  2. .\" Title: aria2c
  3. .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
  4. .\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
  5. .\" Date: 09/17/2009
  6. .\" Manual: Aria2 Manual
  7. .\" Source: Aria2
  8. .\" Language: English
  9. .\"
  10. .TH "ARIA2C" "1" "09/17/2009" "Aria2" "Aria2 Manual"
  11. .\" -----------------------------------------------------------------
  12. .\" * set default formatting
  13. .\" -----------------------------------------------------------------
  14. .\" disable hyphenation
  15. .nh
  16. .\" disable justification (adjust text to left margin only)
  17. .ad l
  18. .\" -----------------------------------------------------------------
  19. .\" * MAIN CONTENT STARTS HERE *
  20. .\" -----------------------------------------------------------------
  21. .SH "NAME"
  22. aria2c \- The ultra fast download utility
  23. .SH "SYNOPSIS"
  24. .sp
  25. aria2c [\fIOPTIONS\fR] [\fIURL\fR | \fITORRENT_FILE\fR | \fIMETALINK_FILE\fR]\&...
  26. .SH "DESCRIPTION"
  27. .sp
  28. aria2 is a utility for downloading files\&. The supported protocols are HTTP(S), FTP, BitTorrent, and Metalink\&. aria2 can download a file from multiple sources/protocols and tries to utilize your maximum download bandwidth\&. It supports downloading a file from HTTP(S)/FTP and BitTorrent at the same time, while the data downloaded from HTTP(S)/FTP is uploaded to the BitTorrent swarm\&. Using Metalink\(cqs chunk checksums, aria2 automatically validates chunks of data while downloading a file like BitTorrent\&.
  29. .SH "OPTIONS"
  30. .SS "Basic Options"
  31. .PP
  32. \fB\-d\fR, \fB\-\-dir\fR=DIR
  33. .RS 4
  34. The directory to store the downloaded file\&.
  35. .RE
  36. .PP
  37. \fB\-i\fR, \fB\-\-input\-file\fR=FILE
  38. .RS 4
  39. Downloads URIs found in FILE\&. You can specify multiple URIs for a single entity: separate URIs on a single line using the TAB character\&. Reads input from stdin when
  40. \fI\-\fR
  41. is specified\&. The additional
  42. \fBout\fR
  43. and
  44. \fBdir\fR
  45. options can be specified after each line of URIs\&. This optional line must start with white space(s)\&. See
  46. \fBInput File\fR
  47. subsection for details\&.
  48. .RE
  49. .PP
  50. \fB\-l\fR, \fB\-\-log\fR=LOG
  51. .RS 4
  52. The file name of the log file\&. If
  53. \fI\-\fR
  54. is specified, log is written to stdout\&.
  55. .RE
  56. .PP
  57. \fB\-j\fR, \fB\-\-max\-concurrent\-downloads\fR=N
  58. .RS 4
  59. Set maximum number of parallel downloads for every static (HTTP/FTP) URL, torrent and metalink\&. See also
  60. \fB\-s\fR
  61. and
  62. \fB\-C\fR
  63. option\&. Default:
  64. \fI5\fR
  65. .RE
  66. .PP
  67. \fB\-V\fR, \fB\-\-check\-integrity\fR[=\fItrue\fR|\fIfalse\fR]
  68. .RS 4
  69. Check file integrity by validating piece hashes\&. This option has effect only in BitTorrent and Metalink downloads with chunk checksums\&. Use this option to re\-download a damaged portion of a file\&. Default:
  70. \fIfalse\fR
  71. .RE
  72. .PP
  73. \fB\-c\fR, \fB\-\-continue\fR
  74. .RS 4
  75. Continue downloading a partially downloaded file\&. Use this option to resume a download started by a web browser or another program which downloads files sequentially from the beginning\&. Currently this option is only applicable to HTTP(S)/FTP downloads\&.
  76. .RE
  77. .PP
  78. \fB\-h\fR, \fB\-\-help\fR[=CATEGORY|KEYWORD]
  79. .RS 4
  80. Print usage and exit\&. The help messages are classified in several categories\&. A category starts with
  81. \fI#\fR\&. For example, type "\-\-help=#http" to get the usage for the options related to http\&. If non\-category keyword is given, print the usage of the options whose name includes given keyword\&. Available Values:
  82. \fI#basic\fR,
  83. \fI#advanced\fR,
  84. \fI#http\fR,
  85. \fI#https\fR,
  86. \fI#ftp\fR,
  87. \fI#metalink\fR,
  88. \fI#bittorrent\fR,
  89. \fI#cookie\fR,
  90. \fI#hook\fR,
  91. \fI#file\fR,
  92. \fI#xml\-rpc\fR,
  93. \fI#experimental\fR,
  94. \fI#all\fR
  95. Default:
  96. \fI#basic\fR
  97. .RE
  98. .SS "HTTP/FTP Options"
  99. .PP
  100. \fB\-\-all\-proxy\fR=PROXY
  101. .RS 4
  102. Use this proxy server for all protocols\&. You can override this setting and specify a proxy server for a particular protocol using
  103. \fB\-\-http\-proxy\fR,
  104. \fB\-\-https\-proxy\fR
  105. and
  106. \fB\-\-ftp\-proxy\fR
  107. options\&. This affects all URLs\&. The format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]
  108. .RE
  109. .PP
  110. \fB\-\-connect\-timeout\fR=SEC
  111. .RS 4
  112. Set the connect timeout in seconds to establish connection to HTTP/FTP/proxy server\&. After the connection is established, this option makes no effect and
  113. \fB\-\-timeout\fR
  114. option is used instead\&. Default:
  115. \fI60\fR
  116. .RE
  117. .PP
  118. \fB\-\-dry\-run\fR[=\fItrue\fR|\fIfalse\fR]
  119. .RS 4
  120. If
  121. \fItrue\fR
  122. is given, aria2 just checks whether the remote file is available and doesn\(cqt download data\&. This option has effect on HTTP/FTP download\&. BitTorrent downloads are canceled if
  123. \fItrue\fR
  124. is specified\&. Default:
  125. \fIfalse\fR
  126. .RE
  127. .PP
  128. \fB\-\-lowest\-speed\-limit\fR=SPEED
  129. .RS 4
  130. Close connection if download speed is lower than or equal to this value(bytes per sec)\&.
  131. \fI0\fR
  132. means aria2 does not have a lowest speed limit\&. You can append
  133. \fIK\fR
  134. or
  135. \fIM\fR(1K = 1024, 1M = 1024K)\&. This option does not affect BitTorrent downloads\&. Default:
  136. \fI0\fR
  137. .RE
  138. .PP
  139. \fB\-\-max\-file\-not\-found\fR=NUM
  140. .RS 4
  141. If aria2 receives \(oqfile not found\(cq status from the remote HTTP/FTP servers NUM times without getting a single byte, then force the download to fail\&. Specify
  142. \fI0\fR
  143. to disable this option\&. This options is effective only when using HTTP/FTP servers\&. Default:
  144. \fI0\fR
  145. .RE
  146. .PP
  147. \fB\-m\fR, \fB\-\-max\-tries\fR=N
  148. .RS 4
  149. Set number of tries\&.
  150. \fI0\fR
  151. means unlimited\&. Default:
  152. \fI5\fR
  153. .RE
  154. .PP
  155. \fB\-n\fR, \fB\-\-no\-netrc\fR
  156. .RS 4
  157. Disables netrc support\&. netrc support is enabled by default\&.
  158. .RE
  159. .PP
  160. \fB\-\-no\-proxy\fR=DOMAINS
  161. .RS 4
  162. Specify comma separated hostnames or domains where proxy should not be used\&.
  163. .RE
  164. .PP
  165. \fB\-o\fR, \fB\-\-out\fR=FILE
  166. .RS 4
  167. The file name of the downloaded file\&.
  168. .RE
  169. .if n \{\
  170. .sp
  171. .\}
  172. .RS 4
  173. .it 1 an-trap
  174. .nr an-no-space-flag 1
  175. .nr an-break-flag 1
  176. .br
  177. .ps +1
  178. \fBNote\fR
  179. .ps -1
  180. .br
  181. .sp
  182. In Metalink or BitTorrent download you cannot specify file name\&. The file name specified here is only used when the URLs fed to aria2 are done by command line without \fB\-i\fR, \fB\-Z\fR option\&. For example: aria2c \-o myfile\&.zip "http://mirror1/file\&.zip" "http://mirror2/file\&.zip"
  183. .sp .5v
  184. .RE
  185. .PP
  186. \fB\-\-proxy\-method\fR=METHOD
  187. .RS 4
  188. Set the method to use in proxy request\&.
  189. \fIMETHOD\fR
  190. is either
  191. \fIget\fR
  192. or
  193. \fItunnel\fR\&. HTTPS downloads always use
  194. \fItunnel\fR
  195. regardless of this option\&. Default:
  196. \fIget\fR
  197. .RE
  198. .PP
  199. \fB\-R\fR, \fB\-\-remote\-time\fR[=\fItrue\fR|\fIfalse\fR]
  200. .RS 4
  201. Retrieve timestamp of the remote file from the remote HTTP/FTP server and if it is available, apply it to the local file\&. Default:
  202. \fIfalse\fR
  203. .RE
  204. .PP
  205. \fB\-\-retry\-wait\fR=SEC
  206. .RS 4
  207. Set the seconds to wait to retry after an error has occured\&. Specify a value between
  208. \fI0\fR
  209. and
  210. \fI60\fR\&. Default:
  211. \fI5\fR
  212. .RE
  213. .PP
  214. \fB\-\-server\-stat\-of\fR=FILE
  215. .RS 4
  216. Specify the filename to which performance profile of the servers is saved\&. You can load saved data using
  217. \fB\-\-server\-stat\-if\fR
  218. option\&. See
  219. \fBServer Performance Profile\fR
  220. subsection below for file format\&.
  221. .RE
  222. .PP
  223. \fB\-\-server\-stat\-if\fR=FILE
  224. .RS 4
  225. Specify the filename to load performance profile of the servers\&. The loaded data will be used in some URI selector such as
  226. \fIfeedback\fR\&. See also
  227. \fB\-\-uri\-selector\fR
  228. option\&. See
  229. \fBServer Performance Profile\fR
  230. subsection below for file format\&.
  231. .RE
  232. .PP
  233. \fB\-\-server\-stat\-timeout\fR=SEC
  234. .RS 4
  235. Specifies timeout in seconds to invalidate performance profile of the servers since the last contact to them\&. Default:
  236. \fI86400\fR
  237. (24hours)
  238. .RE
  239. .PP
  240. \fB\-s\fR, \fB\-\-split\fR=N
  241. .RS 4
  242. Download a file using N connections\&. If more than N URLs are given, first N URLs are used and remaining URLs are used for backup\&. If less than N URLs are given, those URLs are used more than once so that N connections total are made simultaneously\&. Please see
  243. \fB\-j\fR
  244. option too\&. Please note that in Metalink download, this option has no effect and use
  245. \fB\-C\fR
  246. option instead\&. Default:
  247. \fI5\fR
  248. .RE
  249. .PP
  250. \fB\-t\fR, \fB\-\-timeout\fR=SEC
  251. .RS 4
  252. Set timeout in seconds\&. Default:
  253. \fI60\fR
  254. .RE
  255. .PP
  256. \fB\-\-uri\-selector\fR=SELECTOR
  257. .RS 4
  258. Specify URI selection algorithm\&. The possible values are
  259. \fIinorder\fR,
  260. \fIfeedback\fR
  261. and
  262. \fIadaptive\fR\&. If
  263. \fIinorder\fR
  264. is given, URI is tried in the order appeared in the URI list\&. If
  265. \fIfeedback\fR
  266. is given, aria2 uses download speed observed in the previous downloads and choose fastest server in the URI list\&. This also effectively skips dead mirrors\&. The observed download speed is a part of performance profile of servers mentioned in
  267. \fB\-\-server\-stat\-of\fR
  268. and
  269. \fB\-\-server\-stat\-if\fR
  270. options\&. If
  271. \fIadaptive\fR
  272. is given, selects one of the best mirrors for the first and reserved connections\&. For supplementary ones, it returns mirrors which has not been tested yet, and if each of them has already been tested, returns mirrors which has to be tested again\&. Otherwise, it doesn\(cqt select anymore mirrors\&. Like
  273. \fIfeedback\fR, it uses a performance profile of servers\&. Default:
  274. \fIfeedback\fR
  275. .RE
  276. .SS "HTTP Specific Options"
  277. .PP
  278. \fB\-\-ca\-certificate\fR=FILE
  279. .RS 4
  280. Use the certificate authorities in FILE to verify the peers\&. The certificate file must be in PEM format and can contain multiple CA certificates\&. Use
  281. \fB\-\-check\-certificate\fR
  282. option to enable verification\&.
  283. .RE
  284. .PP
  285. \fB\-\-certificate\fR=FILE
  286. .RS 4
  287. Use the client certificate in FILE\&. The certificate must be in PEM format\&. You may use
  288. \fB\-\-private\-key\fR
  289. option to specify the private key\&.
  290. .RE
  291. .PP
  292. \fB\-\-check\-certificate\fR[=\fItrue\fR|\fIfalse\fR]
  293. .RS 4
  294. Verify the peer using certificates specified in
  295. \fB\-\-ca\-certificate\fR
  296. option\&. Default:
  297. \fItrue\fR
  298. .RE
  299. .PP
  300. \fB\-\-http\-auth\-challenge\fR[=\fItrue\fR|\fIfalse\fR]
  301. .RS 4
  302. Send HTTP authorization header only when it is requested by the server\&. If
  303. \fIfalse\fR
  304. is set, then authorization header is always sent to the server\&. There is an exception: if username and password are embedded in URI, authorization header is always sent to the server regardless of this option\&. Default:
  305. \fIfalse\fR
  306. .RE
  307. .PP
  308. \fB\-\-http\-auth\-scheme\fR=SCHEME
  309. .RS 4
  310. Set HTTP authentication scheme\&. Currently,
  311. \fIbasic\fR
  312. is the only supported scheme\&. Default:
  313. \fIbasic\fR
  314. .RE
  315. .PP
  316. \fB\-\-http\-user\fR=USER
  317. .RS 4
  318. Set HTTP user\&. This affects all URLs\&.
  319. .RE
  320. .PP
  321. \fB\-\-http\-passwd\fR=PASSWD
  322. .RS 4
  323. Set HTTP password\&. This affects all URLs\&.
  324. .RE
  325. .PP
  326. \fB\-\-http\-proxy\fR=PROXY
  327. .RS 4
  328. Use this proxy server for HTTP\&. See also
  329. \fB\-\-all\-proxy\fR
  330. option\&. This affects all URLs\&. The format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]
  331. .RE
  332. .PP
  333. \fB\-\-https\-proxy\fR=PROXY
  334. .RS 4
  335. Use this proxy server for HTTPS\&. See also
  336. \fB\-\-all\-proxy\fR
  337. option\&. This affects all URLs\&. The format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]
  338. .RE
  339. .PP
  340. \fB\-\-private\-key\fR=FILE
  341. .RS 4
  342. Use the private key in FILE\&. The private key must be decrypted and in PEM format\&. The behavior when encrypted one is given is undefined\&. See also
  343. \fB\-\-certificate\fR
  344. option\&.
  345. .RE
  346. .PP
  347. \fB\-\-referer\fR=REFERER
  348. .RS 4
  349. Set Referer\&. This affects all URLs\&.
  350. .RE
  351. .PP
  352. \fB\-\-enable\-http\-keep\-alive\fR[=\fItrue\fR|\fIfalse\fR]
  353. .RS 4
  354. Enable HTTP/1\&.1 persistent connection\&. Default:
  355. \fItrue\fR
  356. .RE
  357. .PP
  358. \fB\-\-enable\-http\-pipelining\fR[=\fItrue\fR|\fIfalse\fR]
  359. .RS 4
  360. Enable HTTP/1\&.1 pipelining\&. Default:
  361. \fIfalse\fR
  362. .RE
  363. .PP
  364. \fB\-\-header\fR=HEADER
  365. .RS 4
  366. Append HEADER to HTTP request header\&. You can use this option repeatedly to specify more than one header: aria2c
  367. \fB\-\-header\fR="X\-A: b78"
  368. \fB\-\-header\fR="X\-B: 9J1" "http://host/file"
  369. .RE
  370. .PP
  371. \fB\-\-load\-cookies\fR=FILE
  372. .RS 4
  373. Load Cookies from FILE using the Firefox3 format (SQLite3) and the Mozilla/Firefox(1\&.x/2\&.x)/Netscape format\&.
  374. .RE
  375. .if n \{\
  376. .sp
  377. .\}
  378. .RS 4
  379. .it 1 an-trap
  380. .nr an-no-space-flag 1
  381. .nr an-break-flag 1
  382. .br
  383. .ps +1
  384. \fBNote\fR
  385. .ps -1
  386. .br
  387. .sp
  388. If aria2 is built without libsqlite3, then it doesn\(cqt support Firefox3 cookie format\&.
  389. .sp .5v
  390. .RE
  391. .PP
  392. \fB\-\-save\-cookies\fR=FILE
  393. .RS 4
  394. Save Cookies to FILE in Mozilla/Firefox(1\&.x/2\&.x)/ Netscape format\&. If FILE already exists, it is overwritten\&. Session Cookies are also saved and their expiry values are treated as 0\&. Possible Values:
  395. \fI/path/to/file\fR
  396. .RE
  397. .PP
  398. \fB\-\-use\-head\fR[=\fItrue\fR|\fIfalse\fR]
  399. .RS 4
  400. Use HEAD method for the first request to the HTTP server\&. Default:
  401. \fIfalse\fR
  402. .RE
  403. .PP
  404. \fB\-U\fR, \fB\-\-user\-agent\fR=USER_AGENT
  405. .RS 4
  406. Set user agent for HTTP(S) downloads\&.
  407. .RE
  408. .SS "FTP Specific Options"
  409. .PP
  410. \fB\-\-ftp\-user\fR=USER
  411. .RS 4
  412. Set FTP user\&. This affects all URLs\&. Default:
  413. \fIanonymous\fR
  414. .RE
  415. .PP
  416. \fB\-\-ftp\-passwd\fR=PASSWD
  417. .RS 4
  418. Set FTP password\&. This affects all URLs\&. Default:
  419. \fIARIA2USER@\fR
  420. .RE
  421. .PP
  422. \fB\-p\fR, \fB\-\-ftp\-pasv\fR[=\fItrue\fR|\fIfalse\fR]
  423. .RS 4
  424. Use the passive mode in FTP\&. If
  425. \fIfalse\fR
  426. is given, the active mode will be used\&. Default:
  427. \fItrue\fR
  428. .RE
  429. .PP
  430. \fB\-\-ftp\-proxy\fR=PROXY
  431. .RS 4
  432. Use this proxy server for FTP\&. See also
  433. \fB\-\-all\-proxy\fR
  434. option\&. This affects all URLs\&. The format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]
  435. .RE
  436. .PP
  437. \fB\-\-ftp\-type\fR=TYPE
  438. .RS 4
  439. Set FTP transfer type\&. TYPE is either
  440. \fIbinary\fR
  441. or
  442. \fIascii\fR\&. Default:
  443. \fIbinary\fR
  444. .RE
  445. .PP
  446. \fB\-\-ftp\-reuse\-connection\fR[=\fItrue\fR|\fIfalse\fR]
  447. .RS 4
  448. Reuse connection in FTP\&. Default:
  449. \fItrue\fR
  450. .RE
  451. .SS "BitTorrent/Metalink Options"
  452. .PP
  453. \fB\-\-select\-file\fR=INDEX\&...
  454. .RS 4
  455. Set file to download by specifying its index\&. You can find the file index using the
  456. \fB\-\-show\-files\fR
  457. option\&. Multiple indexes can be specified by using ",", for example:
  458. \fI3,6\fR\&. You can also use "\-" to specify a range:
  459. \fI1\-5\fR\&. "," and "\-" can be used together:
  460. \fI1\-5,8,9\fR\&. When used with the \-M option, index may vary depending on the query (see
  461. \fB\-\-metalink\-\fR* options)\&.
  462. .RE
  463. .if n \{\
  464. .sp
  465. .\}
  466. .RS 4
  467. .it 1 an-trap
  468. .nr an-no-space-flag 1
  469. .nr an-break-flag 1
  470. .br
  471. .ps +1
  472. \fBNote\fR
  473. .ps -1
  474. .br
  475. .sp
  476. In multi file torrent, the adjacent files specified by this option may also be downloaded\&. This is by design, not a bug\&. A single piece may include several files or part of files, and aria2 writes the piece to the appropriate files\&.
  477. .sp .5v
  478. .RE
  479. .PP
  480. \fB\-S\fR, \fB\-\-show\-files\fR
  481. .RS 4
  482. Print file listing of \&.torrent or \&.metalink file and exit\&. In case of \&.torrent file, additional information (infohash, piece length, etc) is also printed\&.
  483. .RE
  484. .SS "BitTorrent Specific Options"
  485. .PP
  486. \fB\-\-bt\-external\-ip\fR=IPADDRESS
  487. .RS 4
  488. Specify the external IP address to report to a BitTorrent tracker\&. Although this function is named "external", it can accept any kind of IP addresses\&. IPADDRESS must be a numeric IP address\&.
  489. .RE
  490. .PP
  491. \fB\-\-bt\-hash\-check\-seed\fR[=\fItrue\fR|\fIfalse\fR]
  492. .RS 4
  493. If
  494. \fItrue\fR
  495. is given, after hash check using
  496. \fB\-\-check\-integrity\fR
  497. option and file is complete, continue to seed file\&. If you want to check file and download it only when it is damaged or incomplete, set this option to
  498. \fIfalse\fR\&. This option has effect only on BitTorrent download\&. Default:
  499. \fItrue\fR
  500. .RE
  501. .PP
  502. \fB\-\-bt\-max\-open\-files\fR=NUM
  503. .RS 4
  504. Specify maximum number of files to open in each BitTorrent download\&. Default:
  505. \fI100\fR
  506. .RE
  507. .PP
  508. \fB\-\-bt\-max\-peers\fR=NUM
  509. .RS 4
  510. Specify the maximum number of peers per torrent\&.
  511. \fI0\fR
  512. means unlimited\&. See also
  513. \fB\-\-bt\-request\-peer\-speed\-limit\fR
  514. option\&. Default:
  515. \fI55\fR
  516. .RE
  517. .PP
  518. \fB\-\-bt\-min\-crypto\-level\fR=\fIplain\fR|\fIarc4\fR
  519. .RS 4
  520. Set minimum level of encryption method\&. If several encryption methods are provided by a peer, aria2 chooses the lowest one which satisfies the given level\&. Default:
  521. \fIplain\fR
  522. .RE
  523. .PP
  524. \fB\-\-bt\-require\-crypto\fR=\fItrue\fR|\fIfalse\fR
  525. .RS 4
  526. If true is given, aria2 doesn\(cqt accept and establish connection with legacy BitTorrent handshake(\e19BitTorrent protocol)\&. Thus aria2 always uses Obfuscation handshake\&. Default:
  527. \fIfalse\fR
  528. .RE
  529. .PP
  530. \fB\-\-bt\-request\-peer\-speed\-limit\fR=SPEED
  531. .RS 4
  532. If the whole download speed of every torrent is lower than SPEED, aria2 temporarily increases the number of peers to try for more download speed\&. Configuring this option with your preferred download speed can increase your download speed in some cases\&. You can append
  533. \fIK\fR
  534. or
  535. \fIM\fR(1K = 1024, 1M = 1024K)\&. Default:
  536. \fI50K\fR
  537. .RE
  538. .PP
  539. \fB\-\-bt\-seed\-unverified\fR[=\fItrue\fR|\fIfalse\fR]
  540. .RS 4
  541. Seed previously downloaded files without verifying piece hashes\&. Default:
  542. \fIfalse\fR
  543. .RE
  544. .PP
  545. \fB\-\-bt\-stop\-timeout\fR=SEC
  546. .RS 4
  547. Stop BitTorrent download if download speed is 0 in consecutive SEC seconds\&. If
  548. \fI0\fR
  549. is given, this feature is disabled\&. Default:
  550. \fI0\fR
  551. .RE
  552. .PP
  553. \fB\-\-bt\-tracker\-interval\fR=SEC
  554. .RS 4
  555. Set the interval in seconds between tracker requests\&. This completely overrides interval value and aria2 just uses this value and ignores the min interval and interval value in the response of tracker\&. If
  556. \fI0\fR
  557. is set, aria2 determines interval based on the response of tracker and the download progress\&. Default:
  558. \fI0\fR
  559. .RE
  560. .PP
  561. \fB\-\-dht\-entry\-point\fR=HOST:PORT
  562. .RS 4
  563. Set host and port as an entry point to DHT network\&.
  564. .RE
  565. .PP
  566. \fB\-\-dht\-file\-path\fR=PATH
  567. .RS 4
  568. Change the DHT routing table file to PATH\&. Default:
  569. \fI$HOME/\&.aria2/dht\&.dat\fR
  570. .RE
  571. .PP
  572. \fB\-\-dht\-listen\-port\fR=PORT\&...
  573. .RS 4
  574. Set UDP listening port for DHT\&. Multiple ports can be specified by using ",", for example:
  575. \fI6881,6885\fR\&. You can also use "\-" to specify a range:
  576. \fI6881\-6999\fR\&. "," and "\-" can be used together\&. Default:
  577. \fI6881\-6999\fR
  578. .RE
  579. .if n \{\
  580. .sp
  581. .\}
  582. .RS 4
  583. .it 1 an-trap
  584. .nr an-no-space-flag 1
  585. .nr an-break-flag 1
  586. .br
  587. .ps +1
  588. \fBNote\fR
  589. .ps -1
  590. .br
  591. .sp
  592. Make sure that the specified ports are open for incoming UDP traffic\&.
  593. .sp .5v
  594. .RE
  595. .PP
  596. \fB\-\-enable\-dht\fR[=\fItrue\fR|\fIfalse\fR]
  597. .RS 4
  598. Enable DHT functionality\&. If a private flag is set in a torrent, aria2 doesn\(cqt use DHT for that download even if
  599. \fItrue\fR
  600. is given\&. Default:
  601. \fIfalse\fR
  602. .RE
  603. .PP
  604. \fB\-\-enable\-peer\-exchange\fR[=\fItrue\fR|\fIfalse\fR]
  605. .RS 4
  606. Enable Peer Exchange extension\&. If a private flag is set in a torrent, this feature is disabled for that download even if
  607. \fItrue\fR
  608. is given\&. Default:
  609. \fItrue\fR
  610. .RE
  611. .PP
  612. \fB\-\-follow\-torrent\fR=\fItrue\fR|\fIfalse\fR|\fImem\fR
  613. .RS 4
  614. If
  615. \fItrue\fR
  616. or
  617. \fImem\fR
  618. is specified, when a file whose suffix is "\&.torrent" or content type is "application/x\-bittorrent" is downloaded, aria2 parses it as a torrent file and downloads files mentioned in it\&. If
  619. \fImem\fR
  620. is specified, a torrent file is not written to the disk, but is just kept in memory\&. If
  621. \fIfalse\fR
  622. is specified, the action mentioned above is not taken\&. Default:
  623. \fItrue\fR
  624. .RE
  625. .PP
  626. \fB\-O\fR, \fB\-\-index\-out\fR=INDEX=PATH
  627. .RS 4
  628. Set file path for file with index=INDEX\&. You can find the file index using the
  629. \fB\-\-show\-files\fR
  630. option\&. PATH is a relative path to the path specified in
  631. \fB\-\-dir\fR
  632. option\&. You can use this option multiple times\&. Using this option, you can specify the output filenames of BitTorrent downloads\&.
  633. .RE
  634. .PP
  635. \fB\-\-listen\-port\fR=PORT\&...
  636. .RS 4
  637. Set TCP port number for BitTorrent downloads\&. Multiple ports can be specified by using ",", for example:
  638. \fI6881,6885\fR\&. You can also use "\-" to specify a range:
  639. \fI6881\-6999\fR\&. "," and "\-" can be used together:
  640. \fI6881\-6889,6999\fR\&. Default:
  641. \fI6881\-6999\fR
  642. .RE
  643. .if n \{\
  644. .sp
  645. .\}
  646. .RS 4
  647. .it 1 an-trap
  648. .nr an-no-space-flag 1
  649. .nr an-break-flag 1
  650. .br
  651. .ps +1
  652. \fBNote\fR
  653. .ps -1
  654. .br
  655. .sp
  656. Make sure that the specified ports are open for incoming TCP traffic\&.
  657. .sp .5v
  658. .RE
  659. .PP
  660. \fB\-\-max\-overall\-upload\-limit\fR=SPEED
  661. .RS 4
  662. Set max overall upload speed in bytes/sec\&.
  663. \fI0\fR
  664. means unrestricted\&. You can append
  665. \fIK\fR
  666. or
  667. \fIM\fR(1K = 1024, 1M = 1024K)\&. To limit the upload speed per torrent, use
  668. \fB\-\-max\-upload\-limit\fR
  669. option\&. Default:
  670. \fI0\fR
  671. .RE
  672. .PP
  673. \fB\-u\fR, \fB\-\-max\-upload\-limit\fR=SPEED
  674. .RS 4
  675. Set max upload speed per each torrent in bytes/sec\&.
  676. \fI0\fR
  677. means unrestricted\&. You can append
  678. \fIK\fR
  679. or
  680. \fIM\fR(1K = 1024, 1M = 1024K)\&. To limit the overall upload speed, use
  681. \fB\-\-max\-overall\-upload\-limit\fR
  682. option\&. Default:
  683. \fI0\fR
  684. .RE
  685. .PP
  686. \fB\-\-peer\-id\-prefix\fR=PEER_ID_PREFIX
  687. .RS 4
  688. Specify the prefix of peer ID\&. The peer ID in BitTorrent is 20 byte length\&. If more than 20 bytes are specified, only first 20 bytes are used\&. If less than 20 bytes are specified, the random alphabet characters are added to make it\(cqs length 20 bytes\&. Default:
  689. \fI\-aria2\-\fR
  690. .RE
  691. .PP
  692. \fB\-\-seed\-ratio\fR=RATIO
  693. .RS 4
  694. Specify share ratio\&. Seed completed torrents until share ratio reaches RATIO\&. You are strongly encouraged to specify equals or more than
  695. \fI1\&.0\fR
  696. here\&. Specify
  697. \fI0\&.0\fR
  698. if you intend to do seeding regardless of share ratio\&. If
  699. \fB\-\-seed\-time\fR
  700. option is specified along with this option, seeding ends when at least one of the conditions is satisfied\&. Default:
  701. \fI1\&.0\fR
  702. .RE
  703. .PP
  704. \fB\-\-seed\-time\fR=MINUTES
  705. .RS 4
  706. Specify seeding time in minutes\&. Also see the
  707. \fB\-\-seed\-ratio\fR
  708. option\&.
  709. .RE
  710. .PP
  711. \fB\-T\fR, \fB\-\-torrent\-file\fR=TORRENT_FILE
  712. .RS 4
  713. The path to the \&.torrent file\&. You are not required to use this option because you can specify a torrent file without \-T\&.
  714. .RE
  715. .SS "Metalink Specific Options"
  716. .PP
  717. \fB\-\-follow\-metalink\fR=\fItrue\fR|\fIfalse\fR|\fImem\fR
  718. .RS 4
  719. If
  720. \fItrue\fR
  721. or
  722. \fImem\fR
  723. is specified, when a file whose suffix is "\&.metaink" or content type of "application/metalink+xml" is downloaded, aria2 parses it as a metalink file and downloads files mentioned in it\&. If
  724. \fImem\fR
  725. is specified, a metalink file is not written to the disk, but is just kept in memory\&. If
  726. \fIfalse\fR
  727. is specified, the action mentioned above is not taken\&. Default:
  728. \fItrue\fR
  729. .RE
  730. .PP
  731. \fB\-M\fR, \fB\-\-metalink\-file\fR=METALINK_FILE
  732. .RS 4
  733. The file path to \&.metalink file\&. You are not required to use this option because you can specify a metalink file without \-M\&.
  734. .RE
  735. .PP
  736. \fB\-C\fR, \fB\-\-metalink\-servers\fR=NUM_SERVERS
  737. .RS 4
  738. The number of servers to connect to simultaneously\&. Some Metalinks regulate the number of servers to connect\&. aria2 strictly respects them\&. This means that if Metalink defines the maxconnections attribute lower than NUM_SERVERS, then aria2 uses the value of maxconnections attribute instead of NUM_SERVERS\&. See also
  739. \fB\-s\fR
  740. and
  741. \fB\-j\fR
  742. options\&. Default:
  743. \fI5\fR
  744. .RE
  745. .PP
  746. \fB\-\-metalink\-language\fR=LANGUAGE
  747. .RS 4
  748. The language of the file to download\&.
  749. .RE
  750. .PP
  751. \fB\-\-metalink\-location\fR=LOCATION[,\&...]
  752. .RS 4
  753. The location of the preferred server\&. A comma\-delimited list of locations is acceptable, for example,
  754. \fIJP,US\fR\&.
  755. .RE
  756. .PP
  757. \fB\-\-metalink\-os\fR=OS
  758. .RS 4
  759. The operating system of the file to download\&.
  760. .RE
  761. .PP
  762. \fB\-\-metalink\-version\fR=VERSION
  763. .RS 4
  764. The version of the file to download\&.
  765. .RE
  766. .PP
  767. \fB\-\-metalink\-preferred\-protocol\fR=PROTO
  768. .RS 4
  769. Specify preferred protocol\&. The possible values are
  770. \fIhttp\fR,
  771. \fIhttps\fR,
  772. \fIftp\fR
  773. and
  774. \fInone\fR\&. Specify
  775. \fInone\fR
  776. to disable this feature\&. Default:
  777. \fInone\fR
  778. .RE
  779. .PP
  780. \fB\-\-metalink\-enable\-unique\-protocol\fR=\fItrue\fR|\fIfalse\fR
  781. .RS 4
  782. If
  783. \fItrue\fR
  784. is given and several protocols are available for a mirror in a metalink file, aria2 uses one of them\&. Use
  785. \fB\-\-metalink\-preferred\-protocol\fR
  786. option to specify the preference of protocol\&. Default:
  787. \fItrue\fR
  788. .RE
  789. .SS "XML\-RPC Options"
  790. .PP
  791. \fB\-\-enable\-xml\-rpc\fR[=\fItrue\fR|\fIfalse\fR]
  792. .RS 4
  793. Enable XML\-RPC server\&. It is strongly recommended to set username and password using
  794. \fB\-\-xml\-rpc\-user\fR
  795. and
  796. \fB\-\-xml\-rpc\-passwd\fR
  797. option\&. See also
  798. \fB\-\-xml\-rpc\-listen\-port\fR
  799. option\&. Default:
  800. \fIfalse\fR
  801. .RE
  802. .PP
  803. \fB\-\-xml\-rpc\-listen\-all\fR[=\fItrue\fR|\fIfalse\fR]
  804. .RS 4
  805. Listen incoming XML\-RPC requests on all network interfaces\&. If false is given, listen only on local loopback interface\&. Default:
  806. \fIfalse\fR
  807. .RE
  808. .PP
  809. \fB\-\-xml\-rpc\-listen\-port\fR=PORT
  810. .RS 4
  811. Specify a port number for XML\-RPC server to listen to\&. Possible Values:
  812. \fI1024\fR\-\fI65535\fR
  813. Default:
  814. \fI6800\fR
  815. .RE
  816. .PP
  817. \fB\-\-xml\-rpc\-max\-request\-size\fR=SIZE
  818. .RS 4
  819. Set max size of XML\-RPC request\&. If aria2 detects the request is more than SIZE bytes, it drops connection\&. Default:
  820. \fI2M\fR
  821. .RE
  822. .PP
  823. \fB\-\-xml\-rpc\-passwd\fR=PASSWD
  824. .RS 4
  825. Set XML\-RPC password\&.
  826. .RE
  827. .PP
  828. \fB\-\-xml\-rpc\-user\fR=USER
  829. .RS 4
  830. Set XML\-RPC user\&.
  831. .RE
  832. .SS "Advanced Options"
  833. .PP
  834. \fB\-\-allow\-overwrite\fR=\fItrue\fR|\fIfalse\fR
  835. .RS 4
  836. If
  837. \fIfalse\fR
  838. is given, and a file already exists but the corresponding control file (filename\&.aria2) doesn\(cqt exist, then aria2 will not re\-download the file\&. See also
  839. \fB\-\-auto\-file\-renaming\fR
  840. option\&. Default:
  841. \fIfalse\fR
  842. .RE
  843. .PP
  844. \fB\-\-allow\-piece\-length\-change\fR=\fItrue\fR|\fIfalse\fR
  845. .RS 4
  846. If false is given, aria2 aborts download when a piece length is different from one in a control file\&. If true is given, you can proceed but some download progress will be lost\&. Default:
  847. \fIfalse\fR
  848. .RE
  849. .PP
  850. \fB\-\-async\-dns\fR[=\fItrue\fR|\fIfalse\fR]
  851. .RS 4
  852. Enable asynchronous DNS\&. Default:
  853. \fItrue\fR
  854. .RE
  855. .PP
  856. \fB\-\-auto\-file\-renaming\fR[=\fItrue\fR|\fIfalse\fR]
  857. .RS 4
  858. Rename file name if the same file already exists\&. This option works only in HTTP(S)/FTP download\&. The new file name has a dot and a number(1\&.\&.9999) appended\&. Default:
  859. \fItrue\fR
  860. .RE
  861. .PP
  862. \fB\-\-auto\-save\-interval\fR=SEC
  863. .RS 4
  864. Save a control file(*\&.aria2) every SEC seconds\&. If
  865. \fI0\fR
  866. is given, a control file is not saved during download\&. aria2 saves a control file when it stops regardless of the value\&. The possible values are between
  867. \fI0\fR
  868. to
  869. \fI600\fR\&. Default:
  870. \fI60\fR
  871. .RE
  872. .PP
  873. \fB\-\-conf\-path\fR=PATH
  874. .RS 4
  875. Change the configuration file path to PATH\&. Default:
  876. \fI$HOME/\&.aria2/aria2\&.conf\fR
  877. .RE
  878. .PP
  879. \fB\-D\fR, \fB\-\-daemon\fR
  880. .RS 4
  881. Run as daemon\&.
  882. .RE
  883. .PP
  884. \fB\-\-enable\-direct\-io\fR[=\fItrue\fR|\fIfalse\fR]
  885. .RS 4
  886. Enable directI/O, which lowers cpu usage while allocating/checking files\&. Turn off if you encounter any error\&. Default:
  887. \fItrue\fR
  888. .RE
  889. .PP
  890. \fB\-\-event\-poll\fR=POLL
  891. .RS 4
  892. Specify the method for polling events\&. The possible Values are
  893. \fIepoll\fR
  894. and
  895. \fIselect\fR\&. If you use recent Linux that has epoll, then the default value is
  896. \fIepoll\fR\&. Otherwise, the default value is
  897. \fIselect\fR\&.
  898. .RE
  899. .PP
  900. \fB\-\-file\-allocation\fR=METHOD
  901. .RS 4
  902. Specify file allocation method\&.
  903. \fInone\fR
  904. doesn\(cqt pre\-allocate file space\&.
  905. \fIprealloc\fR
  906. pre\-allocates file space before download begins\&. This may take some time depending on the size of the file\&. If you are using newer file systems such as ext4 (with extents support), btrfs or xfs,
  907. \fIfalloc\fR
  908. is your best choice\&. It allocates large(few GiB) files almost instantly\&. Don\(cqt use
  909. \fIfalloc\fR
  910. with legacy file systems such as ext3 because it takes almost same time as
  911. \fIprealloc\fR
  912. and it blocks aria2 entirely until allocation finishes\&.
  913. \fIfalloc\fR
  914. may not be available if your system doesn\(cqt have
  915. \fBposix_fallocate\fR() function\&. Possible Values:
  916. \fInone\fR,
  917. \fIprealloc\fR,
  918. \fIfalloc\fR
  919. Default:
  920. \fIprealloc\fR
  921. .RE
  922. .PP
  923. \fB\-\-log\-level\fR=LEVEL
  924. .RS 4
  925. Set log level to output\&. LEVEL is either
  926. \fIdebug\fR,
  927. \fIinfo\fR,
  928. \fInotice\fR,
  929. \fIwarn\fR
  930. or
  931. \fIerror\fR\&. Default:
  932. \fIdebug\fR
  933. .RE
  934. .PP
  935. \fB\-\-on\-download\-complete\fR=COMMAND
  936. .RS 4
  937. Set the command to be executed when download completes\&. See
  938. \fB\-\-on\-download\-start\fR
  939. option for the requirement of COMMAND\&. See also
  940. \fB\-\-on\-download\-stop\fR
  941. option\&. Possible Values:
  942. \fI/path/to/command\fR
  943. .RE
  944. .PP
  945. \fB\-\-on\-download\-error\fR=COMMAND
  946. .RS 4
  947. Set the command to be executed when download aborts due to error\&. See
  948. \fB\-\-on\-download\-start\fR
  949. option for the requirement of COMMAND\&. See also
  950. \fB\-\-on\-download\-stop\fR
  951. option\&. Possible Values:
  952. \fI/path/to/command\fR
  953. .RE
  954. .PP
  955. \fB\-\-on\-download\-start\fR=COMMAND
  956. .RS 4
  957. Set the command to be executed when download starts up\&. COMMAND must take just one argument and GID is passed to COMMAND as a first argument\&. Possible Values:
  958. \fI/path/to/command\fR
  959. .RE
  960. .PP
  961. \fB\-\-on\-download\-stop\fR=COMMAND
  962. .RS 4
  963. Set the command to be executed when download stops\&. You can override the command to be executed for particular download result using
  964. \fB\-\-on\-download\-complete\fR
  965. and
  966. \fB\-\-on\-download\-error\fR\&. If they are specified, command specified in this option is not executed\&. See
  967. \fB\-\-on\-download\-start\fR
  968. option for the requirement of COMMAND\&. Possible Values:
  969. \fI/path/to/command\fR
  970. .RE
  971. .PP
  972. \fB\-\-summary\-interval\fR=SEC
  973. .RS 4
  974. Set interval in seconds to output download progress summary\&. Setting
  975. \fI0\fR
  976. suppresses the output\&. Default:
  977. \fI60\fR
  978. .RE
  979. .if n \{\
  980. .sp
  981. .\}
  982. .RS 4
  983. .it 1 an-trap
  984. .nr an-no-space-flag 1
  985. .nr an-break-flag 1
  986. .br
  987. .ps +1
  988. \fBNote\fR
  989. .ps -1
  990. .br
  991. .sp
  992. In multi file torrent downloads, the files adjacent forward to the specified files are also allocated if they share the same piece\&.
  993. .sp .5v
  994. .RE
  995. .PP
  996. \fB\-Z\fR, \fB\-\-force\-sequential\fR[=\fItrue\fR|\fIfalse\fR]
  997. .RS 4
  998. Fetch URIs in the command\-line sequentially and download each URI in a separate session, like the usual command\-line download utilities\&. Default:
  999. \fIfalse\fR
  1000. .RE
  1001. .PP
  1002. \fB\-\-max\-overall\-download\-limit\fR=SPEED
  1003. .RS 4
  1004. Set max overall download speed in bytes/sec\&.
  1005. \fI0\fR
  1006. means unrestricted\&. You can append
  1007. \fIK\fR
  1008. or
  1009. \fIM\fR(1K = 1024, 1M = 1024K)\&. To limit the download speed per download, use
  1010. \fB\-\-max\-download\-limit\fR
  1011. option\&. Default:
  1012. \fI0\fR
  1013. .RE
  1014. .PP
  1015. \fB\-\-max\-download\-limit\fR=SPEED
  1016. .RS 4
  1017. Set max download speed per each download in bytes/sec\&.
  1018. \fI0\fR
  1019. means unrestricted\&. You can append
  1020. \fIK\fR
  1021. or
  1022. \fIM\fR(1K = 1024, 1M = 1024K)\&. To limit the overall download speed, use
  1023. \fB\-\-max\-overall\-download\-limit\fR
  1024. option\&. Default:
  1025. \fI0\fR
  1026. .RE
  1027. .PP
  1028. \fB\-\-no\-conf\fR
  1029. .RS 4
  1030. Disable loading aria2\&.conf file\&.
  1031. .RE
  1032. .PP
  1033. \fB\-\-no\-file\-allocation\-limit\fR=SIZE
  1034. .RS 4
  1035. No file allocation is made for files whose size is smaller than SIZE\&. You can append
  1036. \fIK\fR
  1037. or
  1038. \fIM\fR(1K = 1024, 1M = 1024K)\&. Default:
  1039. \fI5M\fR
  1040. .RE
  1041. .PP
  1042. \fB\-P\fR, \fB\-\-parameterized\-uri\fR[=\fItrue\fR|\fIfalse\fR]
  1043. .RS 4
  1044. Enable parameterized URI support\&. You can specify set of parts:
  1045. \fIhttp://{sv1,sv2,sv3}/foo\&.iso\fR\&. Also you can specify numeric sequences with step counter:
  1046. \fIhttp://host/image[000\-100:2]\&.img\fR\&. A step counter can be omitted\&. If all URIs do not point to the same file, such as the second example above, \-Z option is required\&. Default:
  1047. \fIfalse\fR
  1048. .RE
  1049. .PP
  1050. \fB\-q\fR, \fB\-\-quiet\fR[=\fItrue\fR|\fIfalse\fR]
  1051. .RS 4
  1052. Make aria2 quiet (no console output)\&. Default:
  1053. \fIfalse\fR
  1054. .RE
  1055. .PP
  1056. \fB\-\-realtime\-chunk\-checksum\fR=\fItrue\fR|\fIfalse\fR
  1057. .RS 4
  1058. Validate chunk of data by calculating checksum while downloading a file if chunk checksums are provided\&. Default:
  1059. \fItrue\fR
  1060. .RE
  1061. .PP
  1062. \fB\-\-stop\fR=SEC
  1063. .RS 4
  1064. Stop application after SEC seconds has passed\&. If
  1065. \fI0\fR
  1066. is given, this feature is disabled\&. Default:
  1067. \fI0\fR
  1068. .RE
  1069. .PP
  1070. \fB\-v\fR, \fB\-\-version\fR
  1071. .RS 4
  1072. Print the version number, copyright and the configuration information and exit\&.
  1073. .RE
  1074. .SS "Options That Take An Optional Argument"
  1075. .sp
  1076. The options that have its argument surrounded by square brackets([]) take an optional argument\&. Usually omiting the argument is evaluated to \fItrue\fR\&. If you use short form of these options(such as \fI\-V\fR) and give an argument, then the option name and its argument should be concatenated(e\&.g\&. \fI\-Vfalse\fR)\&. If any spaces are inserted between the option name and the argument, the argument will be treated as URI and usually this is not what you expect\&.
  1077. .SS "URL, TORRENT_FILE, METALINK_FILE"
  1078. .sp
  1079. You can specify multiple URLs in command\-line\&. Unless you specify \fB\-Z\fR option, all URLs must point to the same file or downloading will fail\&.
  1080. .sp
  1081. You can also specify arbitrary number of torrent files and metalink files stored on a local drive\&. Please note that they are always treated as a separate download\&.
  1082. .sp
  1083. You can specify both torrent file with \-T option and URLs\&. By doing this, you can download a file from both torrent swarm and HTTP(S)/FTP server at the same time, while the data from HTTP(S)/FTP are uploaded to the torrent swarm\&. For single file torrents, URL can be a complete URL pointing to the resource or if URL ends with /, name in torrent file in torrent is added\&. For multi\-file torrents, name and path are added to form a URL for each file\&.
  1084. .if n \{\
  1085. .sp
  1086. .\}
  1087. .RS 4
  1088. .it 1 an-trap
  1089. .nr an-no-space-flag 1
  1090. .nr an-break-flag 1
  1091. .br
  1092. .ps +1
  1093. \fBNote\fR
  1094. .ps -1
  1095. .br
  1096. .sp
  1097. Make sure that URL is quoted with single(\') or double(") quotation if it contains "&" or any characters that have special meaning in shell\&.
  1098. .sp .5v
  1099. .RE
  1100. .SS "Resuming Download"
  1101. .sp
  1102. Usually, you can resume transfer by just issuing same command(aria2c URL) if the previous transfer is made by aria2\&.
  1103. .sp
  1104. If the previous transfer is made by a browser or wget like sequential download manager, then use \-c option to continue the transfer(aria2c \fB\-c\fR URL)\&.
  1105. .SH "EXIT STATUS"
  1106. .sp
  1107. Because aria2 can handle multiple downloads at once, it encounters lots of errors in a session\&. aria2 returns the following exit status based on the last error encountered\&.
  1108. .PP
  1109. \fB0\fR
  1110. .RS 4
  1111. If all downloads are successful\&.
  1112. .RE
  1113. .PP
  1114. \fB1\fR
  1115. .RS 4
  1116. If an unknown error occurs\&.
  1117. .RE
  1118. .PP
  1119. \fB2\fR
  1120. .RS 4
  1121. If time out occurs\&.
  1122. .RE
  1123. .PP
  1124. \fB3\fR
  1125. .RS 4
  1126. If a resource is not found\&.
  1127. .RE
  1128. .PP
  1129. \fB4\fR
  1130. .RS 4
  1131. If aria2 sees the specfied number of "resource not found" error\&. See
  1132. \fB\-\-max\-file\-not\-found\fR
  1133. option)\&.
  1134. .RE
  1135. .PP
  1136. \fB5\fR
  1137. .RS 4
  1138. If a download aborts because download speed is too slow\&. See
  1139. \fB\-\-lowest\-speed\-limit\fR
  1140. option)
  1141. .RE
  1142. .PP
  1143. \fB6\fR
  1144. .RS 4
  1145. If network problem occurs\&.
  1146. .RE
  1147. .PP
  1148. \fB7\fR
  1149. .RS 4
  1150. If there are unfinished downloads\&. This error is only reported if all finished downloads are successful and there are unfinished downloads in a queue when aria2 exits by pressing Ctrl\-C by an user or sending TERM or INT signal\&.
  1151. .RE
  1152. .if n \{\
  1153. .sp
  1154. .\}
  1155. .RS 4
  1156. .it 1 an-trap
  1157. .nr an-no-space-flag 1
  1158. .nr an-break-flag 1
  1159. .br
  1160. .ps +1
  1161. \fBNote\fR
  1162. .ps -1
  1163. .br
  1164. .sp
  1165. An error occurred in a finished download will not be reported as exit status\&.
  1166. .sp .5v
  1167. .RE
  1168. .SH "ENVIRONMENT"
  1169. .sp
  1170. aria2 recognizes the following environment variables\&.
  1171. .PP
  1172. http_proxy [http://][USER:PASSWORD@]HOST[:PORT]
  1173. .RS 4
  1174. Specify proxy server for use in HTTP\&. Overrides http\-proxy value in configuration file\&. The command\-line option
  1175. \fB\-\-http\-proxy\fR
  1176. overrides this value\&.
  1177. .RE
  1178. .PP
  1179. https_proxy [http://][USER:PASSWORD@]HOST[:PORT]
  1180. .RS 4
  1181. Specify proxy server for use in HTTPS\&. Overrides https\-proxy value in configuration file\&. The command\-line option
  1182. \fB\-\-https\-proxy\fR
  1183. overrides this value\&.
  1184. .RE
  1185. .PP
  1186. ftp_proxy [http://][USER:PASSWORD@]HOST[:PORT]
  1187. .RS 4
  1188. Specify proxy server for use in FTP\&. Overrides ftp\-proxy value in configuration file\&. The command\-line option
  1189. \fB\-\-ftp\-proxy\fR
  1190. overrides this value\&.
  1191. .RE
  1192. .PP
  1193. all_proxy [http://][USER:PASSWORD@]HOST[:PORT]
  1194. .RS 4
  1195. Specify proxy server for use if no protocol\-specific proxy is specified\&. Overrides all\-proxy value in configuration file\&. The command\-line option
  1196. \fB\-\-all\-proxy\fR
  1197. overrides this value\&.
  1198. .RE
  1199. .PP
  1200. no_proxy [DOMAIN,\&...]
  1201. .RS 4
  1202. Specify comma\-separated hostname or domains to which proxy should not be used\&. Overrides no\-proxy value in configuration file\&. The command\-line option
  1203. \fB\-\-no\-proxy\fR
  1204. overrides this value\&.
  1205. .RE
  1206. .SH "FILES"
  1207. .SS "aria2\&.conf"
  1208. .sp
  1209. By default, aria2 parses \fI$HOME/\&.aria2/aria2\&.conf\fR as a configuraiton file\&. You can specify the path to configuration file using \fB\-\-conf\-path\fR option\&. If you don\(cqt want to use the configuraitonf file, use \fB\-\-no\-conf\fR option\&.
  1210. .sp
  1211. The configuration file is a text file and has 1 option per each line\&. In each line, you can specify name\-value pair in the format: NAME=VALUE, where name is the long command\-line option name without "\-\-" prefix\&. You can use same syntax for the command\-line option\&. The lines beginning "#" are treated as comments\&.
  1212. .sp
  1213. .if n \{\
  1214. .RS 4
  1215. .\}
  1216. .nf
  1217. # sample configuration file for aria2c
  1218. listen\-port=60000
  1219. dht\-listen\-port=60000
  1220. seed\-ratio=1\&.0
  1221. max\-upload\-limit=50K
  1222. ftp\-pasv=true
  1223. .fi
  1224. .if n \{\
  1225. .RE
  1226. .\}
  1227. .SS "dht\&.dat"
  1228. .sp
  1229. By default, the routing table of DHT is saved to the path $HOME/\&.aria2/dht\&.dat\&.
  1230. .SS "Control File"
  1231. .sp
  1232. aria2 uses a control file to track the progress of a download\&. A control file is placed in the same directory as the downloading file and its filename is the filename of downloading file with "\&.aria2" appended\&. For example, if you are downloading file\&.zip, then the control file should be file\&.zip\&.aria2\&. (There is a exception for this naming convention\&. If you are downloading a multi torrent, its control file is the "top directory" name of the torrent with "\&.aria2" appended\&. The "top directory" name is a value of "name" key in "info" directory in a torrent file\&.)
  1233. .sp
  1234. Usually a control file is deleted once download completed\&. If aria2 decides that download cannot be resumed(for example, when downloading a file from a HTTP server which doesn\(cqt support resume), a control file is not created\&.
  1235. .sp
  1236. Normally if you lose a control file, you cannot resume download\&. But if you have a torrent or metalink with chunk checksums for the file, you can resume the download without a control file by giving \-V option to aria2c in command\-line\&.
  1237. .SS "Input File"
  1238. .sp
  1239. The input file can contain a list of URIs for aria2 to download\&. You can specify multiple URIs for a single entity: separate URIs on a single line using the TAB character\&.
  1240. .sp
  1241. Each line is treated as if it is provided in command\-line argument\&. Therefore they are affected by \fB\-Z\fR and \fB\-P\fR options\&.
  1242. .sp
  1243. Additionally, the following options can be specified after each line of URIs\&. These optional lines must start with white space(s)\&.
  1244. .sp
  1245. .RS 4
  1246. .ie n \{\
  1247. \h'-04'\(bu\h'+03'\c
  1248. .\}
  1249. .el \{\
  1250. .sp -1
  1251. .IP \(bu 2.3
  1252. .\}
  1253. dir
  1254. .RE
  1255. .sp
  1256. .RS 4
  1257. .ie n \{\
  1258. \h'-04'\(bu\h'+03'\c
  1259. .\}
  1260. .el \{\
  1261. .sp -1
  1262. .IP \(bu 2.3
  1263. .\}
  1264. check\-integrity
  1265. .RE
  1266. .sp
  1267. .RS 4
  1268. .ie n \{\
  1269. \h'-04'\(bu\h'+03'\c
  1270. .\}
  1271. .el \{\
  1272. .sp -1
  1273. .IP \(bu 2.3
  1274. .\}
  1275. continue
  1276. .RE
  1277. .sp
  1278. .RS 4
  1279. .ie n \{\
  1280. \h'-04'\(bu\h'+03'\c
  1281. .\}
  1282. .el \{\
  1283. .sp -1
  1284. .IP \(bu 2.3
  1285. .\}
  1286. all\-proxy
  1287. .RE
  1288. .sp
  1289. .RS 4
  1290. .ie n \{\
  1291. \h'-04'\(bu\h'+03'\c
  1292. .\}
  1293. .el \{\
  1294. .sp -1
  1295. .IP \(bu 2.3
  1296. .\}
  1297. connect\-timeout
  1298. .RE
  1299. .sp
  1300. .RS 4
  1301. .ie n \{\
  1302. \h'-04'\(bu\h'+03'\c
  1303. .\}
  1304. .el \{\
  1305. .sp -1
  1306. .IP \(bu 2.3
  1307. .\}
  1308. dry\-run
  1309. .RE
  1310. .sp
  1311. .RS 4
  1312. .ie n \{\
  1313. \h'-04'\(bu\h'+03'\c
  1314. .\}
  1315. .el \{\
  1316. .sp -1
  1317. .IP \(bu 2.3
  1318. .\}
  1319. lowest\-speed\-limit
  1320. .RE
  1321. .sp
  1322. .RS 4
  1323. .ie n \{\
  1324. \h'-04'\(bu\h'+03'\c
  1325. .\}
  1326. .el \{\
  1327. .sp -1
  1328. .IP \(bu 2.3
  1329. .\}
  1330. max\-file\-not\-found
  1331. .RE
  1332. .sp
  1333. .RS 4
  1334. .ie n \{\
  1335. \h'-04'\(bu\h'+03'\c
  1336. .\}
  1337. .el \{\
  1338. .sp -1
  1339. .IP \(bu 2.3
  1340. .\}
  1341. max\-tries
  1342. .RE
  1343. .sp
  1344. .RS 4
  1345. .ie n \{\
  1346. \h'-04'\(bu\h'+03'\c
  1347. .\}
  1348. .el \{\
  1349. .sp -1
  1350. .IP \(bu 2.3
  1351. .\}
  1352. no\-proxy
  1353. .RE
  1354. .sp
  1355. .RS 4
  1356. .ie n \{\
  1357. \h'-04'\(bu\h'+03'\c
  1358. .\}
  1359. .el \{\
  1360. .sp -1
  1361. .IP \(bu 2.3
  1362. .\}
  1363. out
  1364. .RE
  1365. .sp
  1366. .RS 4
  1367. .ie n \{\
  1368. \h'-04'\(bu\h'+03'\c
  1369. .\}
  1370. .el \{\
  1371. .sp -1
  1372. .IP \(bu 2.3
  1373. .\}
  1374. proxy\-method
  1375. .RE
  1376. .sp
  1377. .RS 4
  1378. .ie n \{\
  1379. \h'-04'\(bu\h'+03'\c
  1380. .\}
  1381. .el \{\
  1382. .sp -1
  1383. .IP \(bu 2.3
  1384. .\}
  1385. remote\-time
  1386. .RE
  1387. .sp
  1388. .RS 4
  1389. .ie n \{\
  1390. \h'-04'\(bu\h'+03'\c
  1391. .\}
  1392. .el \{\
  1393. .sp -1
  1394. .IP \(bu 2.3
  1395. .\}
  1396. retry\-wait
  1397. .RE
  1398. .sp
  1399. .RS 4
  1400. .ie n \{\
  1401. \h'-04'\(bu\h'+03'\c
  1402. .\}
  1403. .el \{\
  1404. .sp -1
  1405. .IP \(bu 2.3
  1406. .\}
  1407. split
  1408. .RE
  1409. .sp
  1410. .RS 4
  1411. .ie n \{\
  1412. \h'-04'\(bu\h'+03'\c
  1413. .\}
  1414. .el \{\
  1415. .sp -1
  1416. .IP \(bu 2.3
  1417. .\}
  1418. timeout
  1419. .RE
  1420. .sp
  1421. .RS 4
  1422. .ie n \{\
  1423. \h'-04'\(bu\h'+03'\c
  1424. .\}
  1425. .el \{\
  1426. .sp -1
  1427. .IP \(bu 2.3
  1428. .\}
  1429. http\-auth\-challenge
  1430. .RE
  1431. .sp
  1432. .RS 4
  1433. .ie n \{\
  1434. \h'-04'\(bu\h'+03'\c
  1435. .\}
  1436. .el \{\
  1437. .sp -1
  1438. .IP \(bu 2.3
  1439. .\}
  1440. http\-user
  1441. .RE
  1442. .sp
  1443. .RS 4
  1444. .ie n \{\
  1445. \h'-04'\(bu\h'+03'\c
  1446. .\}
  1447. .el \{\
  1448. .sp -1
  1449. .IP \(bu 2.3
  1450. .\}
  1451. http\-passwd
  1452. .RE
  1453. .sp
  1454. .RS 4
  1455. .ie n \{\
  1456. \h'-04'\(bu\h'+03'\c
  1457. .\}
  1458. .el \{\
  1459. .sp -1
  1460. .IP \(bu 2.3
  1461. .\}
  1462. http\-proxy
  1463. .RE
  1464. .sp
  1465. .RS 4
  1466. .ie n \{\
  1467. \h'-04'\(bu\h'+03'\c
  1468. .\}
  1469. .el \{\
  1470. .sp -1
  1471. .IP \(bu 2.3
  1472. .\}
  1473. https\-proxy
  1474. .RE
  1475. .sp
  1476. .RS 4
  1477. .ie n \{\
  1478. \h'-04'\(bu\h'+03'\c
  1479. .\}
  1480. .el \{\
  1481. .sp -1
  1482. .IP \(bu 2.3
  1483. .\}
  1484. referer
  1485. .RE
  1486. .sp
  1487. .RS 4
  1488. .ie n \{\
  1489. \h'-04'\(bu\h'+03'\c
  1490. .\}
  1491. .el \{\
  1492. .sp -1
  1493. .IP \(bu 2.3
  1494. .\}
  1495. enable\-http\-keep\-alive
  1496. .RE
  1497. .sp
  1498. .RS 4
  1499. .ie n \{\
  1500. \h'-04'\(bu\h'+03'\c
  1501. .\}
  1502. .el \{\
  1503. .sp -1
  1504. .IP \(bu 2.3
  1505. .\}
  1506. enable\-http\-pipelining
  1507. .RE
  1508. .sp
  1509. .RS 4
  1510. .ie n \{\
  1511. \h'-04'\(bu\h'+03'\c
  1512. .\}
  1513. .el \{\
  1514. .sp -1
  1515. .IP \(bu 2.3
  1516. .\}
  1517. header
  1518. .RE
  1519. .sp
  1520. .RS 4
  1521. .ie n \{\
  1522. \h'-04'\(bu\h'+03'\c
  1523. .\}
  1524. .el \{\
  1525. .sp -1
  1526. .IP \(bu 2.3
  1527. .\}
  1528. use\-head
  1529. .RE
  1530. .sp
  1531. .RS 4
  1532. .ie n \{\
  1533. \h'-04'\(bu\h'+03'\c
  1534. .\}
  1535. .el \{\
  1536. .sp -1
  1537. .IP \(bu 2.3
  1538. .\}
  1539. user\-agent
  1540. .RE
  1541. .sp
  1542. .RS 4
  1543. .ie n \{\
  1544. \h'-04'\(bu\h'+03'\c
  1545. .\}
  1546. .el \{\
  1547. .sp -1
  1548. .IP \(bu 2.3
  1549. .\}
  1550. ftp\-user
  1551. .RE
  1552. .sp
  1553. .RS 4
  1554. .ie n \{\
  1555. \h'-04'\(bu\h'+03'\c
  1556. .\}
  1557. .el \{\
  1558. .sp -1
  1559. .IP \(bu 2.3
  1560. .\}
  1561. ftp\-passwd
  1562. .RE
  1563. .sp
  1564. .RS 4
  1565. .ie n \{\
  1566. \h'-04'\(bu\h'+03'\c
  1567. .\}
  1568. .el \{\
  1569. .sp -1
  1570. .IP \(bu 2.3
  1571. .\}
  1572. ftp\-pasv
  1573. .RE
  1574. .sp
  1575. .RS 4
  1576. .ie n \{\
  1577. \h'-04'\(bu\h'+03'\c
  1578. .\}
  1579. .el \{\
  1580. .sp -1
  1581. .IP \(bu 2.3
  1582. .\}
  1583. ftp\-proxy
  1584. .RE
  1585. .sp
  1586. .RS 4
  1587. .ie n \{\
  1588. \h'-04'\(bu\h'+03'\c
  1589. .\}
  1590. .el \{\
  1591. .sp -1
  1592. .IP \(bu 2.3
  1593. .\}
  1594. ftp\-type
  1595. .RE
  1596. .sp
  1597. .RS 4
  1598. .ie n \{\
  1599. \h'-04'\(bu\h'+03'\c
  1600. .\}
  1601. .el \{\
  1602. .sp -1
  1603. .IP \(bu 2.3
  1604. .\}
  1605. ftp\-reuse\-connection
  1606. .RE
  1607. .sp
  1608. .RS 4
  1609. .ie n \{\
  1610. \h'-04'\(bu\h'+03'\c
  1611. .\}
  1612. .el \{\
  1613. .sp -1
  1614. .IP \(bu 2.3
  1615. .\}
  1616. no\-netrc
  1617. .RE
  1618. .sp
  1619. .RS 4
  1620. .ie n \{\
  1621. \h'-04'\(bu\h'+03'\c
  1622. .\}
  1623. .el \{\
  1624. .sp -1
  1625. .IP \(bu 2.3
  1626. .\}
  1627. select\-file
  1628. .RE
  1629. .sp
  1630. .RS 4
  1631. .ie n \{\
  1632. \h'-04'\(bu\h'+03'\c
  1633. .\}
  1634. .el \{\
  1635. .sp -1
  1636. .IP \(bu 2.3
  1637. .\}
  1638. bt\-external\-ip
  1639. .RE
  1640. .sp
  1641. .RS 4
  1642. .ie n \{\
  1643. \h'-04'\(bu\h'+03'\c
  1644. .\}
  1645. .el \{\
  1646. .sp -1
  1647. .IP \(bu 2.3
  1648. .\}
  1649. bt\-hash\-check\-seed
  1650. .RE
  1651. .sp
  1652. .RS 4
  1653. .ie n \{\
  1654. \h'-04'\(bu\h'+03'\c
  1655. .\}
  1656. .el \{\
  1657. .sp -1
  1658. .IP \(bu 2.3
  1659. .\}
  1660. bt\-max\-open\-files
  1661. .RE
  1662. .sp
  1663. .RS 4
  1664. .ie n \{\
  1665. \h'-04'\(bu\h'+03'\c
  1666. .\}
  1667. .el \{\
  1668. .sp -1
  1669. .IP \(bu 2.3
  1670. .\}
  1671. bt\-max\-peers
  1672. .RE
  1673. .sp
  1674. .RS 4
  1675. .ie n \{\
  1676. \h'-04'\(bu\h'+03'\c
  1677. .\}
  1678. .el \{\
  1679. .sp -1
  1680. .IP \(bu 2.3
  1681. .\}
  1682. bt\-min\-crypto\-level
  1683. .RE
  1684. .sp
  1685. .RS 4
  1686. .ie n \{\
  1687. \h'-04'\(bu\h'+03'\c
  1688. .\}
  1689. .el \{\
  1690. .sp -1
  1691. .IP \(bu 2.3
  1692. .\}
  1693. bt\-require\-crypto
  1694. .RE
  1695. .sp
  1696. .RS 4
  1697. .ie n \{\
  1698. \h'-04'\(bu\h'+03'\c
  1699. .\}
  1700. .el \{\
  1701. .sp -1
  1702. .IP \(bu 2.3
  1703. .\}
  1704. bt\-request\-peer\-speed\-limit
  1705. .RE
  1706. .sp
  1707. .RS 4
  1708. .ie n \{\
  1709. \h'-04'\(bu\h'+03'\c
  1710. .\}
  1711. .el \{\
  1712. .sp -1
  1713. .IP \(bu 2.3
  1714. .\}
  1715. bt\-seed\-unverified
  1716. .RE
  1717. .sp
  1718. .RS 4
  1719. .ie n \{\
  1720. \h'-04'\(bu\h'+03'\c
  1721. .\}
  1722. .el \{\
  1723. .sp -1
  1724. .IP \(bu 2.3
  1725. .\}
  1726. bt\-stop\-timeout
  1727. .RE
  1728. .sp
  1729. .RS 4
  1730. .ie n \{\
  1731. \h'-04'\(bu\h'+03'\c
  1732. .\}
  1733. .el \{\
  1734. .sp -1
  1735. .IP \(bu 2.3
  1736. .\}
  1737. bt\-tracker\-interval
  1738. .RE
  1739. .sp
  1740. .RS 4
  1741. .ie n \{\
  1742. \h'-04'\(bu\h'+03'\c
  1743. .\}
  1744. .el \{\
  1745. .sp -1
  1746. .IP \(bu 2.3
  1747. .\}
  1748. enable\-peer\-exchange
  1749. .RE
  1750. .sp
  1751. .RS 4
  1752. .ie n \{\
  1753. \h'-04'\(bu\h'+03'\c
  1754. .\}
  1755. .el \{\
  1756. .sp -1
  1757. .IP \(bu 2.3
  1758. .\}
  1759. follow\-torrent
  1760. .RE
  1761. .sp
  1762. .RS 4
  1763. .ie n \{\
  1764. \h'-04'\(bu\h'+03'\c
  1765. .\}
  1766. .el \{\
  1767. .sp -1
  1768. .IP \(bu 2.3
  1769. .\}
  1770. index\-out
  1771. .RE
  1772. .sp
  1773. .RS 4
  1774. .ie n \{\
  1775. \h'-04'\(bu\h'+03'\c
  1776. .\}
  1777. .el \{\
  1778. .sp -1
  1779. .IP \(bu 2.3
  1780. .\}
  1781. max\-upload\-limit
  1782. .RE
  1783. .sp
  1784. .RS 4
  1785. .ie n \{\
  1786. \h'-04'\(bu\h'+03'\c
  1787. .\}
  1788. .el \{\
  1789. .sp -1
  1790. .IP \(bu 2.3
  1791. .\}
  1792. seed\-ratio
  1793. .RE
  1794. .sp
  1795. .RS 4
  1796. .ie n \{\
  1797. \h'-04'\(bu\h'+03'\c
  1798. .\}
  1799. .el \{\
  1800. .sp -1
  1801. .IP \(bu 2.3
  1802. .\}
  1803. seed\-time
  1804. .RE
  1805. .sp
  1806. .RS 4
  1807. .ie n \{\
  1808. \h'-04'\(bu\h'+03'\c
  1809. .\}
  1810. .el \{\
  1811. .sp -1
  1812. .IP \(bu 2.3
  1813. .\}
  1814. follow\-metalink
  1815. .RE
  1816. .sp
  1817. .RS 4
  1818. .ie n \{\
  1819. \h'-04'\(bu\h'+03'\c
  1820. .\}
  1821. .el \{\
  1822. .sp -1
  1823. .IP \(bu 2.3
  1824. .\}
  1825. metalink\-servers
  1826. .RE
  1827. .sp
  1828. .RS 4
  1829. .ie n \{\
  1830. \h'-04'\(bu\h'+03'\c
  1831. .\}
  1832. .el \{\
  1833. .sp -1
  1834. .IP \(bu 2.3
  1835. .\}
  1836. metalink\-language
  1837. .RE
  1838. .sp
  1839. .RS 4
  1840. .ie n \{\
  1841. \h'-04'\(bu\h'+03'\c
  1842. .\}
  1843. .el \{\
  1844. .sp -1
  1845. .IP \(bu 2.3
  1846. .\}
  1847. metalink\-location
  1848. .RE
  1849. .sp
  1850. .RS 4
  1851. .ie n \{\
  1852. \h'-04'\(bu\h'+03'\c
  1853. .\}
  1854. .el \{\
  1855. .sp -1
  1856. .IP \(bu 2.3
  1857. .\}
  1858. metalink\-os
  1859. .RE
  1860. .sp
  1861. .RS 4
  1862. .ie n \{\
  1863. \h'-04'\(bu\h'+03'\c
  1864. .\}
  1865. .el \{\
  1866. .sp -1
  1867. .IP \(bu 2.3
  1868. .\}
  1869. metalink\-version
  1870. .RE
  1871. .sp
  1872. .RS 4
  1873. .ie n \{\
  1874. \h'-04'\(bu\h'+03'\c
  1875. .\}
  1876. .el \{\
  1877. .sp -1
  1878. .IP \(bu 2.3
  1879. .\}
  1880. metalink\-preferred\-protocol
  1881. .RE
  1882. .sp
  1883. .RS 4
  1884. .ie n \{\
  1885. \h'-04'\(bu\h'+03'\c
  1886. .\}
  1887. .el \{\
  1888. .sp -1
  1889. .IP \(bu 2.3
  1890. .\}
  1891. metalink\-enable\-unique\-protocol
  1892. .RE
  1893. .sp
  1894. .RS 4
  1895. .ie n \{\
  1896. \h'-04'\(bu\h'+03'\c
  1897. .\}
  1898. .el \{\
  1899. .sp -1
  1900. .IP \(bu 2.3
  1901. .\}
  1902. allow\-overwrite
  1903. .RE
  1904. .sp
  1905. .RS 4
  1906. .ie n \{\
  1907. \h'-04'\(bu\h'+03'\c
  1908. .\}
  1909. .el \{\
  1910. .sp -1
  1911. .IP \(bu 2.3
  1912. .\}
  1913. allow\-piece\-length\-change
  1914. .RE
  1915. .sp
  1916. .RS 4
  1917. .ie n \{\
  1918. \h'-04'\(bu\h'+03'\c
  1919. .\}
  1920. .el \{\
  1921. .sp -1
  1922. .IP \(bu 2.3
  1923. .\}
  1924. async\-dns
  1925. .RE
  1926. .sp
  1927. .RS 4
  1928. .ie n \{\
  1929. \h'-04'\(bu\h'+03'\c
  1930. .\}
  1931. .el \{\
  1932. .sp -1
  1933. .IP \(bu 2.3
  1934. .\}
  1935. auto\-file\-renaming
  1936. .RE
  1937. .sp
  1938. .RS 4
  1939. .ie n \{\
  1940. \h'-04'\(bu\h'+03'\c
  1941. .\}
  1942. .el \{\
  1943. .sp -1
  1944. .IP \(bu 2.3
  1945. .\}
  1946. file\-allocation
  1947. .RE
  1948. .sp
  1949. .RS 4
  1950. .ie n \{\
  1951. \h'-04'\(bu\h'+03'\c
  1952. .\}
  1953. .el \{\
  1954. .sp -1
  1955. .IP \(bu 2.3
  1956. .\}
  1957. max\-download\-limit
  1958. .RE
  1959. .sp
  1960. .RS 4
  1961. .ie n \{\
  1962. \h'-04'\(bu\h'+03'\c
  1963. .\}
  1964. .el \{\
  1965. .sp -1
  1966. .IP \(bu 2.3
  1967. .\}
  1968. no\-file\-allocation\-limit
  1969. .RE
  1970. .sp
  1971. .RS 4
  1972. .ie n \{\
  1973. \h'-04'\(bu\h'+03'\c
  1974. .\}
  1975. .el \{\
  1976. .sp -1
  1977. .IP \(bu 2.3
  1978. .\}
  1979. parameterized\-uri
  1980. .RE
  1981. .sp
  1982. .RS 4
  1983. .ie n \{\
  1984. \h'-04'\(bu\h'+03'\c
  1985. .\}
  1986. .el \{\
  1987. .sp -1
  1988. .IP \(bu 2.3
  1989. .\}
  1990. realtime\-chunk\-checksum
  1991. .RE
  1992. .sp
  1993. These options have exactly same meaning of the ones in the command\-line options, but it just applies to the URIs it belongs to\&.
  1994. .sp
  1995. For example, the content of uri\&.txt is
  1996. .sp
  1997. .if n \{\
  1998. .RS 4
  1999. .\}
  2000. .nf
  2001. http://server/file\&.iso http://mirror/file\&.iso
  2002. dir=/iso_images
  2003. out=file\&.img
  2004. http://foo/bar
  2005. .fi
  2006. .if n \{\
  2007. .RE
  2008. .\}
  2009. .sp
  2010. If aria2 is executed with \fB\-i\fR uri\&.txt \fB\-d\fR /tmp options, then \fIfile\&.iso\fR is saved as \fI/iso_images/file\&.img\fR and it is downloaded from http://server/file\&.iso and http://mirror/file\&.iso\&. The file \fIbar\fR is downloaded from http://foo/bar and saved as \fI/tmp/bar\fR\&.
  2011. .sp
  2012. In some cases, \fBout\fR parameter has no effect\&. See note of \fB\-\-out\fR option for the restrictions\&.
  2013. .SS "Server Performance Profile"
  2014. .sp
  2015. This section describes the format of server performance profile\&. The file is plain text and each line has several NAME=VALUE pair, delimited by comma\&. Currently following NAMEs are recognized:
  2016. .PP
  2017. host
  2018. .RS 4
  2019. Hostname of the server\&. Required\&.
  2020. .RE
  2021. .PP
  2022. protocol
  2023. .RS 4
  2024. Protocol for this profile, such as ftp, http\&. Required\&.
  2025. .RE
  2026. .PP
  2027. dl_speed
  2028. .RS 4
  2029. The average download speed observed in the previous download in bytes per sec\&. Required\&.
  2030. .RE
  2031. .PP
  2032. sc_avg_speed
  2033. .RS 4
  2034. The average download speed observed in the previous download in bytes per sec\&. This value is only updated if the download is done in single connection environment and only used by AdaptiveURISelector\&. Optional\&.
  2035. .RE
  2036. .PP
  2037. mc_avg_speed
  2038. .RS 4
  2039. The average download speed observed in the previous download in bytes per sec\&. This value is only updated if the download is done in multi connection environment and only used by AdaptiveURISelector\&. Optional\&.
  2040. .RE
  2041. .PP
  2042. counter
  2043. .RS 4
  2044. How many times the server is used\&. Currently this value is only used by AdaptiveURISelector\&. Optional\&.
  2045. .RE
  2046. .PP
  2047. last_updated
  2048. .RS 4
  2049. Last contact time in GMT with this server, specified in the seconds from the Epoch\&. Required\&.
  2050. .RE
  2051. .PP
  2052. status
  2053. .RS 4
  2054. ERROR is set when server cannot be reached or out\-of\-service or timeout occurred\&. Otherwise, OK is set\&.
  2055. .RE
  2056. .sp
  2057. Those fields must exist in one line\&. The order of the fields is not significant\&. You can put pairs other than the above; they are simply ignored\&.
  2058. .sp
  2059. An example follows:
  2060. .sp
  2061. .if n \{\
  2062. .RS 4
  2063. .\}
  2064. .nf
  2065. host=localhost, protocol=http, dl_speed=32000, last_updated=1222491640, status=OK
  2066. host=localhost, protocol=ftp, dl_speed=0, last_updated=1222491632, status=ERROR
  2067. .fi
  2068. .if n \{\
  2069. .RE
  2070. .\}
  2071. .SH "XML-RPC INTERFACE"
  2072. .SS "Terminology"
  2073. .PP
  2074. GID
  2075. .RS 4
  2076. GID(or gid) is the key to manage each download\&. Each download has an unique GID\&. Currently GID looks like an integer, but don\(cqt treat it as integer because it may be changed to another type in the future release\&.
  2077. .RE
  2078. .SS "Methods"
  2079. .sp
  2080. \fBaria2\&.addUri\fR \fIuris[, options[, position]]\fR
  2081. .sp
  2082. This method adds new HTTP(S)/FTP download\&. \fIuris\fR is of type array and its element is URI which is of type string\&. \fIoptions\fR is of type struct and its members are a pair of option name and value\&. See \fBOptions\fR below for more details\&. If \fIposition\fR is given as an integer starting from 0, the new download is inserted at \fIposition\fR in the waiting queue\&. If \fIposition\fR is not given or \fIposition\fR is larger than the size of the queue, it is appended at the end of the queue\&. This method returns GID of registered download\&.
  2083. .sp
  2084. \fBaria2\&.addTorrent\fR \fItorrent[, uris[, options[, position]]]\fR
  2085. .sp
  2086. This method adds BitTorrent download by uploading \&.torrent file\&. \fItorrent\fR is of type base64 which contains Base64\-encoded \&.torrent file\&. \fIuris\fR is of type array and its element is URI which is of type string\&. \fIuris\fR is used for Web\-seeding\&. For single file torrents, URI can be a complete URI pointing to the resource or if URI ends with /, name in torrent file is added\&. For multi\-file torrents, name and path in torrent are added to form a URI for each file\&. \fIoptions\fR is of type struct and its members are a pair of option name and value\&. See \fBOptions\fR below for more details\&. If \fIposition\fR is given as an integer starting from 0, the new download is inserted at \fIposition\fR in the waiting queue\&. If \fIposition\fR is not given or \fIposition\fR is larger than the size of the queue, it is appended at the end of the queue\&. This method returns GID of registered download\&.
  2087. .sp
  2088. \fBaria2\&.addMetalink\fR \fImetalink[, options[, position]]\fR
  2089. .sp
  2090. This method adds Metalink download by uploading \&.metalink file\&. \fImetalink\fR is of type base64 which contains Base64\-encoded \&.metalink file\&. \fIoptions\fR is of type struct and its members are a pair of option name and value\&. See \fBOptions\fR below for more details\&. If \fIposition\fR is given as an integer starting from 0, the new download is inserted at \fIposition\fR in the waiting queue\&. If \fIposition\fR is not given or \fIposition\fR is larger than the size of the queue, it is appended at the end of the queue\&. This method returns array of GID of registered download\&.
  2091. .sp
  2092. \fBaria2\&.remove\fR \fIgid\fR
  2093. .sp
  2094. This method removes the download denoted by \fIgid\fR\&. \fIgid\fR is of type string\&. If specified download is in progress, it is stopped at first\&. The status of removed download becomes "removed"\&. This method returns GID of removed download\&.
  2095. .sp
  2096. \fBaria2\&.tellStatus\fR \fIgid\fR
  2097. .sp
  2098. This method returns download progress of the download denoted by \fIgid\fR\&. \fIgid\fR is of type string\&. The response is of type struct and it contains following keys\&. The value type is string\&.
  2099. .PP
  2100. gid
  2101. .RS 4
  2102. GID of this download\&.
  2103. .RE
  2104. .PP
  2105. status
  2106. .RS 4
  2107. "active" for currently downloading/seeding entry\&. "waiting" for the entry in the queue; download is not started\&. "error" for the stopped download because of error\&. "complete" for the stopped and completed download\&. "removed" for the download removed by user\&.
  2108. .RE
  2109. .PP
  2110. totalLength
  2111. .RS 4
  2112. Total length of this download in bytes\&.
  2113. .RE
  2114. .PP
  2115. completedLength
  2116. .RS 4
  2117. Completed length of this download in bytes\&.
  2118. .RE
  2119. .PP
  2120. uploadLength
  2121. .RS 4
  2122. Uploaded length of this download in bytes\&.
  2123. .RE
  2124. .PP
  2125. bitfield
  2126. .RS 4
  2127. Hexadecimal representation of the download progress\&. The highest bit corresponds to piece index 0\&. The set bits indicate the piece is available and unset bits indicate the piece is missing\&. The spare bits at the end are set to zero\&.
  2128. .RE
  2129. .PP
  2130. downloadSpeed
  2131. .RS 4
  2132. Download speed of this download measured in bytes/sec\&.
  2133. .RE
  2134. .PP
  2135. uploadSpeed
  2136. .RS 4
  2137. Upload speed of this download measured in bytes/sec\&.
  2138. .RE
  2139. .PP
  2140. infoHash
  2141. .RS 4
  2142. InfoHash\&. BitTorrent only\&.
  2143. .RE
  2144. .PP
  2145. numSeeders
  2146. .RS 4
  2147. The number of seeders the client has connected to\&. BitTorrent only\&.
  2148. .RE
  2149. .PP
  2150. pieceLength
  2151. .RS 4
  2152. Piece length in bytes\&.
  2153. .RE
  2154. .PP
  2155. numPieces
  2156. .RS 4
  2157. The number of pieces\&.
  2158. .RE
  2159. .PP
  2160. connections
  2161. .RS 4
  2162. The number of peers/servers the client has connected to\&.
  2163. .RE
  2164. .PP
  2165. errorCode
  2166. .RS 4
  2167. The last error code occurred in this download\&. The value is of type string\&. The error codes are defined in EXIT STATUS section\&. This value is only available for stopped/completed downloads\&.
  2168. .RE
  2169. .sp
  2170. \fBaria2\&.getUris\fR \fIgid\fR
  2171. .sp
  2172. This method returns URIs used in the download denoted by \fIgid\fR\&. \fIgid\fR is of type string\&. The response is of type array and its element is of type struct and it contains following keys\&. The value type is string\&.
  2173. .PP
  2174. uri
  2175. .RS 4
  2176. URI
  2177. .RE
  2178. .sp
  2179. \fBaria2\&.getFiles\fR \fIgid\fR
  2180. .sp
  2181. This method returns file list of the download denoted by \fIgid\fR\&. \fIgid\fR is of type string\&. The response is of type array and its element is of type struct and it contains following keys\&. The value type is string\&.
  2182. .PP
  2183. index
  2184. .RS 4
  2185. Index of file\&. Starting with 1\&. This is the same order with the files in multi\-file torrent\&.
  2186. .RE
  2187. .PP
  2188. path
  2189. .RS 4
  2190. File path\&.
  2191. .RE
  2192. .PP
  2193. length
  2194. .RS 4
  2195. File size in bytes\&.
  2196. .RE
  2197. .PP
  2198. selected
  2199. .RS 4
  2200. "true" if this file is selected by
  2201. \fB\-\-select\-file\fR
  2202. option\&. If
  2203. \fB\-\-select\-file\fR
  2204. is not specified or this is single torrent or no torrent download, this value is always "true"\&. Otherwise "false"\&.
  2205. .RE
  2206. .sp
  2207. \fBaria2\&.getPeers\fR \fIgid\fR
  2208. .sp
  2209. This method returns peer list of the download denoted by \fIgid\fR\&. \fIgid\fR is of type string\&. This method is for BitTorrent only\&. The response is of type array and its element is of type struct and it contains following keys\&. The value type is string\&.
  2210. .PP
  2211. peerId
  2212. .RS 4
  2213. Percent\-encoded peer ID\&.
  2214. .RE
  2215. .PP
  2216. ip
  2217. .RS 4
  2218. IP address of the peer\&.
  2219. .RE
  2220. .PP
  2221. port
  2222. .RS 4
  2223. Port number of the peer\&.
  2224. .RE
  2225. .PP
  2226. bitfield
  2227. .RS 4
  2228. Hexadecimal representation of the download progress of the peer\&. The highest bit corresponds to piece index 0\&. The set bits indicate the piece is available and unset bits indicate the piece is missing\&. The spare bits at the end are set to zero\&.
  2229. .RE
  2230. .PP
  2231. amChoking
  2232. .RS 4
  2233. "true" if this client is choking the peer\&. Otherwise "false"\&.
  2234. .RE
  2235. .PP
  2236. peerChoking
  2237. .RS 4
  2238. "true" if the peer is choking this client\&. Otherwise "false"\&.
  2239. .RE
  2240. .PP
  2241. downloadSpeed
  2242. .RS 4
  2243. Download speed (byte/sec) that this client obtains from the peer\&.
  2244. .RE
  2245. .PP
  2246. uploadSpeed
  2247. .RS 4
  2248. Upload speed(byte/sec) that this client uploads to the peer\&.
  2249. .RE
  2250. .PP
  2251. seeder
  2252. .RS 4
  2253. "true" is this client is a seeder\&. Otherwise "false"\&.
  2254. .RE
  2255. .sp
  2256. \fBaria2\&.tellActive\fR
  2257. .sp
  2258. This method returns the list of active downloads\&. The respose is of type array and its element is the same struct returned by \fBaria2\&.tellStatus\fR method\&.
  2259. .sp
  2260. \fBaria2\&.tellWaiting\fR \fIoffset, num\fR
  2261. .sp
  2262. This method returns the list of waiting download in the range of [\fIoffset\fR, \fIoffset\fR+\fInum\fR)\&. \fIoffset\fR is of type integer and specifies the offset from the download waiting at the front\&. \fInum\fR is of type integer and specifies the number of downloads to be returned\&. For example, imagine that three downloads "A","B" and "C" are waiting in this order\&. aria2\&.tellWaiting(0, 1) returns "A"\&. aria2\&.tellWaiting(1, 2) returns "B" and "C"\&. The respose is of type array and its element is the same struct returned by \fBaria2\&.tellStatus\fR method\&.
  2263. .sp
  2264. \fBaria2\&.changeOption\fR \fIgid, options\fR
  2265. .sp
  2266. This method changes options of the download denoted by \fIgid\fR dynamically\&. \fIgid\fR is of type string\&. \fIoptions\fR is of type struct and the available options are \fBmax\-download\-limit\fR and \fBmax\-upload\-limit\fR\&. This method returns "OK" for success\&.
  2267. .sp
  2268. \fBaria2\&.changeGlobalOption\fR \fIoptions\fR
  2269. .sp
  2270. This method changes global options dynamically\&. \fIoptions\fR is of type struct and the available options are \fBmax\-concurrent\-downloads\fR, \fBmax\-overall\-download\-limit\fR and \fBmax\-overall\-upload\-limit\fR\&. This method returns "OK" for success\&.
  2271. .sp
  2272. \fBaria2\&.purgeDownloadResult\fR
  2273. .sp
  2274. This method purges completed/error/removed downloads to free memory\&. This method returns "OK"\&.
  2275. .sp
  2276. \fBaria2\&.getVersion\fR
  2277. .sp
  2278. This method returns version of the program and the list of enabled features\&. The response is of type struct and contains following keys\&.
  2279. .PP
  2280. version
  2281. .RS 4
  2282. Version number of the program in string\&.
  2283. .RE
  2284. .PP
  2285. enabledFeatures
  2286. .RS 4
  2287. List of enabled features\&. Each feature name is of type string\&.
  2288. .RE
  2289. .SS "Error Handling"
  2290. .sp
  2291. In case of error, aria2 returns faultCode=1 and the error message in faultString\&.
  2292. .SS "Options"
  2293. .sp
  2294. Same options for \fB\-i\fR list are available\&. See \fBInput File\fR subsection for complete list of options\&.
  2295. .sp
  2296. In the option struct, name element is option name(without preceeding "\-\-") and value element is argument as string\&.
  2297. .sp
  2298. .if n \{\
  2299. .RS 4
  2300. .\}
  2301. .nf
  2302. <struct>
  2303. <member>
  2304. <name>split</name>
  2305. <value><string>1</string></value>
  2306. </member>
  2307. <member>
  2308. <name>http\-proxy</name>
  2309. <value><string>http://proxy/</string></value>
  2310. </member>
  2311. </struct>
  2312. .fi
  2313. .if n \{\
  2314. .RE
  2315. .\}
  2316. .sp
  2317. \fBheader\fR and \fBindex\-out\fR option are allowed multiple times in command\-line\&. Since name should be unique in struct(many XML\-RPC library implementation uses hash or dict for struct), single string is not enough\&. To overcome this situation, they can take array as value as well as string\&.
  2318. .sp
  2319. .if n \{\
  2320. .RS 4
  2321. .\}
  2322. .nf
  2323. <struct>
  2324. <member>
  2325. <name>header</name>
  2326. <value>
  2327. <array>
  2328. <data>
  2329. <value><string>Accept\-Language: ja</string></value>
  2330. <value><string>Accept\-Charset: utf\-8</string></value>
  2331. </data>
  2332. </array>
  2333. </value>
  2334. </member>
  2335. </struct>
  2336. .fi
  2337. .if n \{\
  2338. .RE
  2339. .\}
  2340. .SS "Sample XML\-RPC Client Code"
  2341. .sp
  2342. The following Ruby script adds \fIhttp://localhost/aria2\&.tar\&.bz2\fR to aria2c operated on localhost with option \fB\-\-dir\fR=\fI/downloads\fR and prints its reponse\&.
  2343. .sp
  2344. .if n \{\
  2345. .RS 4
  2346. .\}
  2347. .nf
  2348. #!/usr/bin/env ruby
  2349. require \'xmlrpc/client\'
  2350. require \'pp\'
  2351. client=XMLRPC::Client\&.new2("http://localhost:6800/rpc")
  2352. options={ "dir" => "/downloads" }
  2353. result=client\&.call("aria2\&.addUri", [ "http://localhost/aria2\&.tar\&.bz2" ], options)
  2354. pp result
  2355. .fi
  2356. .if n \{\
  2357. .RE
  2358. .\}
  2359. .SH "EXAMPLE"
  2360. .SS "HTTP/FTP Segmented Download"
  2361. .sp
  2362. .it 1 an-trap
  2363. .nr an-no-space-flag 1
  2364. .nr an-break-flag 1
  2365. .br
  2366. .ps +1
  2367. \fBDownload a file\fR
  2368. .RS 4
  2369. .sp
  2370. .if n \{\
  2371. .RS 4
  2372. .\}
  2373. .nf
  2374. aria2c "http://host/file\&.zip"
  2375. .fi
  2376. .if n \{\
  2377. .RE
  2378. .\}
  2379. .if n \{\
  2380. .sp
  2381. .\}
  2382. .RS 4
  2383. .it 1 an-trap
  2384. .nr an-no-space-flag 1
  2385. .nr an-break-flag 1
  2386. .br
  2387. .ps +1
  2388. \fBNote\fR
  2389. .ps -1
  2390. .br
  2391. .sp
  2392. aria2 uses 5 connections to download 1 file by default\&.
  2393. .sp .5v
  2394. .RE
  2395. .RE
  2396. .sp
  2397. .it 1 an-trap
  2398. .nr an-no-space-flag 1
  2399. .nr an-break-flag 1
  2400. .br
  2401. .ps +1
  2402. \fBDownload a file using 1 connection\fR
  2403. .RS 4
  2404. .sp
  2405. .if n \{\
  2406. .RS 4
  2407. .\}
  2408. .nf
  2409. aria2c \-s1 "http://host/file\&.zip"
  2410. .fi
  2411. .if n \{\
  2412. .RE
  2413. .\}
  2414. .if n \{\
  2415. .sp
  2416. .\}
  2417. .RS 4
  2418. .it 1 an-trap
  2419. .nr an-no-space-flag 1
  2420. .nr an-break-flag 1
  2421. .br
  2422. .ps +1
  2423. \fBNote\fR
  2424. .ps -1
  2425. .br
  2426. .sp
  2427. aria2 uses 5 connections to download 1 file by default\&. \-s1 limits the number of connections to just 1\&.
  2428. .sp .5v
  2429. .RE
  2430. .if n \{\
  2431. .sp
  2432. .\}
  2433. .RS 4
  2434. .it 1 an-trap
  2435. .nr an-no-space-flag 1
  2436. .nr an-break-flag 1
  2437. .br
  2438. .ps +1
  2439. \fBNote\fR
  2440. .ps -1
  2441. .br
  2442. .sp
  2443. To pause a download, press Ctrl\-C\&. You can resume the transfer by running aria2c with the same argument in the same directory\&. You can change URLs as long as they are pointing to the same file\&.
  2444. .sp .5v
  2445. .RE
  2446. .RE
  2447. .sp
  2448. .it 1 an-trap
  2449. .nr an-no-space-flag 1
  2450. .nr an-break-flag 1
  2451. .br
  2452. .ps +1
  2453. \fBDownload a file from 2 different HTTP servers\fR
  2454. .RS 4
  2455. .sp
  2456. .if n \{\
  2457. .RS 4
  2458. .\}
  2459. .nf
  2460. aria2c "http://host/file\&.zip" "http://mirror/file\&.zip"
  2461. .fi
  2462. .if n \{\
  2463. .RE
  2464. .\}
  2465. .RE
  2466. .sp
  2467. .it 1 an-trap
  2468. .nr an-no-space-flag 1
  2469. .nr an-break-flag 1
  2470. .br
  2471. .ps +1
  2472. \fBDownload a file from HTTP and FTP servers\fR
  2473. .RS 4
  2474. .sp
  2475. .if n \{\
  2476. .RS 4
  2477. .\}
  2478. .nf
  2479. aria2c "http://host1/file\&.zip" "ftp://host2/file\&.zip"
  2480. .fi
  2481. .if n \{\
  2482. .RE
  2483. .\}
  2484. .RE
  2485. .sp
  2486. .it 1 an-trap
  2487. .nr an-no-space-flag 1
  2488. .nr an-break-flag 1
  2489. .br
  2490. .ps +1
  2491. \fBDownload files listed in a text file concurrently\fR
  2492. .RS 4
  2493. .sp
  2494. .if n \{\
  2495. .RS 4
  2496. .\}
  2497. .nf
  2498. aria2c \-ifiles\&.txt \-j2
  2499. .fi
  2500. .if n \{\
  2501. .RE
  2502. .\}
  2503. .if n \{\
  2504. .sp
  2505. .\}
  2506. .RS 4
  2507. .it 1 an-trap
  2508. .nr an-no-space-flag 1
  2509. .nr an-break-flag 1
  2510. .br
  2511. .ps +1
  2512. \fBNote\fR
  2513. .ps -1
  2514. .br
  2515. .sp
  2516. \-j option specifies the number of parallel downloads\&.
  2517. .sp .5v
  2518. .RE
  2519. .RE
  2520. .sp
  2521. .it 1 an-trap
  2522. .nr an-no-space-flag 1
  2523. .nr an-break-flag 1
  2524. .br
  2525. .ps +1
  2526. \fBUsing proxy\fR
  2527. .RS 4
  2528. .sp
  2529. For HTTP:
  2530. .sp
  2531. .if n \{\
  2532. .RS 4
  2533. .\}
  2534. .nf
  2535. aria2c \-\-http\-proxy="http://proxy:8080" "http://host/file"
  2536. .fi
  2537. .if n \{\
  2538. .RE
  2539. .\}
  2540. .sp
  2541. For FTP:
  2542. .sp
  2543. .if n \{\
  2544. .RS 4
  2545. .\}
  2546. .nf
  2547. aria2c \-\-ftp\-proxy="http://proxy:8080" "ftp://host/file"
  2548. .fi
  2549. .if n \{\
  2550. .RE
  2551. .\}
  2552. .if n \{\
  2553. .sp
  2554. .\}
  2555. .RS 4
  2556. .it 1 an-trap
  2557. .nr an-no-space-flag 1
  2558. .nr an-break-flag 1
  2559. .br
  2560. .ps +1
  2561. \fBNote\fR
  2562. .ps -1
  2563. .br
  2564. .sp
  2565. See \fB\-\-http\-proxy\fR, \fB\-\-https\-proxy\fR, \fB\-\-ftp\-proxy\fR and \fB\-\-all\-proxy\fR for details\&. You can specify proxy in the environment variables\&. See \fBENVIRONMENT\fR section\&.
  2566. .sp .5v
  2567. .RE
  2568. .RE
  2569. .sp
  2570. .it 1 an-trap
  2571. .nr an-no-space-flag 1
  2572. .nr an-break-flag 1
  2573. .br
  2574. .ps +1
  2575. \fBProxy with authorization\fR
  2576. .RS 4
  2577. .sp
  2578. .if n \{\
  2579. .RS 4
  2580. .\}
  2581. .nf
  2582. aria2c \-\-http\-proxy="http://username:password@proxy:8080" "http://host/file"
  2583. .fi
  2584. .if n \{\
  2585. .RE
  2586. .\}
  2587. .RE
  2588. .SS "Metalink Download"
  2589. .sp
  2590. .it 1 an-trap
  2591. .nr an-no-space-flag 1
  2592. .nr an-break-flag 1
  2593. .br
  2594. .ps +1
  2595. \fBDownload files with remote Metalink\fR
  2596. .RS 4
  2597. .sp
  2598. .if n \{\
  2599. .RS 4
  2600. .\}
  2601. .nf
  2602. aria2c \-\-follow\-metalink=mem "http://host/file\&.metalink"
  2603. .fi
  2604. .if n \{\
  2605. .RE
  2606. .\}
  2607. .RE
  2608. .sp
  2609. .it 1 an-trap
  2610. .nr an-no-space-flag 1
  2611. .nr an-break-flag 1
  2612. .br
  2613. .ps +1
  2614. \fBDownload using a local metalink file\fR
  2615. .RS 4
  2616. .sp
  2617. .if n \{\
  2618. .RS 4
  2619. .\}
  2620. .nf
  2621. aria2c \-p \-\-lowest\-speed\-limit=4000 file\&.metalink
  2622. .fi
  2623. .if n \{\
  2624. .RE
  2625. .\}
  2626. .if n \{\
  2627. .sp
  2628. .\}
  2629. .RS 4
  2630. .it 1 an-trap
  2631. .nr an-no-space-flag 1
  2632. .nr an-break-flag 1
  2633. .br
  2634. .ps +1
  2635. \fBNote\fR
  2636. .ps -1
  2637. .br
  2638. .sp
  2639. To pause a download, press Ctrl\-C\&. You can resume the transfer by running aria2c with the same argument in the same directory\&.
  2640. .sp .5v
  2641. .RE
  2642. .RE
  2643. .sp
  2644. .it 1 an-trap
  2645. .nr an-no-space-flag 1
  2646. .nr an-break-flag 1
  2647. .br
  2648. .ps +1
  2649. \fBDownload several local metalink files\fR
  2650. .RS 4
  2651. .sp
  2652. .if n \{\
  2653. .RS 4
  2654. .\}
  2655. .nf
  2656. aria2c \-j2 file1\&.metalink file2\&.metalink
  2657. .fi
  2658. .if n \{\
  2659. .RE
  2660. .\}
  2661. .RE
  2662. .sp
  2663. .it 1 an-trap
  2664. .nr an-no-space-flag 1
  2665. .nr an-break-flag 1
  2666. .br
  2667. .ps +1
  2668. \fBDownload only selected files using index\fR
  2669. .RS 4
  2670. .sp
  2671. .if n \{\
  2672. .RS 4
  2673. .\}
  2674. .nf
  2675. aria2c \-\-select\-file=1\-4,8 file\&.metalink
  2676. .fi
  2677. .if n \{\
  2678. .RE
  2679. .\}
  2680. .if n \{\
  2681. .sp
  2682. .\}
  2683. .RS 4
  2684. .it 1 an-trap
  2685. .nr an-no-space-flag 1
  2686. .nr an-break-flag 1
  2687. .br
  2688. .ps +1
  2689. \fBNote\fR
  2690. .ps -1
  2691. .br
  2692. .sp
  2693. The index is printed to the console using \-S option\&.
  2694. .sp .5v
  2695. .RE
  2696. .RE
  2697. .sp
  2698. .it 1 an-trap
  2699. .nr an-no-space-flag 1
  2700. .nr an-break-flag 1
  2701. .br
  2702. .ps +1
  2703. \fBDownload a file using a local .metalink file with user preference\fR
  2704. .RS 4
  2705. .sp
  2706. .if n \{\
  2707. .RS 4
  2708. .\}
  2709. .nf
  2710. aria2c \-\-metalink\-location=JP,US \-\-metalink\-version=1\&.1 \-\-metalink\-language=en\-US file\&.metalink
  2711. .fi
  2712. .if n \{\
  2713. .RE
  2714. .\}
  2715. .RE
  2716. .SS "BitTorrent Download"
  2717. .sp
  2718. .it 1 an-trap
  2719. .nr an-no-space-flag 1
  2720. .nr an-break-flag 1
  2721. .br
  2722. .ps +1
  2723. \fBDownload files from remote BitTorrent file\fR
  2724. .RS 4
  2725. .sp
  2726. .if n \{\
  2727. .RS 4
  2728. .\}
  2729. .nf
  2730. aria2c \-\-follow\-torrent=mem "http://host/file\&.torrent"
  2731. .fi
  2732. .if n \{\
  2733. .RE
  2734. .\}
  2735. .RE
  2736. .sp
  2737. .it 1 an-trap
  2738. .nr an-no-space-flag 1
  2739. .nr an-break-flag 1
  2740. .br
  2741. .ps +1
  2742. \fBDownload using a local torrent file\fR
  2743. .RS 4
  2744. .sp
  2745. .if n \{\
  2746. .RS 4
  2747. .\}
  2748. .nf
  2749. aria2c \-\-max\-upload\-limit=40K file\&.torrent
  2750. .fi
  2751. .if n \{\
  2752. .RE
  2753. .\}
  2754. .if n \{\
  2755. .sp
  2756. .\}
  2757. .RS 4
  2758. .it 1 an-trap
  2759. .nr an-no-space-flag 1
  2760. .nr an-break-flag 1
  2761. .br
  2762. .ps +1
  2763. \fBNote\fR
  2764. .ps -1
  2765. .br
  2766. .sp
  2767. \-\-max\-upload\-limit specifies the max of upload rate\&.
  2768. .sp .5v
  2769. .RE
  2770. .if n \{\
  2771. .sp
  2772. .\}
  2773. .RS 4
  2774. .it 1 an-trap
  2775. .nr an-no-space-flag 1
  2776. .nr an-break-flag 1
  2777. .br
  2778. .ps +1
  2779. \fBNote\fR
  2780. .ps -1
  2781. .br
  2782. .sp
  2783. To pause a download, press Ctrl\-C\&. You can resume the transfer by running aria2c with the same argument in the same directory\&.
  2784. .sp .5v
  2785. .RE
  2786. .RE
  2787. .sp
  2788. .it 1 an-trap
  2789. .nr an-no-space-flag 1
  2790. .nr an-break-flag 1
  2791. .br
  2792. .ps +1
  2793. \fBDownload 2 torrents\fR
  2794. .RS 4
  2795. .sp
  2796. .if n \{\
  2797. .RS 4
  2798. .\}
  2799. .nf
  2800. aria2c \-j2 file1\&.torrent file2\&.torrent
  2801. .fi
  2802. .if n \{\
  2803. .RE
  2804. .\}
  2805. .RE
  2806. .sp
  2807. .it 1 an-trap
  2808. .nr an-no-space-flag 1
  2809. .nr an-break-flag 1
  2810. .br
  2811. .ps +1
  2812. \fBDownload a file using torrent and HTTP/FTP server\fR
  2813. .RS 4
  2814. .sp
  2815. .if n \{\
  2816. .RS 4
  2817. .\}
  2818. .nf
  2819. aria2c \-Ttest\&.torrent "http://host1/file" "ftp://host2/file"
  2820. .fi
  2821. .if n \{\
  2822. .RE
  2823. .\}
  2824. .if n \{\
  2825. .sp
  2826. .\}
  2827. .RS 4
  2828. .it 1 an-trap
  2829. .nr an-no-space-flag 1
  2830. .nr an-break-flag 1
  2831. .br
  2832. .ps +1
  2833. \fBNote\fR
  2834. .ps -1
  2835. .br
  2836. .sp
  2837. Downloading multi file torrent with HTTP/FTP is not supported\&.
  2838. .sp .5v
  2839. .RE
  2840. .RE
  2841. .sp
  2842. .it 1 an-trap
  2843. .nr an-no-space-flag 1
  2844. .nr an-break-flag 1
  2845. .br
  2846. .ps +1
  2847. \fBDownload only selected files using index(usually called "selectable download")\fR
  2848. .RS 4
  2849. .sp
  2850. .if n \{\
  2851. .RS 4
  2852. .\}
  2853. .nf
  2854. aria2c \-\-select\-file=1\-4,8 file\&.torrent
  2855. .fi
  2856. .if n \{\
  2857. .RE
  2858. .\}
  2859. .if n \{\
  2860. .sp
  2861. .\}
  2862. .RS 4
  2863. .it 1 an-trap
  2864. .nr an-no-space-flag 1
  2865. .nr an-break-flag 1
  2866. .br
  2867. .ps +1
  2868. \fBNote\fR
  2869. .ps -1
  2870. .br
  2871. .sp
  2872. The index is printed to the console using \-S option\&.
  2873. .sp .5v
  2874. .RE
  2875. .RE
  2876. .sp
  2877. .it 1 an-trap
  2878. .nr an-no-space-flag 1
  2879. .nr an-break-flag 1
  2880. .br
  2881. .ps +1
  2882. \fBSpecify output filename\fR
  2883. .RS 4
  2884. .sp
  2885. To specify output filename for BitTorrent downloads, you need to know the index of file in torrent file using \fB\-S\fR option\&. For example, the output looks like this:
  2886. .sp
  2887. .if n \{\
  2888. .RS 4
  2889. .\}
  2890. .nf
  2891. idx|path/length
  2892. ===+======================
  2893. 1|dist/base\-2\&.6\&.18\&.iso
  2894. |99\&.9MiB
  2895. \-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
  2896. 2|dist/driver\-2\&.6\&.18\&.iso
  2897. |169\&.0MiB
  2898. \-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
  2899. .fi
  2900. .if n \{\
  2901. .RE
  2902. .\}
  2903. .sp
  2904. To save \fIdist/base\-2\&.6\&.18\&.iso\fR in \fI/tmp/mydir/base\&.iso\fR and \fIdist/driver\-2\&.6\&.18\&.iso\fR in \fI/tmp/dir/driver\&.iso\fR, use the following command:
  2905. .sp
  2906. .if n \{\
  2907. .RS 4
  2908. .\}
  2909. .nf
  2910. aria2c \-\-dir=/tmp \-\-index\-out=1=mydir/base\&.iso \-\-index\-out=2=dir/driver\&.iso file\&.torrent
  2911. .fi
  2912. .if n \{\
  2913. .RE
  2914. .\}
  2915. .RE
  2916. .sp
  2917. .it 1 an-trap
  2918. .nr an-no-space-flag 1
  2919. .nr an-break-flag 1
  2920. .br
  2921. .ps +1
  2922. \fBChange the listening port for incoming peer\fR
  2923. .RS 4
  2924. .sp
  2925. .if n \{\
  2926. .RS 4
  2927. .\}
  2928. .nf
  2929. aria2c \-\-listen\-port=7000\-7001,8000 file\&.torrent
  2930. .fi
  2931. .if n \{\
  2932. .RE
  2933. .\}
  2934. .if n \{\
  2935. .sp
  2936. .\}
  2937. .RS 4
  2938. .it 1 an-trap
  2939. .nr an-no-space-flag 1
  2940. .nr an-break-flag 1
  2941. .br
  2942. .ps +1
  2943. \fBNote\fR
  2944. .ps -1
  2945. .br
  2946. .sp
  2947. Since aria2 doesn\(cqt configure firewall or router for port forwarding, it\(cqs up to you to do it manually\&.
  2948. .sp .5v
  2949. .RE
  2950. .RE
  2951. .sp
  2952. .it 1 an-trap
  2953. .nr an-no-space-flag 1
  2954. .nr an-break-flag 1
  2955. .br
  2956. .ps +1
  2957. \fBSpecify the condition to stop program after torrent download finished\fR
  2958. .RS 4
  2959. .sp
  2960. .if n \{\
  2961. .RS 4
  2962. .\}
  2963. .nf
  2964. aria2c \-\-seed\-time=120 \-\-seed\-ratio=1\&.0 file\&.torrent
  2965. .fi
  2966. .if n \{\
  2967. .RE
  2968. .\}
  2969. .if n \{\
  2970. .sp
  2971. .\}
  2972. .RS 4
  2973. .it 1 an-trap
  2974. .nr an-no-space-flag 1
  2975. .nr an-break-flag 1
  2976. .br
  2977. .ps +1
  2978. \fBNote\fR
  2979. .ps -1
  2980. .br
  2981. .sp
  2982. In the above example, the program exits when the 120 minutes has elapsed since download completed or seed ratio reaches 1\&.0\&.
  2983. .sp .5v
  2984. .RE
  2985. .RE
  2986. .sp
  2987. .it 1 an-trap
  2988. .nr an-no-space-flag 1
  2989. .nr an-break-flag 1
  2990. .br
  2991. .ps +1
  2992. \fBThrottle upload speed\fR
  2993. .RS 4
  2994. .sp
  2995. .if n \{\
  2996. .RS 4
  2997. .\}
  2998. .nf
  2999. aria2c \-\-max\-upload\-limit=100K file\&.torrent
  3000. .fi
  3001. .if n \{\
  3002. .RE
  3003. .\}
  3004. .RE
  3005. .sp
  3006. .it 1 an-trap
  3007. .nr an-no-space-flag 1
  3008. .nr an-break-flag 1
  3009. .br
  3010. .ps +1
  3011. \fBEnable DHT\fR
  3012. .RS 4
  3013. .sp
  3014. .if n \{\
  3015. .RS 4
  3016. .\}
  3017. .nf
  3018. aria2c \-\-enable\-dht \-\-dht\-listen\-port=6881 file\&.torrent
  3019. .fi
  3020. .if n \{\
  3021. .RE
  3022. .\}
  3023. .if n \{\
  3024. .sp
  3025. .\}
  3026. .RS 4
  3027. .it 1 an-trap
  3028. .nr an-no-space-flag 1
  3029. .nr an-break-flag 1
  3030. .br
  3031. .ps +1
  3032. \fBNote\fR
  3033. .ps -1
  3034. .br
  3035. .sp
  3036. DHT uses udp port\&. Since aria2 doesn\(cqt configure firewall or router for port forwarding, it\(cqs up to you to do it manually\&.
  3037. .sp .5v
  3038. .RE
  3039. .RE
  3040. .SS "More advanced HTTP features"
  3041. .sp
  3042. .it 1 an-trap
  3043. .nr an-no-space-flag 1
  3044. .nr an-break-flag 1
  3045. .br
  3046. .ps +1
  3047. \fBLoad cookies\fR
  3048. .RS 4
  3049. .sp
  3050. .if n \{\
  3051. .RS 4
  3052. .\}
  3053. .nf
  3054. aria2c \-\-load\-cookies=cookies\&.txt "http://host/file\&.zip"
  3055. .fi
  3056. .if n \{\
  3057. .RE
  3058. .\}
  3059. .if n \{\
  3060. .sp
  3061. .\}
  3062. .RS 4
  3063. .it 1 an-trap
  3064. .nr an-no-space-flag 1
  3065. .nr an-break-flag 1
  3066. .br
  3067. .ps +1
  3068. \fBNote\fR
  3069. .ps -1
  3070. .br
  3071. .sp
  3072. You can use Firefox/Mozilla\(cqs cookie file without modification\&.
  3073. .sp .5v
  3074. .RE
  3075. .RE
  3076. .sp
  3077. .it 1 an-trap
  3078. .nr an-no-space-flag 1
  3079. .nr an-break-flag 1
  3080. .br
  3081. .ps +1
  3082. \fBResume download started by web browsers or another programs\fR
  3083. .RS 4
  3084. .sp
  3085. .if n \{\
  3086. .RS 4
  3087. .\}
  3088. .nf
  3089. aria2c \-c \-s2 "http://host/partiallydownloadedfile\&.zip"
  3090. .fi
  3091. .if n \{\
  3092. .RE
  3093. .\}
  3094. .RE
  3095. .sp
  3096. .it 1 an-trap
  3097. .nr an-no-space-flag 1
  3098. .nr an-break-flag 1
  3099. .br
  3100. .ps +1
  3101. \fBClient certificate authorization for SSL/TLS\fR
  3102. .RS 4
  3103. .sp
  3104. .if n \{\
  3105. .RS 4
  3106. .\}
  3107. .nf
  3108. aria2c \-\-certificate=/path/to/mycert\&.pem \-\-private\-key=/path/to/mykey\&.pem https://host/file
  3109. .fi
  3110. .if n \{\
  3111. .RE
  3112. .\}
  3113. .if n \{\
  3114. .sp
  3115. .\}
  3116. .RS 4
  3117. .it 1 an-trap
  3118. .nr an-no-space-flag 1
  3119. .nr an-break-flag 1
  3120. .br
  3121. .ps +1
  3122. \fBNote\fR
  3123. .ps -1
  3124. .br
  3125. .sp
  3126. The file specified in \fB\-\-private\-key\fR must be decrypted\&. The behavior when encrypted one is given is undefined\&.
  3127. .sp .5v
  3128. .RE
  3129. .RE
  3130. .sp
  3131. .it 1 an-trap
  3132. .nr an-no-space-flag 1
  3133. .nr an-break-flag 1
  3134. .br
  3135. .ps +1
  3136. \fBVerify peer in SSL/TLS using given CA certificates\fR
  3137. .RS 4
  3138. .sp
  3139. .if n \{\
  3140. .RS 4
  3141. .\}
  3142. .nf
  3143. aria2c \-\-ca\-certificate=/path/to/ca\-certificates\&.crt \-\-check\-certificate https://host/file
  3144. .fi
  3145. .if n \{\
  3146. .RE
  3147. .\}
  3148. .RE
  3149. .SS "And more advanced features"
  3150. .sp
  3151. .it 1 an-trap
  3152. .nr an-no-space-flag 1
  3153. .nr an-break-flag 1
  3154. .br
  3155. .ps +1
  3156. \fBThrottle download speed\fR
  3157. .RS 4
  3158. .sp
  3159. .if n \{\
  3160. .RS 4
  3161. .\}
  3162. .nf
  3163. aria2c \-\-max\-download\-limit=100K file\&.metalink
  3164. .fi
  3165. .if n \{\
  3166. .RE
  3167. .\}
  3168. .RE
  3169. .sp
  3170. .it 1 an-trap
  3171. .nr an-no-space-flag 1
  3172. .nr an-break-flag 1
  3173. .br
  3174. .ps +1
  3175. \fBRepair a damaged download using -V option\fR
  3176. .RS 4
  3177. .sp
  3178. .if n \{\
  3179. .RS 4
  3180. .\}
  3181. .nf
  3182. aria2c \-V file\&.metalink
  3183. .fi
  3184. .if n \{\
  3185. .RE
  3186. .\}
  3187. .if n \{\
  3188. .sp
  3189. .\}
  3190. .RS 4
  3191. .it 1 an-trap
  3192. .nr an-no-space-flag 1
  3193. .nr an-break-flag 1
  3194. .br
  3195. .ps +1
  3196. \fBNote\fR
  3197. .ps -1
  3198. .br
  3199. .sp
  3200. This option is only available used with BitTorrent or metalink with chunk checksums\&.
  3201. .sp .5v
  3202. .RE
  3203. .RE
  3204. .sp
  3205. .it 1 an-trap
  3206. .nr an-no-space-flag 1
  3207. .nr an-break-flag 1
  3208. .br
  3209. .ps +1
  3210. \fBDrop connection if download speed is lower than specified value\fR
  3211. .RS 4
  3212. .sp
  3213. .if n \{\
  3214. .RS 4
  3215. .\}
  3216. .nf
  3217. aria2c \-\-lowest\-speed\-limit=10K file\&.metalink
  3218. .fi
  3219. .if n \{\
  3220. .RE
  3221. .\}
  3222. .RE
  3223. .sp
  3224. .it 1 an-trap
  3225. .nr an-no-space-flag 1
  3226. .nr an-break-flag 1
  3227. .br
  3228. .ps +1
  3229. \fBParameterized URI support\fR
  3230. .RS 4
  3231. .sp
  3232. You can specify set of parts:
  3233. .sp
  3234. .if n \{\
  3235. .RS 4
  3236. .\}
  3237. .nf
  3238. aria2c \-P "http://{host1,host2,host3}/file\&.iso"
  3239. .fi
  3240. .if n \{\
  3241. .RE
  3242. .\}
  3243. .sp
  3244. You can specify numeric sequence:
  3245. .sp
  3246. .if n \{\
  3247. .RS 4
  3248. .\}
  3249. .nf
  3250. aria2c \-Z \-P "http://host/image[000\-100]\&.png"
  3251. .fi
  3252. .if n \{\
  3253. .RE
  3254. .\}
  3255. .sp
  3256. .if n \{\
  3257. .sp
  3258. .\}
  3259. .RS 4
  3260. .it 1 an-trap
  3261. .nr an-no-space-flag 1
  3262. .nr an-break-flag 1
  3263. .br
  3264. .ps +1
  3265. \fBNote\fR
  3266. .ps -1
  3267. .br
  3268. .sp
  3269. \-Z option is required if the all URIs don\(cqt point to the same file, such as the above example\&.
  3270. .sp .5v
  3271. .RE
  3272. .sp
  3273. You can specify step counter:
  3274. .sp
  3275. .if n \{\
  3276. .RS 4
  3277. .\}
  3278. .nf
  3279. aria2c \-Z \-P "http://host/image[A\-Z:2]\&.png"
  3280. .fi
  3281. .if n \{\
  3282. .RE
  3283. .\}
  3284. .RE
  3285. .sp
  3286. .it 1 an-trap
  3287. .nr an-no-space-flag 1
  3288. .nr an-break-flag 1
  3289. .br
  3290. .ps +1
  3291. \fBParallel downloads of arbitrary number of URL,metalink,torrent\fR
  3292. .RS 4
  3293. .sp
  3294. .if n \{\
  3295. .RS 4
  3296. .\}
  3297. .nf
  3298. aria2c \-j3 \-Z "http://host/file1" file2\&.torrent file3\&.metalink
  3299. .fi
  3300. .if n \{\
  3301. .RE
  3302. .\}
  3303. .RE
  3304. .sp
  3305. .it 1 an-trap
  3306. .nr an-no-space-flag 1
  3307. .nr an-break-flag 1
  3308. .br
  3309. .ps +1
  3310. \fBBitTorrent Encryption\fR
  3311. .RS 4
  3312. .sp
  3313. Encrypt whole payload using ARC4:
  3314. .sp
  3315. .if n \{\
  3316. .RS 4
  3317. .\}
  3318. .nf
  3319. aria2c \-\-bt\-min\-crypto\-level=arc4 \-\-bt\-require\-crypto=true file\&.torrent
  3320. .fi
  3321. .if n \{\
  3322. .RE
  3323. .\}
  3324. .RE
  3325. .SH "SEE ALSO"
  3326. .sp
  3327. Project Web Site: http://aria2\&.sourceforge\&.net/
  3328. .sp
  3329. aria2 Wiki: http://sourceforge\&.net/apps/trac/aria2/wiki
  3330. .sp
  3331. Metalink Homepage: http://www\&.metalinker\&.org/
  3332. .SH "COPYRIGHT"
  3333. .sp
  3334. Copyright \(co 2006, 2009 Tatsuhiro Tsujikawa
  3335. .sp
  3336. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version\&.
  3337. .sp
  3338. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&.
  3339. .sp
  3340. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc\&., 51 Franklin Street, Fifth Floor, Boston, MA 02110\-1301 USA
  3341. .sp
  3342. In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library under certain conditions as described in each individual source file, and distribute linked combinations including the two\&. You must obey the GNU General Public License in all respects for all of the code used other than OpenSSL\&. If you modify file(s) with this exception, you may extend this exception to your version of the file(s), but you are not obligated to do so\&. If you do not wish to do so, delete this exception statement from your version\&. If you delete this exception statement from all source files in the program, then also delete it here\&.