aria2c.1 73 KB

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