aria2c.1 71 KB

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