aria2c.1.html 117 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  2. "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  6. <meta name="generator" content="AsciiDoc 8.5.1" />
  7. <title>ARIA2C(1)</title>
  8. <style type="text/css">
  9. /* Debug borders */
  10. p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
  11. /*
  12. border: 1px solid red;
  13. */
  14. }
  15. body {
  16. margin: 1em 5% 1em 5%;
  17. }
  18. a {
  19. color: blue;
  20. text-decoration: underline;
  21. }
  22. a:visited {
  23. color: fuchsia;
  24. }
  25. em {
  26. font-style: italic;
  27. color: navy;
  28. }
  29. strong {
  30. font-weight: bold;
  31. color: #083194;
  32. }
  33. tt {
  34. color: navy;
  35. }
  36. h1, h2, h3, h4, h5, h6 {
  37. color: #527bbd;
  38. font-family: sans-serif;
  39. margin-top: 1.2em;
  40. margin-bottom: 0.5em;
  41. line-height: 1.3;
  42. }
  43. h1, h2, h3 {
  44. border-bottom: 2px solid silver;
  45. }
  46. h2 {
  47. padding-top: 0.5em;
  48. }
  49. h3 {
  50. float: left;
  51. }
  52. h3 + * {
  53. clear: left;
  54. }
  55. div.sectionbody {
  56. font-family: serif;
  57. margin-left: 0;
  58. }
  59. hr {
  60. border: 1px solid silver;
  61. }
  62. p {
  63. margin-top: 0.5em;
  64. margin-bottom: 0.5em;
  65. }
  66. ul, ol, li > p {
  67. margin-top: 0;
  68. }
  69. pre {
  70. padding: 0;
  71. margin: 0;
  72. }
  73. span#author {
  74. color: #527bbd;
  75. font-family: sans-serif;
  76. font-weight: bold;
  77. font-size: 1.1em;
  78. }
  79. span#email {
  80. }
  81. span#revnumber, span#revdate, span#revremark {
  82. font-family: sans-serif;
  83. }
  84. div#footer {
  85. font-family: sans-serif;
  86. font-size: small;
  87. border-top: 2px solid silver;
  88. padding-top: 0.5em;
  89. margin-top: 4.0em;
  90. }
  91. div#footer-text {
  92. float: left;
  93. padding-bottom: 0.5em;
  94. }
  95. div#footer-badges {
  96. float: right;
  97. padding-bottom: 0.5em;
  98. }
  99. div#preamble {
  100. margin-top: 1.5em;
  101. margin-bottom: 1.5em;
  102. }
  103. div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
  104. div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
  105. div.admonitionblock {
  106. margin-top: 0.25em;
  107. margin-bottom: 1.5em;
  108. }
  109. div.admonitionblock {
  110. margin-top: 2.5em;
  111. margin-bottom: 2.5em;
  112. }
  113. div.content { /* Block element content. */
  114. padding: 0;
  115. }
  116. /* Block element titles. */
  117. div.title, caption.title {
  118. color: #527bbd;
  119. font-family: sans-serif;
  120. font-weight: bold;
  121. text-align: left;
  122. margin-top: 1.0em;
  123. margin-bottom: 0.5em;
  124. }
  125. div.title + * {
  126. margin-top: 0;
  127. }
  128. td div.title:first-child {
  129. margin-top: 0.0em;
  130. }
  131. div.content div.title:first-child {
  132. margin-top: 0.0em;
  133. }
  134. div.content + div.title {
  135. margin-top: 0.0em;
  136. }
  137. div.sidebarblock > div.content {
  138. background: #ffffee;
  139. border: 1px solid silver;
  140. padding: 0.5em;
  141. }
  142. div.listingblock > div.content {
  143. border: 1px solid silver;
  144. background: #f4f4f4;
  145. padding: 0.5em;
  146. }
  147. div.quoteblock {
  148. padding-left: 2.0em;
  149. margin-right: 10%;
  150. }
  151. div.quoteblock > div.attribution {
  152. padding-top: 0.5em;
  153. text-align: right;
  154. }
  155. div.verseblock {
  156. padding-left: 2.0em;
  157. margin-right: 10%;
  158. }
  159. div.verseblock > div.content {
  160. white-space: pre;
  161. }
  162. div.verseblock > div.attribution {
  163. padding-top: 0.75em;
  164. text-align: left;
  165. }
  166. /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
  167. div.verseblock + div.attribution {
  168. text-align: left;
  169. }
  170. div.admonitionblock .icon {
  171. vertical-align: top;
  172. font-size: 1.1em;
  173. font-weight: bold;
  174. text-decoration: underline;
  175. color: #527bbd;
  176. padding-right: 0.5em;
  177. }
  178. div.admonitionblock td.content {
  179. padding-left: 0.5em;
  180. border-left: 2px solid silver;
  181. }
  182. div.exampleblock > div.content {
  183. border-left: 2px solid silver;
  184. padding: 0.5em;
  185. }
  186. div.imageblock div.content { padding-left: 0; }
  187. span.image img { border-style: none; }
  188. a.image:visited { color: white; }
  189. dl {
  190. margin-top: 0.8em;
  191. margin-bottom: 0.8em;
  192. }
  193. dt {
  194. margin-top: 0.5em;
  195. margin-bottom: 0;
  196. font-style: normal;
  197. color: navy;
  198. }
  199. dd > *:first-child {
  200. margin-top: 0.1em;
  201. }
  202. ul, ol {
  203. list-style-position: outside;
  204. }
  205. ol.arabic {
  206. list-style-type: decimal;
  207. }
  208. ol.loweralpha {
  209. list-style-type: lower-alpha;
  210. }
  211. ol.upperalpha {
  212. list-style-type: upper-alpha;
  213. }
  214. ol.lowerroman {
  215. list-style-type: lower-roman;
  216. }
  217. ol.upperroman {
  218. list-style-type: upper-roman;
  219. }
  220. div.compact ul, div.compact ol,
  221. div.compact p, div.compact p,
  222. div.compact div, div.compact div {
  223. margin-top: 0.1em;
  224. margin-bottom: 0.1em;
  225. }
  226. div.tableblock > table {
  227. border: 3px solid #527bbd;
  228. }
  229. thead {
  230. font-family: sans-serif;
  231. font-weight: bold;
  232. }
  233. tfoot {
  234. font-weight: bold;
  235. }
  236. td > div.verse {
  237. white-space: pre;
  238. }
  239. p.table {
  240. margin-top: 0;
  241. }
  242. /* Because the table frame attribute is overriden by CSS in most browsers. */
  243. div.tableblock > table[frame="void"] {
  244. border-style: none;
  245. }
  246. div.tableblock > table[frame="hsides"] {
  247. border-left-style: none;
  248. border-right-style: none;
  249. }
  250. div.tableblock > table[frame="vsides"] {
  251. border-top-style: none;
  252. border-bottom-style: none;
  253. }
  254. div.hdlist {
  255. margin-top: 0.8em;
  256. margin-bottom: 0.8em;
  257. }
  258. div.hdlist tr {
  259. padding-bottom: 15px;
  260. }
  261. dt.hdlist1.strong, td.hdlist1.strong {
  262. font-weight: bold;
  263. }
  264. td.hdlist1 {
  265. vertical-align: top;
  266. font-style: normal;
  267. padding-right: 0.8em;
  268. color: navy;
  269. }
  270. td.hdlist2 {
  271. vertical-align: top;
  272. }
  273. div.hdlist.compact tr {
  274. margin: 0;
  275. padding-bottom: 0;
  276. }
  277. .comment {
  278. background: yellow;
  279. }
  280. .footnote, .footnoteref {
  281. font-size: 0.8em;
  282. }
  283. span.footnote, span.footnoteref {
  284. vertical-align: super;
  285. }
  286. #footnotes {
  287. margin: 20px 0 20px 0;
  288. padding: 7px 0 0 0;
  289. }
  290. #footnotes div.footnote {
  291. margin: 0 0 5px 0;
  292. }
  293. #footnotes hr {
  294. border: none;
  295. border-top: 1px solid silver;
  296. height: 1px;
  297. text-align: left;
  298. margin-left: 0;
  299. width: 20%;
  300. min-width: 100px;
  301. }
  302. @media print {
  303. div#footer-badges { display: none; }
  304. }
  305. div#toctitle {
  306. color: #527bbd;
  307. font-family: sans-serif;
  308. font-size: 1.1em;
  309. font-weight: bold;
  310. margin-top: 1.0em;
  311. margin-bottom: 0.1em;
  312. }
  313. div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
  314. margin-top: 0;
  315. margin-bottom: 0;
  316. }
  317. div.toclevel2 {
  318. margin-left: 2em;
  319. font-size: 0.9em;
  320. }
  321. div.toclevel3 {
  322. margin-left: 4em;
  323. font-size: 0.9em;
  324. }
  325. div.toclevel4 {
  326. margin-left: 6em;
  327. font-size: 0.9em;
  328. }
  329. /* Overrides for manpage documents */
  330. h1 {
  331. padding-top: 0.5em;
  332. padding-bottom: 0.5em;
  333. border-top: 2px solid silver;
  334. border-bottom: 2px solid silver;
  335. }
  336. h2 {
  337. border-style: none;
  338. }
  339. div.sectionbody {
  340. margin-left: 5%;
  341. }
  342. @media print {
  343. div#toc { display: none; }
  344. }
  345. /* Workarounds for IE6's broken and incomplete CSS2. */
  346. div.sidebar-content {
  347. background: #ffffee;
  348. border: 1px solid silver;
  349. padding: 0.5em;
  350. }
  351. div.sidebar-title, div.image-title {
  352. color: #527bbd;
  353. font-family: sans-serif;
  354. font-weight: bold;
  355. margin-top: 0.0em;
  356. margin-bottom: 0.5em;
  357. }
  358. div.listingblock div.content {
  359. border: 1px solid silver;
  360. background: #f4f4f4;
  361. padding: 0.5em;
  362. }
  363. div.quoteblock-attribution {
  364. padding-top: 0.5em;
  365. text-align: right;
  366. }
  367. div.verseblock-content {
  368. white-space: pre;
  369. }
  370. div.verseblock-attribution {
  371. padding-top: 0.75em;
  372. text-align: left;
  373. }
  374. div.exampleblock-content {
  375. border-left: 2px solid silver;
  376. padding-left: 0.5em;
  377. }
  378. /* IE6 sets dynamically generated links as visited. */
  379. div#toc a:visited { color: blue; }
  380. </style>
  381. <script type="text/javascript">
  382. /*<![CDATA[*/
  383. window.onload = function(){asciidoc.footnotes();}
  384. var asciidoc = { // Namespace.
  385. /////////////////////////////////////////////////////////////////////
  386. // Table Of Contents generator
  387. /////////////////////////////////////////////////////////////////////
  388. /* Author: Mihai Bazon, September 2002
  389. * http://students.infoiasi.ro/~mishoo
  390. *
  391. * Table Of Content generator
  392. * Version: 0.4
  393. *
  394. * Feel free to use this script under the terms of the GNU General Public
  395. * License, as long as you do not remove or alter this notice.
  396. */
  397. /* modified by Troy D. Hanson, September 2006. License: GPL */
  398. /* modified by Stuart Rackham, 2006, 2009. License: GPL */
  399. // toclevels = 1..4.
  400. toc: function (toclevels) {
  401. function getText(el) {
  402. var text = "";
  403. for (var i = el.firstChild; i != null; i = i.nextSibling) {
  404. if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
  405. text += i.data;
  406. else if (i.firstChild != null)
  407. text += getText(i);
  408. }
  409. return text;
  410. }
  411. function TocEntry(el, text, toclevel) {
  412. this.element = el;
  413. this.text = text;
  414. this.toclevel = toclevel;
  415. }
  416. function tocEntries(el, toclevels) {
  417. var result = new Array;
  418. var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
  419. // Function that scans the DOM tree for header elements (the DOM2
  420. // nodeIterator API would be a better technique but not supported by all
  421. // browsers).
  422. var iterate = function (el) {
  423. for (var i = el.firstChild; i != null; i = i.nextSibling) {
  424. if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
  425. var mo = re.exec(i.tagName);
  426. if (mo)
  427. result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
  428. iterate(i);
  429. }
  430. }
  431. }
  432. iterate(el);
  433. return result;
  434. }
  435. var toc = document.getElementById("toc");
  436. var entries = tocEntries(document.getElementById("content"), toclevels);
  437. for (var i = 0; i < entries.length; ++i) {
  438. var entry = entries[i];
  439. if (entry.element.id == "")
  440. entry.element.id = "_toc_" + i;
  441. var a = document.createElement("a");
  442. a.href = "#" + entry.element.id;
  443. a.appendChild(document.createTextNode(entry.text));
  444. var div = document.createElement("div");
  445. div.appendChild(a);
  446. div.className = "toclevel" + entry.toclevel;
  447. toc.appendChild(div);
  448. }
  449. if (entries.length == 0)
  450. toc.parentNode.removeChild(toc);
  451. },
  452. /////////////////////////////////////////////////////////////////////
  453. // Footnotes generator
  454. /////////////////////////////////////////////////////////////////////
  455. /* Based on footnote generation code from:
  456. * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
  457. */
  458. footnotes: function () {
  459. var cont = document.getElementById("content");
  460. var noteholder = document.getElementById("footnotes");
  461. var spans = cont.getElementsByTagName("span");
  462. var refs = {};
  463. var n = 0;
  464. for (i=0; i<spans.length; i++) {
  465. if (spans[i].className == "footnote") {
  466. n++;
  467. // Use [\s\S] in place of . so multi-line matches work.
  468. // Because JavaScript has no s (dotall) regex flag.
  469. note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
  470. noteholder.innerHTML +=
  471. "<div class='footnote' id='_footnote_" + n + "'>" +
  472. "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
  473. n + "</a>. " + note + "</div>";
  474. spans[i].innerHTML =
  475. "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
  476. "' title='View footnote' class='footnote'>" + n + "</a>]";
  477. var id =spans[i].getAttribute("id");
  478. if (id != null) refs["#"+id] = n;
  479. }
  480. }
  481. if (n == 0)
  482. noteholder.parentNode.removeChild(noteholder);
  483. else {
  484. // Process footnoterefs.
  485. for (i=0; i<spans.length; i++) {
  486. if (spans[i].className == "footnoteref") {
  487. var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
  488. href = href.match(/#.*/)[0]; // Because IE return full URL.
  489. n = refs[href];
  490. spans[i].innerHTML =
  491. "[<a href='#_footnote_" + n +
  492. "' title='View footnote' class='footnote'>" + n + "</a>]";
  493. }
  494. }
  495. }
  496. }
  497. }
  498. /*]]>*/
  499. </script>
  500. </head>
  501. <body>
  502. <div id="header">
  503. <h1>
  504. ARIA2C(1) Manual Page
  505. </h1>
  506. <h2>NAME</h2>
  507. <div class="sectionbody">
  508. <p>aria2c -
  509. The ultra fast download utility
  510. </p>
  511. </div>
  512. </div>
  513. <div id="content">
  514. <h2 id="_synopsis">SYNOPSIS</h2>
  515. <div class="sectionbody">
  516. <div class="paragraph"><p>aria2c [<em>OPTIONS</em>] [<em>URI</em> | <em>MAGNET</em> | <em>TORRENT_FILE</em> | <em>METALINK_FILE</em>]&#8230;</p></div>
  517. </div>
  518. <h2 id="_description">DESCRIPTION</h2>
  519. <div class="sectionbody">
  520. <div class="paragraph"><p>aria2 is a utility for downloading files. The supported protocols are
  521. HTTP(S), FTP, BitTorrent, and Metalink. aria2 can download a file from
  522. multiple sources/protocols and tries to utilize your maximum download
  523. bandwidth. It supports downloading a file from HTTP(S)/FTP and
  524. BitTorrent at the same time, while the data downloaded from
  525. HTTP(S)/FTP is uploaded to the BitTorrent swarm. Using Metalink&#8217;s
  526. chunk checksums, aria2 automatically validates chunks of data while
  527. downloading a file like BitTorrent.</p></div>
  528. </div>
  529. <h2 id="_options">OPTIONS</h2>
  530. <div class="sectionbody">
  531. <h3 id="_basic_options">Basic Options</h3><div style="clear:left"></div>
  532. <div class="dlist"><dl>
  533. <dt class="hdlist1">
  534. <strong>-d</strong>, <strong>--dir</strong>=DIR
  535. </dt>
  536. <dd>
  537. <p>
  538. The directory to store the downloaded file.
  539. </p>
  540. </dd>
  541. <dt class="hdlist1">
  542. <strong>-i</strong>, <strong>--input-file</strong>=FILE
  543. </dt>
  544. <dd>
  545. <p>
  546. Downloads URIs found in FILE. You can specify multiple URIs for a single
  547. entity: separate URIs on a single line using the TAB character.
  548. Reads input from stdin when <em>-</em> is specified.
  549. The additional <strong>out</strong> and <strong>dir</strong> options can be specified after each line of
  550. URIs. This optional line must start with white space(s).
  551. See <strong>Input File</strong> subsection for details.
  552. </p>
  553. </dd>
  554. <dt class="hdlist1">
  555. <strong>-l</strong>, <strong>--log</strong>=LOG
  556. </dt>
  557. <dd>
  558. <p>
  559. The file name of the log file. If <em>-</em> is specified, log is written to
  560. stdout.
  561. </p>
  562. </dd>
  563. <dt class="hdlist1">
  564. <strong>-j</strong>, <strong>--max-concurrent-downloads</strong>=N
  565. </dt>
  566. <dd>
  567. <p>
  568. Set maximum number of parallel downloads for every static (HTTP/FTP) URI,
  569. torrent and metalink. See also <strong>-s</strong> and <strong>-C</strong> option.
  570. Default: <em>5</em>
  571. </p>
  572. </dd>
  573. <dt class="hdlist1">
  574. <strong>-V</strong>, <strong>--check-integrity</strong>[=<em>true</em>|<em>false</em>]
  575. </dt>
  576. <dd>
  577. <p>
  578. Check file integrity by validating piece hashes.
  579. This option has effect only in BitTorrent and Metalink downloads with
  580. chunk checksums.
  581. Use this option to re-download a damaged portion of a file.
  582. Default: <em>false</em>
  583. </p>
  584. </dd>
  585. <dt class="hdlist1">
  586. <strong>-c</strong>, <strong>--continue</strong>
  587. </dt>
  588. <dd>
  589. <p>
  590. Continue downloading a partially downloaded file.
  591. Use this option to resume a download started by a web browser or another
  592. program which downloads files sequentially from the beginning.
  593. Currently this option is only applicable to HTTP(S)/FTP downloads.
  594. </p>
  595. </dd>
  596. <dt class="hdlist1">
  597. <strong>-h</strong>, <strong>--help</strong>[=TAG|KEYWORD]
  598. </dt>
  599. <dd>
  600. <p>
  601. The help messages are classified with tags. A tag starts with
  602. "#". For example, type "--help=#http" to get the usage for the
  603. options tagged with "#http". If non-tag word is given, print the
  604. usage for the options whose name includes that word.
  605. Available Values: <em>#basic</em>, <em>#advanced</em>, <em>#http</em>, <em>#https</em>, <em>#ftp</em>,
  606. <em>#metalink</em>, <em>#bittorrent</em>, <em>#cookie</em>, <em>#hook</em>, <em>#file</em>,
  607. <em>#xml-rpc</em>, <em>#experimental</em>, <em>#all</em>
  608. Default: <em>#basic</em>
  609. </p>
  610. </dd>
  611. </dl></div>
  612. <h3 id="_http_ftp_options">HTTP/FTP Options</h3><div style="clear:left"></div>
  613. <div class="dlist"><dl>
  614. <dt class="hdlist1">
  615. <strong>--all-proxy</strong>=PROXY
  616. </dt>
  617. <dd>
  618. <p>
  619. Use this proxy server for all protocols. To erase previously
  620. defined proxy, use "". You can override this setting and specify a
  621. proxy server for a particular protocol using <strong>--http-proxy</strong>,
  622. <strong>--https-proxy</strong> and <strong>--ftp-proxy</strong> options. This affects all URIs.
  623. The format of PROXY is [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
  624. </p>
  625. </dd>
  626. </dl></div>
  627. <div class="admonitionblock">
  628. <table><tr>
  629. <td class="icon">
  630. <div class="title">Note</div>
  631. </td>
  632. <td class="content">If user and password are embedded in proxy URI and they are also
  633. specified by <strong>--{http,https,ftp,all}-proxy-{user,passwd}</strong> options,
  634. those appeared later have precedence. For example, you have
  635. http-proxy-user="myname", http-proxy-passwd="mypass" in aria2.conf and
  636. you specify --http-proxy="http://proxy" in command-line, then you get
  637. HTTP proxy "http://proxy" with user "myname" and password
  638. "mypass". Another example: if you specified in command-line
  639. --http-proxy="http://user:pass@proxy" --http-proxy-user="myname"
  640. --http-proxy-passwd="mypass", then you will get HTTP proxy
  641. "http://proxy" with user "myname" and password "mypass". One more
  642. example: if you specified in command-line --http-proxy-user="myname"
  643. --http-proxy-passwd="mypass" --http-proxy="http://user:pass@proxy",
  644. then you get HTTP proxy "http://proxy" with user "user" and password
  645. "pass".</td>
  646. </tr></table>
  647. </div>
  648. <div class="dlist"><dl>
  649. <dt class="hdlist1">
  650. <strong>--all-proxy-passwd</strong>=PASSWD
  651. </dt>
  652. <dd>
  653. <p>
  654. Set password for <strong>--all-proxy</strong> option.
  655. </p>
  656. </dd>
  657. <dt class="hdlist1">
  658. <strong>--all-proxy-user</strong>=USER
  659. </dt>
  660. <dd>
  661. <p>
  662. Set user for <strong>--all-proxy</strong> option.
  663. </p>
  664. </dd>
  665. <dt class="hdlist1">
  666. <strong>--connect-timeout</strong>=SEC
  667. </dt>
  668. <dd>
  669. <p>
  670. Set the connect timeout in seconds to establish connection to
  671. HTTP/FTP/proxy server. After the connection is established, this
  672. option makes no effect and <strong>--timeout</strong> option is used instead.
  673. Default: <em>60</em>
  674. </p>
  675. </dd>
  676. <dt class="hdlist1">
  677. <strong>--dry-run</strong>[=<em>true</em>|<em>false</em>]
  678. </dt>
  679. <dd>
  680. <p>
  681. If <em>true</em> is given, aria2 just checks whether the remote file is
  682. available and doesn&#8217;t download data. This option has effect on
  683. HTTP/FTP download. BitTorrent downloads are canceled if <em>true</em> is
  684. specified. Default: <em>false</em>
  685. </p>
  686. </dd>
  687. <dt class="hdlist1">
  688. <strong>--lowest-speed-limit</strong>=SPEED
  689. </dt>
  690. <dd>
  691. <p>
  692. Close connection if download speed is lower than or equal to this
  693. value(bytes per sec).
  694. <em>0</em> means aria2 does not have a lowest speed limit.
  695. You can append <em>K</em> or <em>M</em>(1K = 1024, 1M = 1024K).
  696. This option does not affect BitTorrent downloads.
  697. Default: <em>0</em>
  698. </p>
  699. </dd>
  700. <dt class="hdlist1">
  701. <strong>--max-file-not-found</strong>=NUM
  702. </dt>
  703. <dd>
  704. <p>
  705. If aria2 receives &#8216;file not found&#8217; status from the remote HTTP/FTP
  706. servers NUM times without getting a single byte, then force the
  707. download to fail. Specify <em>0</em> to disable this option. This options is
  708. effective only when using HTTP/FTP servers.
  709. Default: <em>0</em>
  710. </p>
  711. </dd>
  712. <dt class="hdlist1">
  713. <strong>-m</strong>, <strong>--max-tries</strong>=N
  714. </dt>
  715. <dd>
  716. <p>
  717. Set number of tries. <em>0</em> means unlimited.
  718. Default: <em>5</em>
  719. </p>
  720. </dd>
  721. <dt class="hdlist1">
  722. <strong>-n</strong>, <strong>--no-netrc</strong>
  723. </dt>
  724. <dd>
  725. <p>
  726. Disables netrc support. netrc support is enabled by default.
  727. </p>
  728. </dd>
  729. <dt class="hdlist1">
  730. <strong>--no-proxy</strong>=DOMAINS
  731. </dt>
  732. <dd>
  733. <p>
  734. Specify comma separated hostnames, domains and network address with
  735. or without CIDR block where proxy should not be used.
  736. </p>
  737. </dd>
  738. </dl></div>
  739. <div class="admonitionblock">
  740. <table><tr>
  741. <td class="icon">
  742. <div class="title">Note</div>
  743. </td>
  744. <td class="content">For network address with CIDR block, only IPv4 address works. Current
  745. implementation does not resolve hostname in URI to compare network
  746. address specified in <strong>--no-proxy</strong>. So it is only effecive if URI has
  747. numeric IP addresses.</td>
  748. </tr></table>
  749. </div>
  750. <div class="dlist"><dl>
  751. <dt class="hdlist1">
  752. <strong>-o</strong>, <strong>--out</strong>=FILE
  753. </dt>
  754. <dd>
  755. <p>
  756. The file name of the downloaded file. When <strong>-Z</strong> option is used, this
  757. option is ignored.
  758. </p>
  759. </dd>
  760. </dl></div>
  761. <div class="admonitionblock">
  762. <table><tr>
  763. <td class="icon">
  764. <div class="title">Note</div>
  765. </td>
  766. <td class="content">In Metalink or BitTorrent download you cannot specify file name.
  767. The file name specified here is only used when the URIs fed to aria2
  768. are done by command line without <strong>-i</strong>, <strong>-Z</strong> option. For example:
  769. aria2c -o myfile.zip "http://mirror1/file.zip" "http://mirror2/file.zip"</td>
  770. </tr></table>
  771. </div>
  772. <div class="dlist"><dl>
  773. <dt class="hdlist1">
  774. <strong>--proxy-method</strong>=METHOD
  775. </dt>
  776. <dd>
  777. <p>
  778. Set the method to use in proxy request. <em>METHOD</em> is either <em>get</em> or
  779. <em>tunnel</em>. HTTPS downloads always use <em>tunnel</em> regardless of this
  780. option.
  781. Default: <em>get</em>
  782. </p>
  783. </dd>
  784. <dt class="hdlist1">
  785. <strong>-R</strong>, <strong>--remote-time</strong>[=<em>true</em>|<em>false</em>]
  786. </dt>
  787. <dd>
  788. <p>
  789. Retrieve timestamp of the remote file from the remote HTTP/FTP
  790. server and if it is available, apply it to the local file.
  791. Default: <em>false</em>
  792. </p>
  793. </dd>
  794. <dt class="hdlist1">
  795. *--reuse-uri[=<em>true</em>|<em>false</em>]
  796. </dt>
  797. <dd>
  798. <p>
  799. Reuse already used URIs if no unused URIs are left.
  800. Default: <em>true</em>
  801. </p>
  802. </dd>
  803. <dt class="hdlist1">
  804. <strong>--server-stat-of</strong>=FILE
  805. </dt>
  806. <dd>
  807. <p>
  808. Specify the filename to which performance profile of the servers is
  809. saved. You can load saved data using <strong>--server-stat-if</strong> option. See
  810. <strong>Server Performance Profile</strong> subsection below for file format.
  811. </p>
  812. </dd>
  813. <dt class="hdlist1">
  814. <strong>--server-stat-if</strong>=FILE
  815. </dt>
  816. <dd>
  817. <p>
  818. Specify the filename to load performance profile of the servers. The
  819. loaded data will be used in some URI selector such as <em>feedback</em>.
  820. See also <strong>--uri-selector</strong> option. See <strong>Server Performance Profile</strong>
  821. subsection below for file format.
  822. </p>
  823. </dd>
  824. <dt class="hdlist1">
  825. <strong>--server-stat-timeout</strong>=SEC
  826. </dt>
  827. <dd>
  828. <p>
  829. Specifies timeout in seconds to invalidate performance profile of
  830. the servers since the last contact to them.
  831. Default: <em>86400</em> (24hours)
  832. </p>
  833. </dd>
  834. <dt class="hdlist1">
  835. <strong>-s</strong>, <strong>--split</strong>=N
  836. </dt>
  837. <dd>
  838. <p>
  839. Download a file using N connections.
  840. If more than N URIs are given, first N URIs are used and remaining URIs are
  841. used for backup.
  842. If less than N URIs are given, those URIs are used more than once so that N
  843. connections total are made simultaneously.
  844. Please see <strong>-j</strong> option too.
  845. Please note that in Metalink download, this option has no effect and use
  846. <strong>-C</strong> option instead.
  847. Default: <em>5</em>
  848. </p>
  849. </dd>
  850. <dt class="hdlist1">
  851. <strong>-t</strong>, <strong>--timeout</strong>=SEC
  852. </dt>
  853. <dd>
  854. <p>
  855. Set timeout in seconds.
  856. Default: <em>60</em>
  857. </p>
  858. </dd>
  859. <dt class="hdlist1">
  860. <strong>--uri-selector</strong>=SELECTOR
  861. </dt>
  862. <dd>
  863. <p>
  864. Specify URI selection algorithm. The possible values are <em>inorder</em>,
  865. <em>feedback</em> and <em>adaptive</em>. If <em>inorder</em> is given, URI is tried in
  866. the order appeared in the URI list. If <em>feedback</em> is given, aria2
  867. uses download speed observed in the previous downloads and choose
  868. fastest server in the URI list. This also effectively skips dead
  869. mirrors. The observed download speed is a part of performance
  870. profile of servers mentioned in <strong>--server-stat-of</strong> and
  871. <strong>--server-stat-if</strong> options. If <em>adaptive</em> is given, selects one of
  872. the best mirrors for the first and reserved connections. For
  873. supplementary ones, it returns mirrors which has not been tested
  874. yet, and if each of them has already been tested, returns mirrors
  875. which has to be tested again. Otherwise, it doesn&#8217;t select anymore
  876. mirrors. Like <em>feedback</em>, it uses a performance profile of servers.
  877. Default: <em>feedback</em>
  878. </p>
  879. </dd>
  880. </dl></div>
  881. <h3 id="_http_specific_options">HTTP Specific Options</h3><div style="clear:left"></div>
  882. <div class="dlist"><dl>
  883. <dt class="hdlist1">
  884. <strong>--ca-certificate</strong>=FILE
  885. </dt>
  886. <dd>
  887. <p>
  888. Use the certificate authorities in FILE to verify the peers.
  889. The certificate file must be in PEM format and can contain multiple CA
  890. certificates.
  891. Use <strong>--check-certificate</strong> option to enable verification.
  892. </p>
  893. </dd>
  894. <dt class="hdlist1">
  895. <strong>--certificate</strong>=FILE
  896. </dt>
  897. <dd>
  898. <p>
  899. Use the client certificate in FILE.
  900. The certificate must be in PEM format.
  901. You may use <strong>--private-key</strong> option to specify the private key.
  902. </p>
  903. </dd>
  904. <dt class="hdlist1">
  905. <strong>--check-certificate</strong>[=<em>true</em>|<em>false</em>]
  906. </dt>
  907. <dd>
  908. <p>
  909. Verify the peer using certificates specified in <strong>--ca-certificate</strong> option.
  910. Default: <em>true</em>
  911. </p>
  912. </dd>
  913. <dt class="hdlist1">
  914. <strong>--http-auth-challenge</strong>[=<em>true</em>|<em>false</em>]
  915. </dt>
  916. <dd>
  917. <p>
  918. Send HTTP authorization header only when it is requested by the
  919. server. If <em>false</em> is set, then authorization header is always sent
  920. to the server. There is an exception: if username and password are
  921. embedded in URI, authorization header is always sent to the server
  922. regardless of this option. Default: <em>false</em>
  923. </p>
  924. </dd>
  925. <dt class="hdlist1">
  926. <strong>--http-no-cache</strong>[=<em>true</em>|<em>false</em>]
  927. </dt>
  928. <dd>
  929. <p>
  930. Send Cache-Control: no-cache and Pragma: no-cache header to avoid
  931. cached content. If <em>false</em> is given, these headers are not sent
  932. and you can add Cache-Control header with a directive you like
  933. using <strong>--header</strong> option. Default: <em>true</em>
  934. </p>
  935. </dd>
  936. <dt class="hdlist1">
  937. <strong>--http-user</strong>=USER
  938. </dt>
  939. <dd>
  940. <p>
  941. Set HTTP user. This affects all URIs.
  942. </p>
  943. </dd>
  944. <dt class="hdlist1">
  945. <strong>--http-passwd</strong>=PASSWD
  946. </dt>
  947. <dd>
  948. <p>
  949. Set HTTP password. This affects all URIs.
  950. </p>
  951. </dd>
  952. <dt class="hdlist1">
  953. <strong>--http-proxy</strong>=PROXY
  954. </dt>
  955. <dd>
  956. <p>
  957. Use this proxy server for HTTP. To erase previously defined proxy,
  958. use "". See also <strong>--all-proxy</strong> option. This affects all URIs. The
  959. format of PROXY is [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
  960. </p>
  961. </dd>
  962. <dt class="hdlist1">
  963. <strong>--http-proxy-passwd</strong>=PASSWD
  964. </dt>
  965. <dd>
  966. <p>
  967. Set password for <strong>--http-proxy</strong> option.
  968. </p>
  969. </dd>
  970. </dl></div>
  971. <div class="paragraph"><p><strong>--http-proxy-user</strong>=USER:</p></div>
  972. <div class="literalblock">
  973. <div class="content">
  974. <pre><tt>Set user for *--http-proxy* option.</tt></pre>
  975. </div></div>
  976. <div class="dlist"><dl>
  977. <dt class="hdlist1">
  978. <strong>--https-proxy</strong>=PROXY
  979. </dt>
  980. <dd>
  981. <p>
  982. Use this proxy server for HTTPS. To erase previously defined proxy,
  983. use "". See also <strong>--all-proxy</strong> option. This affects all URIs. The
  984. format of PROXY is [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
  985. </p>
  986. </dd>
  987. <dt class="hdlist1">
  988. <strong>--https-proxy-passwd</strong>=PASSWD
  989. </dt>
  990. <dd>
  991. <p>
  992. Set password for <strong>--https-proxy</strong> option.
  993. </p>
  994. </dd>
  995. <dt class="hdlist1">
  996. <strong>--https-proxy-user</strong>=USER
  997. </dt>
  998. <dd>
  999. <p>
  1000. Set user for <strong>--https-proxy</strong> option.
  1001. </p>
  1002. </dd>
  1003. <dt class="hdlist1">
  1004. <strong>--private-key</strong>=FILE
  1005. </dt>
  1006. <dd>
  1007. <p>
  1008. Use the private key in FILE.
  1009. The private key must be decrypted and in PEM format.
  1010. The behavior when encrypted one is given is undefined.
  1011. See also <strong>--certificate</strong> option.
  1012. </p>
  1013. </dd>
  1014. <dt class="hdlist1">
  1015. <strong>--referer</strong>=REFERER
  1016. </dt>
  1017. <dd>
  1018. <p>
  1019. Set Referer. This affects all URIs.
  1020. </p>
  1021. </dd>
  1022. <dt class="hdlist1">
  1023. <strong>--enable-http-keep-alive</strong>[=<em>true</em>|<em>false</em>]
  1024. </dt>
  1025. <dd>
  1026. <p>
  1027. Enable HTTP/1.1 persistent connection.
  1028. Default: <em>true</em>
  1029. </p>
  1030. </dd>
  1031. <dt class="hdlist1">
  1032. <strong>--enable-http-pipelining</strong>[=<em>true</em>|<em>false</em>]
  1033. </dt>
  1034. <dd>
  1035. <p>
  1036. Enable HTTP/1.1 pipelining.
  1037. Default: <em>false</em>
  1038. </p>
  1039. </dd>
  1040. <dt class="hdlist1">
  1041. <strong>--header</strong>=HEADER
  1042. </dt>
  1043. <dd>
  1044. <p>
  1045. Append HEADER to HTTP request header.
  1046. You can use this option repeatedly to specify more than one header:
  1047. aria2c <strong>--header</strong>="X-A: b78" <strong>--header</strong>="X-B: 9J1" "http://host/file"
  1048. </p>
  1049. </dd>
  1050. <dt class="hdlist1">
  1051. <strong>--load-cookies</strong>=FILE
  1052. </dt>
  1053. <dd>
  1054. <p>
  1055. Load Cookies from FILE using the Firefox3 format (SQLite3) and the
  1056. Mozilla/Firefox(1.x/2.x)/Netscape format.
  1057. </p>
  1058. </dd>
  1059. </dl></div>
  1060. <div class="admonitionblock">
  1061. <table><tr>
  1062. <td class="icon">
  1063. <div class="title">Note</div>
  1064. </td>
  1065. <td class="content">If aria2 is built without libsqlite3, then it doesn&#8217;t support Firefox3 cookie format.</td>
  1066. </tr></table>
  1067. </div>
  1068. <div class="dlist"><dl>
  1069. <dt class="hdlist1">
  1070. <strong>--save-cookies</strong>=FILE
  1071. </dt>
  1072. <dd>
  1073. <p>
  1074. Save Cookies to FILE in Mozilla/Firefox(1.x/2.x)/ Netscape
  1075. format. If FILE already exists, it is overwritten. Session Cookies
  1076. are also saved and their expiry values are treated as 0. Possible
  1077. Values: <em>/path/to/file</em>
  1078. </p>
  1079. </dd>
  1080. <dt class="hdlist1">
  1081. <strong>--use-head</strong>[=<em>true</em>|<em>false</em>]
  1082. </dt>
  1083. <dd>
  1084. <p>
  1085. Use HEAD method for the first request to the HTTP server.
  1086. Default: <em>false</em>
  1087. </p>
  1088. </dd>
  1089. <dt class="hdlist1">
  1090. <strong>-U</strong>, <strong>--user-agent</strong>=USER_AGENT
  1091. </dt>
  1092. <dd>
  1093. <p>
  1094. Set user agent for HTTP(S) downloads.
  1095. Default: <em>aria2/$VERSION</em>, $VERSION is replaced by package version.
  1096. </p>
  1097. </dd>
  1098. </dl></div>
  1099. <h3 id="_ftp_specific_options">FTP Specific Options</h3><div style="clear:left"></div>
  1100. <div class="dlist"><dl>
  1101. <dt class="hdlist1">
  1102. <strong>--ftp-user</strong>=USER
  1103. </dt>
  1104. <dd>
  1105. <p>
  1106. Set FTP user. This affects all URIs.
  1107. Default: <em>anonymous</em>
  1108. </p>
  1109. </dd>
  1110. <dt class="hdlist1">
  1111. <strong>--ftp-passwd</strong>=PASSWD
  1112. </dt>
  1113. <dd>
  1114. <p>
  1115. Set FTP password. This affects all URIs.
  1116. If user name is embedded but password is missing in URI, aria2 tries
  1117. to resolve password using .netrc. If password is found in .netrc,
  1118. then use it as password. If not, use the password specified in this
  1119. option.
  1120. Default: <em>ARIA2USER@</em>
  1121. </p>
  1122. </dd>
  1123. <dt class="hdlist1">
  1124. <strong>-p</strong>, <strong>--ftp-pasv</strong>[=<em>true</em>|<em>false</em>]
  1125. </dt>
  1126. <dd>
  1127. <p>
  1128. Use the passive mode in FTP.
  1129. If <em>false</em> is given, the active mode will be used.
  1130. Default: <em>true</em>
  1131. </p>
  1132. </dd>
  1133. <dt class="hdlist1">
  1134. <strong>--ftp-proxy</strong>=PROXY
  1135. </dt>
  1136. <dd>
  1137. <p>
  1138. Use this proxy server for FTP. To erase previously defined proxy,
  1139. use "". See also <strong>--all-proxy</strong> option. This affects all URIs. The
  1140. format of PROXY is [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
  1141. </p>
  1142. </dd>
  1143. <dt class="hdlist1">
  1144. <strong>--ftp-proxy-passwd</strong>=PASSWD
  1145. </dt>
  1146. <dd>
  1147. <p>
  1148. Set password for <strong>--ftp-proxy</strong> option.
  1149. </p>
  1150. </dd>
  1151. <dt class="hdlist1">
  1152. <strong>--ftp-proxy-user</strong>=USER
  1153. </dt>
  1154. <dd>
  1155. <p>
  1156. Set user for <strong>--ftp-proxy</strong> option.
  1157. </p>
  1158. </dd>
  1159. <dt class="hdlist1">
  1160. <strong>--ftp-type</strong>=TYPE
  1161. </dt>
  1162. <dd>
  1163. <p>
  1164. Set FTP transfer type. TYPE is either <em>binary</em> or <em>ascii</em>.
  1165. Default: <em>binary</em>
  1166. </p>
  1167. </dd>
  1168. <dt class="hdlist1">
  1169. <strong>--ftp-reuse-connection</strong>[=<em>true</em>|<em>false</em>]
  1170. </dt>
  1171. <dd>
  1172. <p>
  1173. Reuse connection in FTP.
  1174. Default: <em>true</em>
  1175. </p>
  1176. </dd>
  1177. </dl></div>
  1178. <h3 id="_bittorrent_metalink_options">BitTorrent/Metalink Options</h3><div style="clear:left"></div>
  1179. <div class="dlist"><dl>
  1180. <dt class="hdlist1">
  1181. <strong>--select-file</strong>=INDEX&#8230;
  1182. </dt>
  1183. <dd>
  1184. <p>
  1185. Set file to download by specifying its index.
  1186. You can find the file index using the <strong>--show-files</strong> option.
  1187. Multiple indexes can be specified by using ",", for example: <em>3,6</em>.
  1188. You can also use "-" to specify a range: <em>1-5</em>.
  1189. "," and "-" can be used together: <em>1-5,8,9</em>.
  1190. When used with the -M option, index may vary depending on the query
  1191. (see <strong>--metalink-</strong>* options).
  1192. </p>
  1193. </dd>
  1194. </dl></div>
  1195. <div class="admonitionblock">
  1196. <table><tr>
  1197. <td class="icon">
  1198. <div class="title">Note</div>
  1199. </td>
  1200. <td class="content">In multi file torrent, the adjacent files specified by this option may
  1201. also be downloaded. This is by design, not a bug.
  1202. A single piece may include several files or part of files, and aria2
  1203. writes the piece to the appropriate files.</td>
  1204. </tr></table>
  1205. </div>
  1206. <div class="dlist"><dl>
  1207. <dt class="hdlist1">
  1208. <strong>-S</strong>, <strong>--show-files</strong>
  1209. </dt>
  1210. <dd>
  1211. <p>
  1212. Print file listing of .torrent or .metalink file and exit.
  1213. In case of .torrent file, additional information
  1214. (infohash, piece length, etc) is also printed.
  1215. </p>
  1216. </dd>
  1217. </dl></div>
  1218. <h3 id="_bittorrent_specific_options">BitTorrent Specific Options</h3><div style="clear:left"></div>
  1219. <div class="dlist"><dl>
  1220. <dt class="hdlist1">
  1221. <strong>--bt-enable-lpd</strong>[=<em>true</em>|<em>false</em>]
  1222. </dt>
  1223. <dd>
  1224. <p>
  1225. Enable Local Peer Discovery. If a private flag is set in a torrent,
  1226. aria2 doesn&#8217;t use this feature for that download even if <em>true</em> is
  1227. given. Default: <em>false</em>
  1228. </p>
  1229. </dd>
  1230. <dt class="hdlist1">
  1231. <strong>--bt-external-ip</strong>=IPADDRESS
  1232. </dt>
  1233. <dd>
  1234. <p>
  1235. Specify the external IP address to report to a BitTorrent
  1236. tracker. Although this function is named "external", it can accept
  1237. any kind of IP addresses. IPADDRESS must be a numeric IP address.
  1238. </p>
  1239. </dd>
  1240. <dt class="hdlist1">
  1241. <strong>--bt-hash-check-seed</strong>[=<em>true</em>|<em>false</em>]
  1242. </dt>
  1243. <dd>
  1244. <p>
  1245. If <em>true</em> is given, after hash check using <strong>--check-integrity</strong> option and
  1246. file is complete, continue to seed file. If you want to check file
  1247. and download it only when it is damaged or incomplete, set this
  1248. option to <em>false</em>. This option has effect only on BitTorrent download.
  1249. Default: <em>true</em>
  1250. </p>
  1251. </dd>
  1252. <dt class="hdlist1">
  1253. <strong>--bt-lpd-interface</strong>=INTERFACE
  1254. </dt>
  1255. <dd>
  1256. <p>
  1257. Use given interface for Local Peer Discovery. If this option is not
  1258. specified, the default interface is chosen. You can specify
  1259. interface name and IP address. Possible Values: interface, IP
  1260. addres
  1261. </p>
  1262. </dd>
  1263. <dt class="hdlist1">
  1264. <strong>--bt-max-open-files</strong>=NUM
  1265. </dt>
  1266. <dd>
  1267. <p>
  1268. Specify maximum number of files to open in each BitTorrent download.
  1269. Default: <em>100</em>
  1270. </p>
  1271. </dd>
  1272. <dt class="hdlist1">
  1273. <strong>--bt-max-peers</strong>=NUM
  1274. </dt>
  1275. <dd>
  1276. <p>
  1277. Specify the maximum number of peers per torrent. <em>0</em> means
  1278. unlimited. See also <strong>--bt-request-peer-speed-limit</strong> option.
  1279. Default: <em>55</em>
  1280. </p>
  1281. </dd>
  1282. <dt class="hdlist1">
  1283. <strong>--bt-metadata-only</strong>[=<em>true</em>|<em>false</em>]
  1284. </dt>
  1285. <dd>
  1286. <p>
  1287. Download metadata only. The file(s) described in metadata will not
  1288. be downloaded. This option has effect only when BitTorrent Magnet
  1289. URI is used. See also <strong>--bt-save-metadata</strong> option. Default: <em>false</em>
  1290. </p>
  1291. </dd>
  1292. <dt class="hdlist1">
  1293. <strong>--bt-min-crypto-level</strong>=<em>plain</em>|<em>arc4</em>
  1294. </dt>
  1295. <dd>
  1296. <p>
  1297. Set minimum level of encryption method.
  1298. If several encryption methods are provided by a peer, aria2 chooses the lowest
  1299. one which satisfies the given level.
  1300. Default: <em>plain</em>
  1301. </p>
  1302. </dd>
  1303. <dt class="hdlist1">
  1304. <strong>--bt-prioritize-piece</strong>=<em>head</em>[=SIZE],<em>tail</em>[=SIZE]
  1305. </dt>
  1306. <dd>
  1307. <p>
  1308. Try to download first and last pieces of each file first. This is
  1309. useful for previewing files. The argument can contain 2 keywords:
  1310. <em>head</em> and <em>tail</em>. To include both keywords, they must be separated
  1311. by comma. These keywords can take one parameter, SIZE. For example,
  1312. if <em>head</em>=SIZE is specified, pieces in the range of first SIZE bytes
  1313. of each file get higher priority. <em>tail</em>=SIZE means the range of
  1314. last SIZE bytes of each file. SIZE can include <em>K</em> or <em>M</em>(1K = 1024,
  1315. 1M = 1024K). If SIZE is omitted, SIZE=1M is used.
  1316. </p>
  1317. </dd>
  1318. <dt class="hdlist1">
  1319. <strong>--bt-require-crypto</strong>=<em>true</em>|<em>false</em>
  1320. </dt>
  1321. <dd>
  1322. <p>
  1323. If true is given, aria2 doesn&#8217;t accept and establish connection with legacy
  1324. BitTorrent handshake(\19BitTorrent protocol).
  1325. Thus aria2 always uses Obfuscation handshake.
  1326. Default: <em>false</em>
  1327. </p>
  1328. </dd>
  1329. <dt class="hdlist1">
  1330. <strong>--bt-request-peer-speed-limit</strong>=SPEED
  1331. </dt>
  1332. <dd>
  1333. <p>
  1334. If the whole download speed of every torrent is lower than SPEED,
  1335. aria2 temporarily increases the number of peers to try for more
  1336. download speed. Configuring this option with your preferred download
  1337. speed can increase your download speed in some cases.
  1338. You can append <em>K</em> or <em>M</em>(1K = 1024, 1M = 1024K).
  1339. Default: <em>50K</em>
  1340. </p>
  1341. </dd>
  1342. <dt class="hdlist1">
  1343. <strong>--bt-save-metadata</strong>[=<em>true</em>|<em>false</em>]
  1344. </dt>
  1345. <dd>
  1346. <p>
  1347. Save metadata as .torrent file. This option has effect only when
  1348. BitTorrent Magnet URI is used. The filename is hex encoded info
  1349. hash with suffix .torrent. The directory to be saved is the same
  1350. directory where download file is saved. If the same file already
  1351. exists, metadata is not saved. See also <strong>--bt-metadata-only</strong>
  1352. option. Default: <em>false</em>
  1353. </p>
  1354. </dd>
  1355. <dt class="hdlist1">
  1356. <strong>--bt-seed-unverified</strong>[=<em>true</em>|<em>false</em>]
  1357. </dt>
  1358. <dd>
  1359. <p>
  1360. Seed previously downloaded files without verifying piece hashes.
  1361. Default: <em>false</em>
  1362. </p>
  1363. </dd>
  1364. <dt class="hdlist1">
  1365. <strong>--bt-stop-timeout</strong>=SEC
  1366. </dt>
  1367. <dd>
  1368. <p>
  1369. Stop BitTorrent download if download speed is 0 in consecutive SEC
  1370. seconds. If <em>0</em> is given, this feature is disabled. Default: <em>0</em>
  1371. </p>
  1372. </dd>
  1373. <dt class="hdlist1">
  1374. <strong>--bt-tracker-connect-timeout</strong>=SEC
  1375. </dt>
  1376. <dd>
  1377. <p>
  1378. Set the connect timeout in seconds to establish connection to
  1379. tracker. After the connection is established, this option makes no
  1380. effect and <strong>--bt-tracker-timeout</strong> option is used instead. Default:
  1381. <em>60</em>
  1382. </p>
  1383. </dd>
  1384. <dt class="hdlist1">
  1385. <strong>--bt-tracker-interval</strong>=SEC
  1386. </dt>
  1387. <dd>
  1388. <p>
  1389. Set the interval in seconds between tracker requests. This
  1390. completely overrides interval value and aria2 just uses this value
  1391. and ignores the min interval and interval value in the response of
  1392. tracker. If <em>0</em> is set, aria2 determines interval based on the
  1393. response of tracker and the download progress. Default: <em>0</em>
  1394. </p>
  1395. </dd>
  1396. <dt class="hdlist1">
  1397. <strong>--bt-tracker-timeout</strong>=SEC
  1398. </dt>
  1399. <dd>
  1400. <p>
  1401. Set timeout in seconds. Default: <em>60</em>
  1402. </p>
  1403. </dd>
  1404. <dt class="hdlist1">
  1405. <strong>--dht-entry-point</strong>=HOST:PORT
  1406. </dt>
  1407. <dd>
  1408. <p>
  1409. Set host and port as an entry point to DHT network.
  1410. </p>
  1411. </dd>
  1412. <dt class="hdlist1">
  1413. <strong>--dht-file-path</strong>=PATH
  1414. </dt>
  1415. <dd>
  1416. <p>
  1417. Change the DHT routing table file to PATH.
  1418. Default: <em>$HOME/.aria2/dht.dat</em>
  1419. </p>
  1420. </dd>
  1421. <dt class="hdlist1">
  1422. <strong>--dht-listen-port</strong>=PORT&#8230;
  1423. </dt>
  1424. <dd>
  1425. <p>
  1426. Set UDP listening port for DHT.
  1427. Multiple ports can be specified by using ",", for example: <em>6881,6885</em>.
  1428. You can also use "-" to specify a range: <em>6881-6999</em>. "," and "-" can be used
  1429. together.
  1430. Default: <em>6881-6999</em>
  1431. </p>
  1432. </dd>
  1433. </dl></div>
  1434. <div class="admonitionblock">
  1435. <table><tr>
  1436. <td class="icon">
  1437. <div class="title">Note</div>
  1438. </td>
  1439. <td class="content">Make sure that the specified ports are open for incoming UDP traffic.</td>
  1440. </tr></table>
  1441. </div>
  1442. <div class="dlist"><dl>
  1443. <dt class="hdlist1">
  1444. <strong>--dht-message-timeout</strong>=SEC
  1445. </dt>
  1446. <dd>
  1447. <p>
  1448. Set timeout in seconds. Default: <em>10</em>
  1449. </p>
  1450. </dd>
  1451. <dt class="hdlist1">
  1452. <strong>--enable-dht</strong>[=<em>true</em>|<em>false</em>]
  1453. </dt>
  1454. <dd>
  1455. <p>
  1456. Enable DHT functionality. If a private flag is set in a torrent, aria2
  1457. doesn&#8217;t use DHT for that download even if <em>true</em> is given.
  1458. Default: <em>true</em>
  1459. </p>
  1460. </dd>
  1461. <dt class="hdlist1">
  1462. <strong>--enable-peer-exchange</strong>[=<em>true</em>|<em>false</em>]
  1463. </dt>
  1464. <dd>
  1465. <p>
  1466. Enable Peer Exchange extension. If a private flag is set in a torrent, this
  1467. feature is disabled for that download even if <em>true</em> is given.
  1468. Default: <em>true</em>
  1469. </p>
  1470. </dd>
  1471. <dt class="hdlist1">
  1472. <strong>--follow-torrent</strong>=<em>true</em>|<em>false</em>|<em>mem</em>
  1473. </dt>
  1474. <dd>
  1475. <p>
  1476. If <em>true</em> or <em>mem</em> is specified, when a file whose suffix is ".torrent" or content
  1477. type is "application/x-bittorrent" is downloaded, aria2 parses it as a torrent
  1478. file and downloads files mentioned in it.
  1479. If <em>mem</em> is specified, a torrent file is not written to the disk, but is just
  1480. kept in memory.
  1481. If <em>false</em> is specified, the action mentioned above is not taken.
  1482. Default: <em>true</em>
  1483. </p>
  1484. </dd>
  1485. <dt class="hdlist1">
  1486. <strong>-O</strong>, <strong>--index-out</strong>=INDEX=PATH
  1487. </dt>
  1488. <dd>
  1489. <p>
  1490. Set file path for file with index=INDEX. You can find the file index
  1491. using the <strong>--show-files</strong> option. PATH is a relative path to the
  1492. path specified in <strong>--dir</strong> option. You can use this option multiple
  1493. times. Using this option, you can specify the output filenames of
  1494. BitTorrent downloads.
  1495. </p>
  1496. </dd>
  1497. <dt class="hdlist1">
  1498. <strong>--listen-port</strong>=PORT&#8230;
  1499. </dt>
  1500. <dd>
  1501. <p>
  1502. Set TCP port number for BitTorrent downloads.
  1503. Multiple ports can be specified by using ",", for example: <em>6881,6885</em>.
  1504. You can also use "-" to specify a range: <em>6881-6999</em>.
  1505. "," and "-" can be used together: <em>6881-6889,6999</em>.
  1506. Default: <em>6881-6999</em>
  1507. </p>
  1508. </dd>
  1509. </dl></div>
  1510. <div class="admonitionblock">
  1511. <table><tr>
  1512. <td class="icon">
  1513. <div class="title">Note</div>
  1514. </td>
  1515. <td class="content">Make sure that the specified ports are open for incoming TCP traffic.</td>
  1516. </tr></table>
  1517. </div>
  1518. <div class="dlist"><dl>
  1519. <dt class="hdlist1">
  1520. <strong>--max-overall-upload-limit</strong>=SPEED
  1521. </dt>
  1522. <dd>
  1523. <p>
  1524. Set max overall upload speed in bytes/sec.
  1525. <em>0</em> means unrestricted.
  1526. You can append <em>K</em> or <em>M</em>(1K = 1024, 1M = 1024K).
  1527. To limit the upload speed per torrent, use <strong>--max-upload-limit</strong> option.
  1528. Default: <em>0</em>
  1529. </p>
  1530. </dd>
  1531. <dt class="hdlist1">
  1532. <strong>-u</strong>, <strong>--max-upload-limit</strong>=SPEED
  1533. </dt>
  1534. <dd>
  1535. <p>
  1536. Set max upload speed per each torrent in bytes/sec.
  1537. <em>0</em> means unrestricted.
  1538. You can append <em>K</em> or <em>M</em>(1K = 1024, 1M = 1024K).
  1539. To limit the overall upload speed, use <strong>--max-overall-upload-limit</strong> option.
  1540. Default: <em>0</em>
  1541. </p>
  1542. </dd>
  1543. <dt class="hdlist1">
  1544. <strong>--peer-id-prefix</strong>=PEER_ID_PREFIX
  1545. </dt>
  1546. <dd>
  1547. <p>
  1548. Specify the prefix of peer ID. The peer ID in
  1549. BitTorrent is 20 byte length. If more than 20
  1550. bytes are specified, only first 20 bytes are
  1551. used. If less than 20 bytes are specified, random
  1552. byte data are added to make its length 20 bytes.
  1553. Default: <em>aria2/$VERSION-</em>, $VERSION is replaced by package version.
  1554. </p>
  1555. </dd>
  1556. <dt class="hdlist1">
  1557. <strong>--seed-ratio</strong>=RATIO
  1558. </dt>
  1559. <dd>
  1560. <p>
  1561. Specify share ratio. Seed completed torrents until share ratio reaches
  1562. RATIO.
  1563. You are strongly encouraged to specify equals or more than <em>1.0</em> here.
  1564. Specify <em>0.0</em> if you intend to do seeding regardless of share ratio.
  1565. If <strong>--seed-time</strong> option is specified along with this option, seeding ends when
  1566. at least one of the conditions is satisfied.
  1567. Default: <em>1.0</em>
  1568. </p>
  1569. </dd>
  1570. <dt class="hdlist1">
  1571. <strong>--seed-time</strong>=MINUTES
  1572. </dt>
  1573. <dd>
  1574. <p>
  1575. Specify seeding time in minutes. Also see the <strong>--seed-ratio</strong> option.
  1576. </p>
  1577. </dd>
  1578. </dl></div>
  1579. <div class="admonitionblock">
  1580. <table><tr>
  1581. <td class="icon">
  1582. <div class="title">Note</div>
  1583. </td>
  1584. <td class="content">Specifying <strong>--seed-time</strong>=<em>0</em> disables seeding after download completed.</td>
  1585. </tr></table>
  1586. </div>
  1587. <div class="dlist"><dl>
  1588. <dt class="hdlist1">
  1589. <strong>-T</strong>, <strong>--torrent-file</strong>=TORRENT_FILE
  1590. </dt>
  1591. <dd>
  1592. <p>
  1593. The path to the .torrent file. You are not required to use this
  1594. option because you can specify .torrent files without <strong>-T</strong>.
  1595. </p>
  1596. </dd>
  1597. </dl></div>
  1598. <h3 id="_metalink_specific_options">Metalink Specific Options</h3><div style="clear:left"></div>
  1599. <div class="dlist"><dl>
  1600. <dt class="hdlist1">
  1601. <strong>--follow-metalink</strong>=<em>true</em>|<em>false</em>|<em>mem</em>
  1602. </dt>
  1603. <dd>
  1604. <p>
  1605. If <em>true</em> or <em>mem</em> is specified, when a file whose suffix is ".metalink" or content
  1606. type of "application/metalink+xml" is downloaded, aria2 parses it as a metalink
  1607. file and downloads files mentioned in it.
  1608. If <em>mem</em> is specified, a metalink file is not written to the disk, but is just
  1609. kept in memory.
  1610. If <em>false</em> is specified, the action mentioned above is not taken.
  1611. Default: <em>true</em>
  1612. </p>
  1613. </dd>
  1614. <dt class="hdlist1">
  1615. <strong>-M</strong>, <strong>--metalink-file</strong>=METALINK_FILE
  1616. </dt>
  1617. <dd>
  1618. <p>
  1619. The file path to .metalink file. Reads input from stdin when <em>-</em> is
  1620. specified. You are not required to use this option because you can
  1621. specify .metalink files without <strong>-M</strong>.
  1622. </p>
  1623. </dd>
  1624. <dt class="hdlist1">
  1625. <strong>-C</strong>, <strong>--metalink-servers</strong>=NUM_SERVERS
  1626. </dt>
  1627. <dd>
  1628. <p>
  1629. The number of servers to connect to simultaneously.
  1630. Some Metalinks regulate the number of servers to connect.
  1631. aria2 strictly respects them.
  1632. This means that if Metalink defines the maxconnections attribute lower
  1633. than NUM_SERVERS, then aria2 uses the value of maxconnections attribute
  1634. instead of NUM_SERVERS.
  1635. See also <strong>-s</strong> and <strong>-j</strong> options.
  1636. Default: <em>5</em>
  1637. </p>
  1638. </dd>
  1639. <dt class="hdlist1">
  1640. <strong>--metalink-language</strong>=LANGUAGE
  1641. </dt>
  1642. <dd>
  1643. <p>
  1644. The language of the file to download.
  1645. </p>
  1646. </dd>
  1647. <dt class="hdlist1">
  1648. <strong>--metalink-location</strong>=LOCATION[,&#8230;]
  1649. </dt>
  1650. <dd>
  1651. <p>
  1652. The location of the preferred server.
  1653. A comma-delimited list of locations is acceptable, for example, <em>jp,us</em>.
  1654. </p>
  1655. </dd>
  1656. <dt class="hdlist1">
  1657. <strong>--metalink-os</strong>=OS
  1658. </dt>
  1659. <dd>
  1660. <p>
  1661. The operating system of the file to download.
  1662. </p>
  1663. </dd>
  1664. <dt class="hdlist1">
  1665. <strong>--metalink-version</strong>=VERSION
  1666. </dt>
  1667. <dd>
  1668. <p>
  1669. The version of the file to download.
  1670. </p>
  1671. </dd>
  1672. <dt class="hdlist1">
  1673. <strong>--metalink-preferred-protocol</strong>=PROTO
  1674. </dt>
  1675. <dd>
  1676. <p>
  1677. Specify preferred protocol.
  1678. The possible values are <em>http</em>, <em>https</em>, <em>ftp</em> and <em>none</em>.
  1679. Specify <em>none</em> to disable this feature.
  1680. Default: <em>none</em>
  1681. </p>
  1682. </dd>
  1683. <dt class="hdlist1">
  1684. <strong>--metalink-enable-unique-protocol</strong>=<em>true</em>|<em>false</em>
  1685. </dt>
  1686. <dd>
  1687. <p>
  1688. If <em>true</em> is given and several protocols are available for a mirror in a
  1689. metalink file, aria2 uses one of them.
  1690. Use <strong>--metalink-preferred-protocol</strong> option to specify the preference of
  1691. protocol.
  1692. Default: <em>true</em>
  1693. </p>
  1694. </dd>
  1695. </dl></div>
  1696. <h3 id="_xml_rpc_options">XML-RPC Options</h3><div style="clear:left"></div>
  1697. <div class="dlist"><dl>
  1698. <dt class="hdlist1">
  1699. <strong>--enable-xml-rpc</strong>[=<em>true</em>|<em>false</em>]
  1700. </dt>
  1701. <dd>
  1702. <p>
  1703. Enable XML-RPC server. It is strongly recommended to set username
  1704. and password using <strong>--xml-rpc-user</strong> and <strong>--xml-rpc-passwd</strong>
  1705. option. See also <strong>--xml-rpc-listen-port</strong> option. Default: <em>false</em>
  1706. </p>
  1707. </dd>
  1708. <dt class="hdlist1">
  1709. <strong>--xml-rpc-listen-all</strong>[=<em>true</em>|<em>false</em>]
  1710. </dt>
  1711. <dd>
  1712. <p>
  1713. Listen incoming XML-RPC requests on all network interfaces. If false
  1714. is given, listen only on local loopback interface. Default: <em>false</em>
  1715. </p>
  1716. </dd>
  1717. <dt class="hdlist1">
  1718. <strong>--xml-rpc-listen-port</strong>=PORT
  1719. </dt>
  1720. <dd>
  1721. <p>
  1722. Specify a port number for XML-RPC server to listen to. Possible
  1723. Values: <em>1024</em>-<em>65535</em> Default: <em>6800</em>
  1724. </p>
  1725. </dd>
  1726. <dt class="hdlist1">
  1727. <strong>--xml-rpc-max-request-size</strong>=SIZE
  1728. </dt>
  1729. <dd>
  1730. <p>
  1731. Set max size of XML-RPC request. If aria2 detects the request is
  1732. more than SIZE bytes, it drops connection. Default: <em>2M</em>
  1733. </p>
  1734. </dd>
  1735. <dt class="hdlist1">
  1736. <strong>--xml-rpc-passwd</strong>=PASSWD
  1737. </dt>
  1738. <dd>
  1739. <p>
  1740. Set XML-RPC password.
  1741. </p>
  1742. </dd>
  1743. <dt class="hdlist1">
  1744. <strong>--xml-rpc-user</strong>=USER
  1745. </dt>
  1746. <dd>
  1747. <p>
  1748. Set XML-RPC user.
  1749. </p>
  1750. </dd>
  1751. </dl></div>
  1752. <h3 id="_advanced_options">Advanced Options</h3><div style="clear:left"></div>
  1753. <div class="dlist"><dl>
  1754. <dt class="hdlist1">
  1755. <strong>--allow-overwrite</strong>=<em>true</em>|<em>false</em>
  1756. </dt>
  1757. <dd>
  1758. <p>
  1759. Restart download from scratch if the corresponding control file
  1760. doesn&#8217;t exist. See also <strong>--auto-file-renaming</strong> option. Default:
  1761. <em>false</em>
  1762. </p>
  1763. </dd>
  1764. <dt class="hdlist1">
  1765. <strong>--allow-piece-length-change</strong>=<em>true</em>|<em>false</em>
  1766. </dt>
  1767. <dd>
  1768. <p>
  1769. If false is given, aria2 aborts download when a piece length is different
  1770. from one in a control file.
  1771. If true is given, you can proceed but some download progress will be lost.
  1772. Default: <em>false</em>
  1773. </p>
  1774. </dd>
  1775. <dt class="hdlist1">
  1776. <strong>--always-resume</strong>[=<em>true</em>|<em>false</em>]
  1777. </dt>
  1778. <dd>
  1779. <p>
  1780. Always resume download. If <em>true</em> is given, aria2 always tries to
  1781. resume download and if resume is not possible, aborts download. If
  1782. <em>false</em> is given, when all given URIs do not support resume or aria2
  1783. encounters <em>N</em> URIs which does not support resume (<em>N</em> is the value
  1784. specified using <strong>--max-resume-failure-tries</strong> option), aria2
  1785. downloads file from scratch. See <strong>--max-resume-failure-tries</strong>
  1786. option. Default: <em>true</em>
  1787. </p>
  1788. </dd>
  1789. <dt class="hdlist1">
  1790. <strong>--async-dns</strong>[=<em>true</em>|<em>false</em>]
  1791. </dt>
  1792. <dd>
  1793. <p>
  1794. Enable asynchronous DNS.
  1795. Default: <em>true</em>
  1796. </p>
  1797. </dd>
  1798. <dt class="hdlist1">
  1799. <strong>--auto-file-renaming</strong>[=<em>true</em>|<em>false</em>]
  1800. </dt>
  1801. <dd>
  1802. <p>
  1803. Rename file name if the same file already exists.
  1804. This option works only in HTTP(S)/FTP download.
  1805. The new file name has a dot and a number(1..9999) appended.
  1806. Default: <em>true</em>
  1807. </p>
  1808. </dd>
  1809. <dt class="hdlist1">
  1810. <strong>--auto-save-interval</strong>=SEC
  1811. </dt>
  1812. <dd>
  1813. <p>
  1814. Save a control file(*.aria2) every SEC seconds.
  1815. If <em>0</em> is given, a control file is not saved during download. aria2 saves a
  1816. control file when it stops regardless of the value.
  1817. The possible values are between <em>0</em> to <em>600</em>.
  1818. Default: <em>60</em>
  1819. </p>
  1820. </dd>
  1821. <dt class="hdlist1">
  1822. <strong>--conf-path</strong>=PATH
  1823. </dt>
  1824. <dd>
  1825. <p>
  1826. Change the configuration file path to PATH.
  1827. Default: <em>$HOME/.aria2/aria2.conf</em>
  1828. </p>
  1829. </dd>
  1830. <dt class="hdlist1">
  1831. <strong>-D</strong>, <strong>--daemon</strong>
  1832. </dt>
  1833. <dd>
  1834. <p>
  1835. Run as daemon. The current working directory will be changed to <em>/</em>
  1836. and standard input, standard output and standard error will be
  1837. redirected to <em>/dev/null</em>. Default: <em>false</em>
  1838. </p>
  1839. </dd>
  1840. <dt class="hdlist1">
  1841. <strong>--disable-ipv6</strong>[=<em>true</em>|<em>false</em>]
  1842. </dt>
  1843. <dd>
  1844. <p>
  1845. Disable IPv6. This is useful if you have to use broken DNS and want
  1846. to avoid terribly slow AAAA record lookup. Default: <em>false</em>
  1847. </p>
  1848. </dd>
  1849. <dt class="hdlist1">
  1850. <strong>--enable-direct-io</strong>[=<em>true</em>|<em>false</em>]
  1851. </dt>
  1852. <dd>
  1853. <p>
  1854. Enable directI/O, which lowers cpu usage while allocating/checking files.
  1855. Turn off if you encounter any error.
  1856. Default: <em>true</em>
  1857. </p>
  1858. </dd>
  1859. <dt class="hdlist1">
  1860. <strong>--event-poll</strong>=POLL
  1861. </dt>
  1862. <dd>
  1863. <p>
  1864. Specify the method for polling events. The possible Values are
  1865. <em>epoll</em> and <em>select</em>. If you use recent Linux that has epoll, then
  1866. the default value is <em>epoll</em>. Otherwise, the default value is
  1867. <em>select</em>.
  1868. </p>
  1869. </dd>
  1870. <dt class="hdlist1">
  1871. <strong>--file-allocation</strong>=METHOD
  1872. </dt>
  1873. <dd>
  1874. <p>
  1875. Specify file allocation method.
  1876. <em>none</em> doesn&#8217;t pre-allocate file space. <em>prealloc</em> pre-allocates file space
  1877. before download begins. This may take some time depending on the size of the
  1878. file.
  1879. If you are using newer file systems such as ext4
  1880. (with extents support), btrfs or xfs, <em>falloc</em> is
  1881. your best choice. It allocates large(few GiB)
  1882. files almost instantly. Don&#8217;t use <em>falloc</em> with
  1883. legacy file systems such as ext3 because it takes
  1884. almost same time as <em>prealloc</em> and it blocks aria2
  1885. entirely until allocation finishes. <em>falloc</em> may
  1886. not be available if your system doesn&#8217;t have
  1887. <strong>posix_fallocate</strong>() function.
  1888. Possible Values: <em>none</em>, <em>prealloc</em>, <em>falloc</em>
  1889. Default: <em>prealloc</em>
  1890. </p>
  1891. </dd>
  1892. <dt class="hdlist1">
  1893. <strong>--human-readable</strong>[=<em>true</em>|<em>false</em>]
  1894. </dt>
  1895. <dd>
  1896. <p>
  1897. Print sizes and speed in human readable format (e.g., 1.2Ki, 3.4Mi)
  1898. in the console readout. Default: <em>true</em>
  1899. </p>
  1900. </dd>
  1901. <dt class="hdlist1">
  1902. <strong>--interface</strong>=INTERFACE
  1903. </dt>
  1904. <dd>
  1905. <p>
  1906. Bind sockets to given interface. You can specify interface name, IP
  1907. address and hostname.
  1908. Possible Values: interface, IP address, hostname
  1909. </p>
  1910. </dd>
  1911. </dl></div>
  1912. <div class="admonitionblock">
  1913. <table><tr>
  1914. <td class="icon">
  1915. <div class="title">Note</div>
  1916. </td>
  1917. <td class="content">If an interface has multiple addresses, it is highly recommended to
  1918. specify IP address explicitly. See also <strong>--disable-ipv6</strong>. If your
  1919. system doesn&#8217;t have getifaddrs(), this option doesn&#8217;t accept interface
  1920. name.</td>
  1921. </tr></table>
  1922. </div>
  1923. <div class="dlist"><dl>
  1924. <dt class="hdlist1">
  1925. <strong>--max-resume-failure-tries</strong>=<em>N</em>
  1926. </dt>
  1927. <dd>
  1928. <p>
  1929. When used with <strong>--always-resume</strong>=<em>false</em>, aria2 downloads file from
  1930. scratch when aria2 detects <em>N</em> number of URIs that does not support
  1931. resume. If <em>N</em> is <em>0</em>, aria2 downloads file from scratch when all
  1932. given URIs do not support resume. See <strong>--always-resume</strong> option.
  1933. Default: <em>0</em>
  1934. </p>
  1935. </dd>
  1936. <dt class="hdlist1">
  1937. <strong>--log-level</strong>=LEVEL
  1938. </dt>
  1939. <dd>
  1940. <p>
  1941. Set log level to output.
  1942. LEVEL is either <em>debug</em>, <em>info</em>, <em>notice</em>, <em>warn</em> or <em>error</em>.
  1943. Default: <em>debug</em>
  1944. </p>
  1945. </dd>
  1946. <dt class="hdlist1">
  1947. <strong>--on-download-complete</strong>=COMMAND
  1948. </dt>
  1949. <dd>
  1950. <p>
  1951. Set the command to be executed when download completes. See
  1952. <strong>--on-download-start</strong> option for the requirement of COMMAND. See
  1953. also <strong>--on-download-stop</strong> option. Possible Values:
  1954. <em>/path/to/command</em>
  1955. </p>
  1956. </dd>
  1957. <dt class="hdlist1">
  1958. <strong>--on-download-error</strong>=COMMAND
  1959. </dt>
  1960. <dd>
  1961. <p>
  1962. Set the command to be executed when download aborts due to error.
  1963. See <strong>--on-download-start</strong> option for the requirement of COMMAND.
  1964. See also <strong>--on-download-stop</strong> option. Possible Values:
  1965. <em>/path/to/command</em>
  1966. </p>
  1967. </dd>
  1968. <dt class="hdlist1">
  1969. <strong>--on-download-start</strong>=COMMAND
  1970. </dt>
  1971. <dd>
  1972. <p>
  1973. Set the command to be executed when download starts up. COMMAND must
  1974. take just one argument and GID is passed to COMMAND as a first
  1975. argument. Possible Values: <em>/path/to/command</em>
  1976. </p>
  1977. </dd>
  1978. <dt class="hdlist1">
  1979. <strong>--on-download-stop</strong>=COMMAND
  1980. </dt>
  1981. <dd>
  1982. <p>
  1983. Set the command to be executed when download stops. You can override
  1984. the command to be executed for particular download result using
  1985. <strong>--on-download-complete</strong> and <strong>--on-download-error</strong>. If they are
  1986. specified, command specified in this option is not executed. See
  1987. <strong>--on-download-start</strong> option for the requirement of COMMAND.
  1988. Possible Values: <em>/path/to/command</em>
  1989. </p>
  1990. </dd>
  1991. <dt class="hdlist1">
  1992. <strong>--summary-interval</strong>=SEC
  1993. </dt>
  1994. <dd>
  1995. <p>
  1996. Set interval in seconds to output download progress summary.
  1997. Setting <em>0</em> suppresses the output.
  1998. Default: <em>60</em>
  1999. </p>
  2000. </dd>
  2001. </dl></div>
  2002. <div class="admonitionblock">
  2003. <table><tr>
  2004. <td class="icon">
  2005. <div class="title">Note</div>
  2006. </td>
  2007. <td class="content">In multi file torrent downloads, the files adjacent forward to the specified files
  2008. are also allocated if they share the same piece.</td>
  2009. </tr></table>
  2010. </div>
  2011. <div class="dlist"><dl>
  2012. <dt class="hdlist1">
  2013. <strong>-Z</strong>, <strong>--force-sequential</strong>[=<em>true</em>|<em>false</em>]
  2014. </dt>
  2015. <dd>
  2016. <p>
  2017. Fetch URIs in the command-line sequentially and download each URI in a
  2018. separate session, like the usual command-line download utilities.
  2019. Default: <em>false</em>
  2020. </p>
  2021. </dd>
  2022. <dt class="hdlist1">
  2023. <strong>--max-overall-download-limit</strong>=SPEED
  2024. </dt>
  2025. <dd>
  2026. <p>
  2027. Set max overall download speed in bytes/sec. <em>0</em> means
  2028. unrestricted. You can append <em>K</em> or <em>M</em>(1K = 1024, 1M = 1024K). To
  2029. limit the download speed per download, use <strong>--max-download-limit</strong>
  2030. option. Default: <em>0</em>
  2031. </p>
  2032. </dd>
  2033. <dt class="hdlist1">
  2034. <strong>--max-download-limit</strong>=SPEED
  2035. </dt>
  2036. <dd>
  2037. <p>
  2038. Set max download speed per each download in bytes/sec. <em>0</em> means
  2039. unrestricted. You can append <em>K</em> or <em>M</em>(1K = 1024, 1M = 1024K). To
  2040. limit the overall download speed, use <strong>--max-overall-download-limit</strong>
  2041. option. Default: <em>0</em>
  2042. </p>
  2043. </dd>
  2044. <dt class="hdlist1">
  2045. <strong>--no-conf</strong>
  2046. </dt>
  2047. <dd>
  2048. <p>
  2049. Disable loading aria2.conf file.
  2050. </p>
  2051. </dd>
  2052. <dt class="hdlist1">
  2053. <strong>--no-file-allocation-limit</strong>=SIZE
  2054. </dt>
  2055. <dd>
  2056. <p>
  2057. No file allocation is made for files whose size is smaller than SIZE.
  2058. You can append <em>K</em> or <em>M</em>(1K = 1024, 1M = 1024K).
  2059. Default: <em>5M</em>
  2060. </p>
  2061. </dd>
  2062. <dt class="hdlist1">
  2063. <strong>-P</strong>, <strong>--parameterized-uri</strong>[=<em>true</em>|<em>false</em>]
  2064. </dt>
  2065. <dd>
  2066. <p>
  2067. Enable parameterized URI support.
  2068. You can specify set of parts: <em>http://{sv1,sv2,sv3}/foo.iso</em>.
  2069. Also you can specify numeric sequences with step counter:
  2070. <em>http://host/image[000-100:2].img</em>.
  2071. A step counter can be omitted.
  2072. If all URIs do not point to the same file, such as the second example above,
  2073. -Z option is required.
  2074. Default: <em>false</em>
  2075. </p>
  2076. </dd>
  2077. <dt class="hdlist1">
  2078. <strong>-q</strong>, <strong>--quiet</strong>[=<em>true</em>|<em>false</em>]
  2079. </dt>
  2080. <dd>
  2081. <p>
  2082. Make aria2 quiet (no console output).
  2083. Default: <em>false</em>
  2084. </p>
  2085. </dd>
  2086. <dt class="hdlist1">
  2087. <strong>--realtime-chunk-checksum</strong>=<em>true</em>|<em>false</em>
  2088. </dt>
  2089. <dd>
  2090. <p>
  2091. Validate chunk of data by calculating checksum while downloading a file if
  2092. chunk checksums are provided.
  2093. Default: <em>true</em>
  2094. </p>
  2095. </dd>
  2096. <dt class="hdlist1">
  2097. <strong>--remove-control-file</strong>[=<em>true</em>|<em>false</em>]
  2098. </dt>
  2099. <dd>
  2100. <p>
  2101. Remove control file before download. Using with
  2102. <strong>--allow-overwrite</strong>=<em>true</em>, download always starts from
  2103. scratch. This will be useful for users behind proxy server which
  2104. disables resume.
  2105. </p>
  2106. </dd>
  2107. </dl></div>
  2108. <div class="admonitionblock">
  2109. <table><tr>
  2110. <td class="icon">
  2111. <div class="title">Note</div>
  2112. </td>
  2113. <td class="content">For Metalink downloads, -C1 is recommended for proxy server which
  2114. disables resume, in order to avoid establishing unnecessary
  2115. connections.</td>
  2116. </tr></table>
  2117. </div>
  2118. <div class="dlist"><dl>
  2119. <dt class="hdlist1">
  2120. <strong>--stop</strong>=SEC
  2121. </dt>
  2122. <dd>
  2123. <p>
  2124. Stop application after SEC seconds has passed.
  2125. If <em>0</em> is given, this feature is disabled.
  2126. Default: <em>0</em>
  2127. </p>
  2128. </dd>
  2129. <dt class="hdlist1">
  2130. <strong>-v</strong>, <strong>--version</strong>
  2131. </dt>
  2132. <dd>
  2133. <p>
  2134. Print the version number, copyright and the configuration information and
  2135. exit.
  2136. </p>
  2137. </dd>
  2138. </dl></div>
  2139. <h3 id="_options_that_take_an_optional_argument">Options That Take An Optional Argument</h3><div style="clear:left"></div>
  2140. <div class="paragraph"><p>The options that have its argument surrounded by square brackets([])
  2141. take an optional argument. Usually omiting the argument is evaluated to <em>true</em>.
  2142. If you use short form of these options(such as <em>-V</em>) and give
  2143. an argument, then the option name and its argument should be concatenated(e.g.
  2144. <em>-Vfalse</em>). If any spaces are inserted between the option name and the argument,
  2145. the argument will be treated as URI and usually this is not what you expect.</p></div>
  2146. <h3 id="_uri_magnet_torrent_file_metalink_file">URI, MAGNET, TORRENT_FILE, METALINK_FILE</h3><div style="clear:left"></div>
  2147. <div class="paragraph"><p>You can specify multiple URIs in command-line. Unless you specify
  2148. <strong>-Z</strong> option, all URIs must point to the same file or downloading will
  2149. fail.</p></div>
  2150. <div class="paragraph"><p>You can specify arbitrary number of BitTorrent Magnet URI. Please note
  2151. that they are always treated as a separate download. Both hex encoded
  2152. 40 characters Info Hash and Base32 encoded 32 characters Info Hash are
  2153. supported. The multiple "tr" parameters are supported. Because
  2154. BitTorrent Magnet URI is likely to contain "&amp;" character, it is highly
  2155. recommended to always quote URI with single(') or double(") quotation.
  2156. It is strongly recommended to enable DHT especially when "tr"
  2157. parameter is missing. See <a href="http://www.bittorrent.org/beps/bep_0009.html">http://www.bittorrent.org/beps/bep_0009.html</a>
  2158. for more details about BitTorrent Magnet URI.</p></div>
  2159. <div class="paragraph"><p>You can also specify arbitrary number of torrent files and Metalink
  2160. documents stored on a local drive. Please note that they are always
  2161. treated as a separate download. Both Metalink4 and Metalink version
  2162. 3.0 are supported.</p></div>
  2163. <div class="paragraph"><p>You can specify both torrent file with -T option and URIs. By doing
  2164. this, you can download a file from both torrent swarm and HTTP(S)/FTP
  2165. server at the same time, while the data from HTTP(S)/FTP are uploaded
  2166. to the torrent swarm. For single file torrents, URI can be a complete
  2167. URI pointing to the resource or if URI ends with /, name in torrent
  2168. file in torrent is added. For multi-file torrents, name and path are
  2169. added to form a URI for each file.</p></div>
  2170. <div class="admonitionblock">
  2171. <table><tr>
  2172. <td class="icon">
  2173. <div class="title">Note</div>
  2174. </td>
  2175. <td class="content">Make sure that URI is quoted with single(') or double(") quotation if it
  2176. contains "&amp;" or any characters that have special meaning in shell.</td>
  2177. </tr></table>
  2178. </div>
  2179. <h3 id="_resuming_download">Resuming Download</h3><div style="clear:left"></div>
  2180. <div class="paragraph"><p>Usually, you can resume transfer by just issuing same command(aria2c
  2181. URI) if the previous transfer is made by aria2.</p></div>
  2182. <div class="paragraph"><p>If the previous transfer is made by a browser or wget like sequential
  2183. download manager, then use -c option to continue the transfer(aria2c
  2184. <strong>-c</strong> URI).</p></div>
  2185. </div>
  2186. <h2 id="_exit_status">EXIT STATUS</h2>
  2187. <div class="sectionbody">
  2188. <div class="paragraph"><p>Because aria2 can handle multiple downloads at once, it encounters
  2189. lots of errors in a session. aria2 returns the following exit status
  2190. based on the last error encountered.</p></div>
  2191. <div class="dlist"><dl>
  2192. <dt class="hdlist1">
  2193. <strong>0</strong>
  2194. </dt>
  2195. <dd>
  2196. <p>
  2197. If all downloads are successful.
  2198. </p>
  2199. </dd>
  2200. <dt class="hdlist1">
  2201. <strong>1</strong>
  2202. </dt>
  2203. <dd>
  2204. <p>
  2205. If an unknown error occurs.
  2206. </p>
  2207. </dd>
  2208. <dt class="hdlist1">
  2209. <strong>2</strong>
  2210. </dt>
  2211. <dd>
  2212. <p>
  2213. If time out occurs.
  2214. </p>
  2215. </dd>
  2216. <dt class="hdlist1">
  2217. <strong>3</strong>
  2218. </dt>
  2219. <dd>
  2220. <p>
  2221. If a resource is not found.
  2222. </p>
  2223. </dd>
  2224. <dt class="hdlist1">
  2225. <strong>4</strong>
  2226. </dt>
  2227. <dd>
  2228. <p>
  2229. If aria2 sees the specfied number of "resource not found" error.
  2230. See <strong>--max-file-not-found</strong> option).
  2231. </p>
  2232. </dd>
  2233. <dt class="hdlist1">
  2234. <strong>5</strong>
  2235. </dt>
  2236. <dd>
  2237. <p>
  2238. If a download aborts because download speed is too slow.
  2239. See <strong>--lowest-speed-limit</strong> option)
  2240. </p>
  2241. </dd>
  2242. <dt class="hdlist1">
  2243. <strong>6</strong>
  2244. </dt>
  2245. <dd>
  2246. <p>
  2247. If network problem occurs.
  2248. </p>
  2249. </dd>
  2250. <dt class="hdlist1">
  2251. <strong>7</strong>
  2252. </dt>
  2253. <dd>
  2254. <p>
  2255. If there are unfinished downloads. This error is only reported if
  2256. all finished downloads are successful and there are unfinished
  2257. downloads in a queue when aria2 exits by pressing Ctrl-C by an user
  2258. or sending TERM or INT signal.
  2259. </p>
  2260. </dd>
  2261. <dt class="hdlist1">
  2262. <strong>8</strong>
  2263. </dt>
  2264. <dd>
  2265. <p>
  2266. If server does not support resume when resume is required to
  2267. complete download.
  2268. </p>
  2269. </dd>
  2270. </dl></div>
  2271. <div class="admonitionblock">
  2272. <table><tr>
  2273. <td class="icon">
  2274. <div class="title">Note</div>
  2275. </td>
  2276. <td class="content">An error occurred in a finished download will not be reported
  2277. as exit status.</td>
  2278. </tr></table>
  2279. </div>
  2280. </div>
  2281. <h2 id="_environment">ENVIRONMENT</h2>
  2282. <div class="sectionbody">
  2283. <div class="paragraph"><p>aria2 recognizes the following environment variables.</p></div>
  2284. <div class="dlist"><dl>
  2285. <dt class="hdlist1">
  2286. http_proxy [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
  2287. </dt>
  2288. <dd>
  2289. <p>
  2290. Specify proxy server for use in HTTP.
  2291. Overrides http-proxy value in configuration file.
  2292. The command-line option <strong>--http-proxy</strong> overrides this value.
  2293. </p>
  2294. </dd>
  2295. <dt class="hdlist1">
  2296. https_proxy [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
  2297. </dt>
  2298. <dd>
  2299. <p>
  2300. Specify proxy server for use in HTTPS.
  2301. Overrides https-proxy value in configuration file.
  2302. The command-line option <strong>--https-proxy</strong> overrides this value.
  2303. </p>
  2304. </dd>
  2305. <dt class="hdlist1">
  2306. ftp_proxy [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
  2307. </dt>
  2308. <dd>
  2309. <p>
  2310. Specify proxy server for use in FTP.
  2311. Overrides ftp-proxy value in configuration file.
  2312. The command-line option <strong>--ftp-proxy</strong> overrides this value.
  2313. </p>
  2314. </dd>
  2315. <dt class="hdlist1">
  2316. all_proxy [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
  2317. </dt>
  2318. <dd>
  2319. <p>
  2320. Specify proxy server for use if no protocol-specific proxy is specified.
  2321. Overrides all-proxy value in configuration file.
  2322. The command-line option <strong>--all-proxy</strong> overrides this value.
  2323. </p>
  2324. </dd>
  2325. <dt class="hdlist1">
  2326. no_proxy [DOMAIN,&#8230;]
  2327. </dt>
  2328. <dd>
  2329. <p>
  2330. Specify comma-separated hostname, domains and network address with
  2331. or without CIDR block to which proxy should not be used. Overrides
  2332. no-proxy value in configuration file. The command-line option
  2333. <strong>--no-proxy</strong> overrides this value.
  2334. </p>
  2335. </dd>
  2336. </dl></div>
  2337. </div>
  2338. <h2 id="_files">FILES</h2>
  2339. <div class="sectionbody">
  2340. <h3 id="_aria2_conf">aria2.conf</h3><div style="clear:left"></div>
  2341. <div class="paragraph"><p>By default, aria2 parses <em>$HOME/.aria2/aria2.conf</em> as a configuraiton
  2342. file. You can specify the path to configuration file using
  2343. <strong>--conf-path</strong> option. If you don&#8217;t want to use the configuraitonf
  2344. file, use <strong>--no-conf</strong> option.</p></div>
  2345. <div class="paragraph"><p>The configuration file is a text file and has 1 option per each
  2346. line. In each line, you can specify name-value pair in the format:
  2347. NAME=VALUE, where name is the long command-line option name without
  2348. "--" prefix. You can use same syntax for the command-line option. The
  2349. lines beginning "#" are treated as comments.</p></div>
  2350. <div class="listingblock">
  2351. <div class="content">
  2352. <pre><tt># sample configuration file for aria2c
  2353. listen-port=60000
  2354. dht-listen-port=60000
  2355. seed-ratio=1.0
  2356. max-upload-limit=50K
  2357. ftp-pasv=true</tt></pre>
  2358. </div></div>
  2359. <h3 id="_dht_dat">dht.dat</h3><div style="clear:left"></div>
  2360. <div class="paragraph"><p>By default, the routing table of DHT is saved to the path $HOME/.aria2/dht.dat.</p></div>
  2361. <h3 id="_control_file">Control File</h3><div style="clear:left"></div>
  2362. <div class="paragraph"><p>aria2 uses a control file to track the progress of a download. A
  2363. control file is placed in the same directory as the downloading file
  2364. and its filename is the filename of downloading file with ".aria2"
  2365. appended. For example, if you are downloading file.zip, then the
  2366. control file should be file.zip.aria2. (There is a exception for this
  2367. naming convention. If you are downloading a multi torrent, its
  2368. control file is the "top directory" name of the torrent with ".aria2"
  2369. appended. The "top directory" name is a value of "name" key in "info"
  2370. directory in a torrent file.)</p></div>
  2371. <div class="paragraph"><p>Usually a control file is deleted once download completed. If aria2
  2372. decides that download cannot be resumed(for example, when downloading
  2373. a file from a HTTP server which doesn&#8217;t support resume), a control
  2374. file is not created.</p></div>
  2375. <div class="paragraph"><p>Normally if you lose a control file, you cannot resume download. But
  2376. if you have a torrent or metalink with chunk checksums for the file,
  2377. you can resume the download without a control file by giving -V option
  2378. to aria2c in command-line.</p></div>
  2379. <h3 id="_input_file">Input File</h3><div style="clear:left"></div>
  2380. <div class="paragraph"><p>The input file can contain a list of URIs for aria2 to download. You
  2381. can specify multiple URIs for a single entity: separate URIs on a
  2382. single line using the TAB character.</p></div>
  2383. <div class="paragraph"><p>Each line is treated as if it is provided in command-line argument.
  2384. Therefore they are affected by <strong>-Z</strong> and <strong>-P</strong> options.</p></div>
  2385. <div class="paragraph"><p>Lines starting with "#" are treated as comments and skipped.</p></div>
  2386. <div class="paragraph"><p>Additionally, the following options can be specified after each line
  2387. of URIs. These optional lines must start with white space(s).</p></div>
  2388. <div class="ulist"><ul>
  2389. <li>
  2390. <p>
  2391. dir
  2392. </p>
  2393. </li>
  2394. <li>
  2395. <p>
  2396. check-integrity
  2397. </p>
  2398. </li>
  2399. <li>
  2400. <p>
  2401. continue
  2402. </p>
  2403. </li>
  2404. <li>
  2405. <p>
  2406. all-proxy
  2407. </p>
  2408. </li>
  2409. <li>
  2410. <p>
  2411. all-proxy-user
  2412. </p>
  2413. </li>
  2414. <li>
  2415. <p>
  2416. all-proxy-passwd
  2417. </p>
  2418. </li>
  2419. <li>
  2420. <p>
  2421. connect-timeout
  2422. </p>
  2423. </li>
  2424. <li>
  2425. <p>
  2426. dry-run
  2427. </p>
  2428. </li>
  2429. <li>
  2430. <p>
  2431. lowest-speed-limit
  2432. </p>
  2433. </li>
  2434. <li>
  2435. <p>
  2436. max-file-not-found
  2437. </p>
  2438. </li>
  2439. <li>
  2440. <p>
  2441. max-tries
  2442. </p>
  2443. </li>
  2444. <li>
  2445. <p>
  2446. no-proxy
  2447. </p>
  2448. </li>
  2449. <li>
  2450. <p>
  2451. out
  2452. </p>
  2453. </li>
  2454. <li>
  2455. <p>
  2456. proxy-method
  2457. </p>
  2458. </li>
  2459. <li>
  2460. <p>
  2461. remote-time
  2462. </p>
  2463. </li>
  2464. <li>
  2465. <p>
  2466. split
  2467. </p>
  2468. </li>
  2469. <li>
  2470. <p>
  2471. timeout
  2472. </p>
  2473. </li>
  2474. <li>
  2475. <p>
  2476. http-auth-challenge
  2477. </p>
  2478. </li>
  2479. <li>
  2480. <p>
  2481. http-no-cache
  2482. </p>
  2483. </li>
  2484. <li>
  2485. <p>
  2486. http-user
  2487. </p>
  2488. </li>
  2489. <li>
  2490. <p>
  2491. http-passwd
  2492. </p>
  2493. </li>
  2494. <li>
  2495. <p>
  2496. http-proxy
  2497. </p>
  2498. </li>
  2499. <li>
  2500. <p>
  2501. http-proxy-user
  2502. </p>
  2503. </li>
  2504. <li>
  2505. <p>
  2506. http-proxy-passwd
  2507. </p>
  2508. </li>
  2509. <li>
  2510. <p>
  2511. https-proxy
  2512. </p>
  2513. </li>
  2514. <li>
  2515. <p>
  2516. https-proxy-user
  2517. </p>
  2518. </li>
  2519. <li>
  2520. <p>
  2521. https-proxy-passwd
  2522. </p>
  2523. </li>
  2524. <li>
  2525. <p>
  2526. referer
  2527. </p>
  2528. </li>
  2529. <li>
  2530. <p>
  2531. enable-http-keep-alive
  2532. </p>
  2533. </li>
  2534. <li>
  2535. <p>
  2536. enable-http-pipelining
  2537. </p>
  2538. </li>
  2539. <li>
  2540. <p>
  2541. header
  2542. </p>
  2543. </li>
  2544. <li>
  2545. <p>
  2546. use-head
  2547. </p>
  2548. </li>
  2549. <li>
  2550. <p>
  2551. user-agent
  2552. </p>
  2553. </li>
  2554. <li>
  2555. <p>
  2556. ftp-user
  2557. </p>
  2558. </li>
  2559. <li>
  2560. <p>
  2561. ftp-passwd
  2562. </p>
  2563. </li>
  2564. <li>
  2565. <p>
  2566. ftp-pasv
  2567. </p>
  2568. </li>
  2569. <li>
  2570. <p>
  2571. ftp-proxy
  2572. </p>
  2573. </li>
  2574. <li>
  2575. <p>
  2576. ftp-proxy-user
  2577. </p>
  2578. </li>
  2579. <li>
  2580. <p>
  2581. ftp-proxy-passwd
  2582. </p>
  2583. </li>
  2584. <li>
  2585. <p>
  2586. ftp-type
  2587. </p>
  2588. </li>
  2589. <li>
  2590. <p>
  2591. ftp-reuse-connection
  2592. </p>
  2593. </li>
  2594. <li>
  2595. <p>
  2596. no-netrc
  2597. </p>
  2598. </li>
  2599. <li>
  2600. <p>
  2601. reuse-uri
  2602. </p>
  2603. </li>
  2604. <li>
  2605. <p>
  2606. select-file
  2607. </p>
  2608. </li>
  2609. <li>
  2610. <p>
  2611. bt-enable-lpd
  2612. </p>
  2613. </li>
  2614. <li>
  2615. <p>
  2616. bt-external-ip
  2617. </p>
  2618. </li>
  2619. <li>
  2620. <p>
  2621. bt-hash-check-seed
  2622. </p>
  2623. </li>
  2624. <li>
  2625. <p>
  2626. bt-max-open-files
  2627. </p>
  2628. </li>
  2629. <li>
  2630. <p>
  2631. bt-max-peers
  2632. </p>
  2633. </li>
  2634. <li>
  2635. <p>
  2636. bt-metadata-only
  2637. </p>
  2638. </li>
  2639. <li>
  2640. <p>
  2641. bt-min-crypto-level
  2642. </p>
  2643. </li>
  2644. <li>
  2645. <p>
  2646. bt-prioritize-piece
  2647. </p>
  2648. </li>
  2649. <li>
  2650. <p>
  2651. bt-require-crypto
  2652. </p>
  2653. </li>
  2654. <li>
  2655. <p>
  2656. bt-request-peer-speed-limit
  2657. </p>
  2658. </li>
  2659. <li>
  2660. <p>
  2661. bt-save-metadata
  2662. </p>
  2663. </li>
  2664. <li>
  2665. <p>
  2666. bt-seed-unverified
  2667. </p>
  2668. </li>
  2669. <li>
  2670. <p>
  2671. bt-stop-timeout
  2672. </p>
  2673. </li>
  2674. <li>
  2675. <p>
  2676. bt-tracker-interval
  2677. </p>
  2678. </li>
  2679. <li>
  2680. <p>
  2681. enable-peer-exchange
  2682. </p>
  2683. </li>
  2684. <li>
  2685. <p>
  2686. follow-torrent
  2687. </p>
  2688. </li>
  2689. <li>
  2690. <p>
  2691. index-out
  2692. </p>
  2693. </li>
  2694. <li>
  2695. <p>
  2696. max-upload-limit
  2697. </p>
  2698. </li>
  2699. <li>
  2700. <p>
  2701. seed-ratio
  2702. </p>
  2703. </li>
  2704. <li>
  2705. <p>
  2706. seed-time
  2707. </p>
  2708. </li>
  2709. <li>
  2710. <p>
  2711. follow-metalink
  2712. </p>
  2713. </li>
  2714. <li>
  2715. <p>
  2716. metalink-servers
  2717. </p>
  2718. </li>
  2719. <li>
  2720. <p>
  2721. metalink-language
  2722. </p>
  2723. </li>
  2724. <li>
  2725. <p>
  2726. metalink-location
  2727. </p>
  2728. </li>
  2729. <li>
  2730. <p>
  2731. metalink-os
  2732. </p>
  2733. </li>
  2734. <li>
  2735. <p>
  2736. metalink-version
  2737. </p>
  2738. </li>
  2739. <li>
  2740. <p>
  2741. metalink-preferred-protocol
  2742. </p>
  2743. </li>
  2744. <li>
  2745. <p>
  2746. metalink-enable-unique-protocol
  2747. </p>
  2748. </li>
  2749. <li>
  2750. <p>
  2751. allow-overwrite
  2752. </p>
  2753. </li>
  2754. <li>
  2755. <p>
  2756. allow-piece-length-change
  2757. </p>
  2758. </li>
  2759. <li>
  2760. <p>
  2761. async-dns
  2762. </p>
  2763. </li>
  2764. <li>
  2765. <p>
  2766. auto-file-renaming
  2767. </p>
  2768. </li>
  2769. <li>
  2770. <p>
  2771. file-allocation
  2772. </p>
  2773. </li>
  2774. <li>
  2775. <p>
  2776. max-download-limit
  2777. </p>
  2778. </li>
  2779. <li>
  2780. <p>
  2781. no-file-allocation-limit
  2782. </p>
  2783. </li>
  2784. <li>
  2785. <p>
  2786. parameterized-uri
  2787. </p>
  2788. </li>
  2789. <li>
  2790. <p>
  2791. realtime-chunk-checksum
  2792. </p>
  2793. </li>
  2794. <li>
  2795. <p>
  2796. remove-control-file
  2797. </p>
  2798. </li>
  2799. </ul></div>
  2800. <div class="paragraph"><p>These options have exactly same meaning of the ones in the
  2801. command-line options, but it just applies to the URIs it belongs to.</p></div>
  2802. <div class="paragraph"><p>For example, the content of uri.txt is</p></div>
  2803. <div class="listingblock">
  2804. <div class="content">
  2805. <pre><tt>http://server/file.iso http://mirror/file.iso
  2806. dir=/iso_images
  2807. out=file.img
  2808. http://foo/bar</tt></pre>
  2809. </div></div>
  2810. <div class="paragraph"><p>If aria2 is executed with <strong>-i</strong> uri.txt <strong>-d</strong> /tmp options, then
  2811. <em>file.iso</em> is saved as <em>/iso_images/file.img</em> and it is downloaded
  2812. from http://server/file.iso and http://mirror/file.iso. The file
  2813. <em>bar</em> is downloaded from http://foo/bar and saved as <em>/tmp/bar</em>.</p></div>
  2814. <div class="paragraph"><p>In some cases, <strong>out</strong> parameter has no effect. See note of <strong>--out</strong>
  2815. option for the restrictions.</p></div>
  2816. <h3 id="_server_performance_profile">Server Performance Profile</h3><div style="clear:left"></div>
  2817. <div class="paragraph"><p>This section describes the format of server performance profile. The
  2818. file is plain text and each line has several NAME=VALUE pair,
  2819. delimited by comma. Currently following NAMEs are recognized:</p></div>
  2820. <div class="dlist"><dl>
  2821. <dt class="hdlist1">
  2822. host
  2823. </dt>
  2824. <dd>
  2825. <p>
  2826. Hostname of the server. Required.
  2827. </p>
  2828. </dd>
  2829. <dt class="hdlist1">
  2830. protocol
  2831. </dt>
  2832. <dd>
  2833. <p>
  2834. Protocol for this profile, such as ftp, http. Required.
  2835. </p>
  2836. </dd>
  2837. <dt class="hdlist1">
  2838. dl_speed
  2839. </dt>
  2840. <dd>
  2841. <p>
  2842. The average download speed observed in the previous download in
  2843. bytes per sec. Required.
  2844. </p>
  2845. </dd>
  2846. <dt class="hdlist1">
  2847. sc_avg_speed
  2848. </dt>
  2849. <dd>
  2850. <p>
  2851. The average download speed observed in the previous download in
  2852. bytes per sec. This value is only updated if the download is done in
  2853. single connection environment and only used by
  2854. AdaptiveURISelector. Optional.
  2855. </p>
  2856. </dd>
  2857. <dt class="hdlist1">
  2858. mc_avg_speed
  2859. </dt>
  2860. <dd>
  2861. <p>
  2862. The average download speed observed in the previous download in
  2863. bytes per sec. This value is only updated if the download is done in
  2864. multi connection environment and only used by
  2865. AdaptiveURISelector. Optional.
  2866. </p>
  2867. </dd>
  2868. <dt class="hdlist1">
  2869. counter
  2870. </dt>
  2871. <dd>
  2872. <p>
  2873. How many times the server is used. Currently this value is only used
  2874. by AdaptiveURISelector. Optional.
  2875. </p>
  2876. </dd>
  2877. <dt class="hdlist1">
  2878. last_updated
  2879. </dt>
  2880. <dd>
  2881. <p>
  2882. Last contact time in GMT with this server, specified in the seconds
  2883. since the Epoch(00:00:00 on January 1, 1970, UTC). Required.
  2884. </p>
  2885. </dd>
  2886. <dt class="hdlist1">
  2887. status
  2888. </dt>
  2889. <dd>
  2890. <p>
  2891. ERROR is set when server cannot be reached or out-of-service or
  2892. timeout occurred. Otherwise, OK is set.
  2893. </p>
  2894. </dd>
  2895. </dl></div>
  2896. <div class="paragraph"><p>Those fields must exist in one line. The order of the fields is not
  2897. significant. You can put pairs other than the above; they are simply
  2898. ignored.</p></div>
  2899. <div class="paragraph"><p>An example follows:</p></div>
  2900. <div class="listingblock">
  2901. <div class="content">
  2902. <pre><tt>host=localhost, protocol=http, dl_speed=32000, last_updated=1222491640, status=OK
  2903. host=localhost, protocol=ftp, dl_speed=0, last_updated=1222491632, status=ERROR</tt></pre>
  2904. </div></div>
  2905. </div>
  2906. <h2 id="_xml_rpc_interface">XML-RPC INTERFACE</h2>
  2907. <div class="sectionbody">
  2908. <h3 id="_terminology">Terminology</h3><div style="clear:left"></div>
  2909. <div class="dlist"><dl>
  2910. <dt class="hdlist1">
  2911. GID
  2912. </dt>
  2913. <dd>
  2914. <p>
  2915. GID(or gid) is the key to manage each download. Each download has an
  2916. unique GID. Currently GID looks like an integer, but don&#8217;t treat it
  2917. as integer because it may be changed to another type in the future
  2918. release. Please note that GID is session local and not persisted
  2919. when aria2 exits.
  2920. </p>
  2921. </dd>
  2922. </dl></div>
  2923. <h3 id="_methods">Methods</h3><div style="clear:left"></div>
  2924. <div class="paragraph"><p><strong>aria2.addUri</strong> <em>uris[, options[, position]]</em></p></div>
  2925. <div class="paragraph"><p>This method adds new HTTP(S)/FTP/BitTorrent Magnet URI. <em>uris</em> is of
  2926. type array and its element is URI which is of type string. For
  2927. BitTorrent Magnet URI, <em>uris</em> must have only one element and it should
  2928. be BitTorrent Magnet URI. <em>options</em> is of type struct and its members
  2929. are a pair of option name and value. See <strong>Options</strong> below for more
  2930. details. If <em>position</em> is given as an integer starting from 0, the
  2931. new download is inserted at <em>position</em> in the waiting queue. If
  2932. <em>position</em> is not given or <em>position</em> is larger than the size of the
  2933. queue, it is appended at the end of the queue. This method returns
  2934. GID of registered download.</p></div>
  2935. <div class="paragraph"><p><strong>aria2.addTorrent</strong> <em>torrent[, uris[, options[, position]]]</em></p></div>
  2936. <div class="paragraph"><p>This method adds BitTorrent download by uploading .torrent file. If
  2937. you want to add BitTorrent Magnet URI, use <strong>aria2.addUri</strong> method
  2938. instead. <em>torrent</em> is of type base64 which contains Base64-encoded
  2939. .torrent file. <em>uris</em> is of type array and its element is URI which
  2940. is of type string. <em>uris</em> is used for Web-seeding. For single file
  2941. torrents, URI can be a complete URI pointing to the resource or if URI
  2942. ends with /, name in torrent file is added. For multi-file torrents,
  2943. name and path in torrent are added to form a URI for each file.
  2944. <em>options</em> is of type struct and its members are a pair of option name
  2945. and value. See <strong>Options</strong> below for more details. If <em>position</em> is
  2946. given as an integer starting from 0, the new download is inserted at
  2947. <em>position</em> in the waiting queue. If <em>position</em> is not given or
  2948. <em>position</em> is larger than the size of the queue, it is appended at the
  2949. end of the queue. This method returns GID of registered download.</p></div>
  2950. <div class="paragraph"><p><strong>aria2.addMetalink</strong> <em>metalink[, options[, position]]</em></p></div>
  2951. <div class="paragraph"><p>This method adds Metalink download by uploading .metalink file.
  2952. <em>metalink</em> is of type base64 which contains Base64-encoded .metalink
  2953. file. <em>options</em> is of type struct and its members are a pair of
  2954. option name and value. See <strong>Options</strong> below for more details. If
  2955. <em>position</em> is given as an integer starting from 0, the new download is
  2956. inserted at <em>position</em> in the waiting queue. If <em>position</em> is not
  2957. given or <em>position</em> is larger than the size of the queue, it is
  2958. appended at the end of the queue. This method returns array of GID of
  2959. registered download.</p></div>
  2960. <div class="paragraph"><p><strong>aria2.remove</strong> <em>gid</em></p></div>
  2961. <div class="paragraph"><p>This method removes the download denoted by <em>gid</em>. <em>gid</em> is of type
  2962. string. If specified download is in progress, it is stopped at
  2963. first. The status of removed download becomes "removed". This method
  2964. returns GID of removed download.</p></div>
  2965. <div class="paragraph"><p><strong>aria2.forceRemove</strong> <em>gid</em></p></div>
  2966. <div class="paragraph"><p>This method removes the download denoted by <em>gid</em>. This method
  2967. behaves just like <strong>aria2.remove</strong> except that this method removes
  2968. download without any action which takes time such as contacting
  2969. BitTorrent tracker.</p></div>
  2970. <div class="paragraph"><p><strong>aria2.tellStatus</strong> <em>gid</em></p></div>
  2971. <div class="paragraph"><p>This method returns download progress of the download denoted by
  2972. <em>gid</em>. <em>gid</em> is of type string. The response is of type struct and it
  2973. contains following keys. The value type is string.</p></div>
  2974. <div class="dlist"><dl>
  2975. <dt class="hdlist1">
  2976. gid
  2977. </dt>
  2978. <dd>
  2979. <p>
  2980. GID of this download.
  2981. </p>
  2982. </dd>
  2983. <dt class="hdlist1">
  2984. status
  2985. </dt>
  2986. <dd>
  2987. <p>
  2988. "active" for currently downloading/seeding entry. "waiting" for the
  2989. entry in the queue; download is not started. "error" for the stopped
  2990. download because of error. "complete" for the stopped and completed
  2991. download. "removed" for the download removed by user.
  2992. </p>
  2993. </dd>
  2994. <dt class="hdlist1">
  2995. totalLength
  2996. </dt>
  2997. <dd>
  2998. <p>
  2999. Total length of this download in bytes.
  3000. </p>
  3001. </dd>
  3002. <dt class="hdlist1">
  3003. completedLength
  3004. </dt>
  3005. <dd>
  3006. <p>
  3007. Completed length of this download in bytes.
  3008. </p>
  3009. </dd>
  3010. <dt class="hdlist1">
  3011. uploadLength
  3012. </dt>
  3013. <dd>
  3014. <p>
  3015. Uploaded length of this download in bytes.
  3016. </p>
  3017. </dd>
  3018. <dt class="hdlist1">
  3019. bitfield
  3020. </dt>
  3021. <dd>
  3022. <p>
  3023. Hexadecimal representation of the download progress. The highest bit
  3024. corresponds to piece index 0. The set bits indicate the piece is
  3025. available and unset bits indicate the piece is missing. The spare
  3026. bits at the end are set to zero.
  3027. </p>
  3028. </dd>
  3029. <dt class="hdlist1">
  3030. downloadSpeed
  3031. </dt>
  3032. <dd>
  3033. <p>
  3034. Download speed of this download measured in bytes/sec.
  3035. </p>
  3036. </dd>
  3037. <dt class="hdlist1">
  3038. uploadSpeed
  3039. </dt>
  3040. <dd>
  3041. <p>
  3042. Upload speed of this download measured in bytes/sec.
  3043. </p>
  3044. </dd>
  3045. <dt class="hdlist1">
  3046. infoHash
  3047. </dt>
  3048. <dd>
  3049. <p>
  3050. InfoHash. BitTorrent only.
  3051. </p>
  3052. </dd>
  3053. <dt class="hdlist1">
  3054. numSeeders
  3055. </dt>
  3056. <dd>
  3057. <p>
  3058. The number of seeders the client has connected to. BitTorrent only.
  3059. </p>
  3060. </dd>
  3061. <dt class="hdlist1">
  3062. pieceLength
  3063. </dt>
  3064. <dd>
  3065. <p>
  3066. Piece length in bytes.
  3067. </p>
  3068. </dd>
  3069. <dt class="hdlist1">
  3070. numPieces
  3071. </dt>
  3072. <dd>
  3073. <p>
  3074. The number of pieces.
  3075. </p>
  3076. </dd>
  3077. <dt class="hdlist1">
  3078. connections
  3079. </dt>
  3080. <dd>
  3081. <p>
  3082. The number of peers/servers the client has connected to.
  3083. </p>
  3084. </dd>
  3085. <dt class="hdlist1">
  3086. errorCode
  3087. </dt>
  3088. <dd>
  3089. <p>
  3090. The last error code occurred in this download. The value is of type
  3091. string. The error codes are defined in EXIT STATUS section. This
  3092. value is only available for stopped/completed downloads.
  3093. </p>
  3094. </dd>
  3095. <dt class="hdlist1">
  3096. followedBy
  3097. </dt>
  3098. <dd>
  3099. <p>
  3100. List of GIDs which are generated by the consequence of this
  3101. download. For example, when aria2 downloaded Metalink file, it
  3102. generates downloads described in it(see <strong>--follow-metalink</strong>
  3103. option). This value is useful to track these auto generated
  3104. downloads. If there is no such downloads, this key will not
  3105. be included in the response.
  3106. </p>
  3107. </dd>
  3108. <dt class="hdlist1">
  3109. belongsTo
  3110. </dt>
  3111. <dd>
  3112. <p>
  3113. GID of a parent download. Some downloads are a part of another
  3114. download. For example, if a file in Metalink has BitTorrent
  3115. resource, the download of .torrent is a part of that file. If this
  3116. download has no parent, this key will not be included in the
  3117. response.
  3118. </p>
  3119. </dd>
  3120. <dt class="hdlist1">
  3121. dir
  3122. </dt>
  3123. <dd>
  3124. <p>
  3125. Directory to save files. This key is not available for stopped
  3126. downloads.
  3127. </p>
  3128. </dd>
  3129. <dt class="hdlist1">
  3130. files
  3131. </dt>
  3132. <dd>
  3133. <p>
  3134. Returns the list of files. The element of list is the same struct
  3135. used in <strong>aria2.getFiles</strong> method.
  3136. </p>
  3137. </dd>
  3138. <dt class="hdlist1">
  3139. bittorrent
  3140. </dt>
  3141. <dd>
  3142. <p>
  3143. Struct which contains information retrieved from .torrent
  3144. file. BitTorrent only. It contains following keys.
  3145. </p>
  3146. <div class="dlist"><dl>
  3147. <dt class="hdlist1">
  3148. announceList
  3149. </dt>
  3150. <dd>
  3151. <p>
  3152. List of lists of announce URI. If .torrent file contains announce
  3153. and no announce-list, announce is converted to announce-list
  3154. format.
  3155. </p>
  3156. </dd>
  3157. <dt class="hdlist1">
  3158. comment
  3159. </dt>
  3160. <dd>
  3161. <p>
  3162. The comment for the torrent. comment.utf-8 is used if available.
  3163. </p>
  3164. </dd>
  3165. <dt class="hdlist1">
  3166. creationDate
  3167. </dt>
  3168. <dd>
  3169. <p>
  3170. The creation time of the torrent. The value is an integer since
  3171. the Epoch, measured in seconds.
  3172. </p>
  3173. </dd>
  3174. <dt class="hdlist1">
  3175. mode
  3176. </dt>
  3177. <dd>
  3178. <p>
  3179. File mode of the torrent. The value is either <em>single</em> or <em>multi</em>.
  3180. </p>
  3181. </dd>
  3182. <dt class="hdlist1">
  3183. info
  3184. </dt>
  3185. <dd>
  3186. <p>
  3187. Struct which contains data from Info dictionary. It contains
  3188. following keys.
  3189. </p>
  3190. <div class="dlist"><dl>
  3191. <dt class="hdlist1">
  3192. name
  3193. </dt>
  3194. <dd>
  3195. <p>
  3196. name in info dictionary. name.utf-8 is used if available.
  3197. </p>
  3198. </dd>
  3199. </dl></div>
  3200. </dd>
  3201. </dl></div>
  3202. </dd>
  3203. </dl></div>
  3204. <div class="paragraph"><p><strong>aria2.getUris</strong> <em>gid</em></p></div>
  3205. <div class="paragraph"><p>This method returns URIs used in the download denoted by <em>gid</em>. <em>gid</em>
  3206. is of type string. The response is of type array and its element is of
  3207. type struct and it contains following keys. The value type is string.</p></div>
  3208. <div class="dlist"><dl>
  3209. <dt class="hdlist1">
  3210. uri
  3211. </dt>
  3212. <dd>
  3213. <p>
  3214. URI
  3215. </p>
  3216. </dd>
  3217. <dt class="hdlist1">
  3218. status
  3219. </dt>
  3220. <dd>
  3221. <p>
  3222. <em>used</em> if the URI is already used. <em>waiting</em> if the URI is waiting
  3223. in the queue.
  3224. </p>
  3225. </dd>
  3226. </dl></div>
  3227. <div class="paragraph"><p><strong>aria2.getFiles</strong> <em>gid</em></p></div>
  3228. <div class="paragraph"><p>This method returns file list of the download denoted by <em>gid</em>. <em>gid</em>
  3229. is of type string. The response is of type array and its element is of
  3230. type struct and it contains following keys. The value type is string.</p></div>
  3231. <div class="dlist"><dl>
  3232. <dt class="hdlist1">
  3233. index
  3234. </dt>
  3235. <dd>
  3236. <p>
  3237. Index of file. Starting with 1. This is the same order with the
  3238. files in multi-file torrent.
  3239. </p>
  3240. </dd>
  3241. <dt class="hdlist1">
  3242. path
  3243. </dt>
  3244. <dd>
  3245. <p>
  3246. File path.
  3247. </p>
  3248. </dd>
  3249. <dt class="hdlist1">
  3250. length
  3251. </dt>
  3252. <dd>
  3253. <p>
  3254. File size in bytes.
  3255. </p>
  3256. </dd>
  3257. <dt class="hdlist1">
  3258. selected
  3259. </dt>
  3260. <dd>
  3261. <p>
  3262. "true" if this file is selected by <strong>--select-file</strong> option. If
  3263. <strong>--select-file</strong> is not specified or this is single torrent or no
  3264. torrent download, this value is always "true". Otherwise "false".
  3265. </p>
  3266. </dd>
  3267. <dt class="hdlist1">
  3268. uris
  3269. </dt>
  3270. <dd>
  3271. <p>
  3272. Returns the list of URI for this file. The element of list is the
  3273. same struct used in <strong>aria2.getUris</strong> method.
  3274. </p>
  3275. </dd>
  3276. </dl></div>
  3277. <div class="paragraph"><p><strong>aria2.getPeers</strong> <em>gid</em></p></div>
  3278. <div class="paragraph"><p>This method returns peer list of the download denoted by <em>gid</em>. <em>gid</em>
  3279. is of type string. This method is for BitTorrent only. The response
  3280. is of type array and its element is of type struct and it contains
  3281. following keys. The value type is string.</p></div>
  3282. <div class="dlist"><dl>
  3283. <dt class="hdlist1">
  3284. peerId
  3285. </dt>
  3286. <dd>
  3287. <p>
  3288. Percent-encoded peer ID.
  3289. </p>
  3290. </dd>
  3291. <dt class="hdlist1">
  3292. ip
  3293. </dt>
  3294. <dd>
  3295. <p>
  3296. IP address of the peer.
  3297. </p>
  3298. </dd>
  3299. <dt class="hdlist1">
  3300. port
  3301. </dt>
  3302. <dd>
  3303. <p>
  3304. Port number of the peer.
  3305. </p>
  3306. </dd>
  3307. <dt class="hdlist1">
  3308. bitfield
  3309. </dt>
  3310. <dd>
  3311. <p>
  3312. Hexadecimal representation of the download progress of the peer. The
  3313. highest bit corresponds to piece index 0. The set bits indicate the
  3314. piece is available and unset bits indicate the piece is missing. The
  3315. spare bits at the end are set to zero.
  3316. </p>
  3317. </dd>
  3318. <dt class="hdlist1">
  3319. amChoking
  3320. </dt>
  3321. <dd>
  3322. <p>
  3323. "true" if this client is choking the peer. Otherwise "false".
  3324. </p>
  3325. </dd>
  3326. <dt class="hdlist1">
  3327. peerChoking
  3328. </dt>
  3329. <dd>
  3330. <p>
  3331. "true" if the peer is choking this client. Otherwise "false".
  3332. </p>
  3333. </dd>
  3334. <dt class="hdlist1">
  3335. downloadSpeed
  3336. </dt>
  3337. <dd>
  3338. <p>
  3339. Download speed (byte/sec) that this client obtains from the peer.
  3340. </p>
  3341. </dd>
  3342. <dt class="hdlist1">
  3343. uploadSpeed
  3344. </dt>
  3345. <dd>
  3346. <p>
  3347. Upload speed(byte/sec) that this client uploads to the peer.
  3348. </p>
  3349. </dd>
  3350. <dt class="hdlist1">
  3351. seeder
  3352. </dt>
  3353. <dd>
  3354. <p>
  3355. "true" is this client is a seeder. Otherwise "false".
  3356. </p>
  3357. </dd>
  3358. </dl></div>
  3359. <div class="paragraph"><p><strong>aria2.getServers</strong> <em>gid</em></p></div>
  3360. <div class="paragraph"><p>This method returns currently connected HTTP(S)/FTP servers of the download denoted by <em>gid</em>. <em>gid</em> is of type string. The response
  3361. is of type array and its element is of type struct and it contains
  3362. following keys. The value type is string.</p></div>
  3363. <div class="dlist"><dl>
  3364. <dt class="hdlist1">
  3365. index
  3366. </dt>
  3367. <dd>
  3368. <p>
  3369. Index of file. Starting with 1. This is the same order with the
  3370. files in multi-file torrent.
  3371. </p>
  3372. </dd>
  3373. <dt class="hdlist1">
  3374. servers
  3375. </dt>
  3376. <dd>
  3377. <p>
  3378. The list of struct which contains following keys.
  3379. </p>
  3380. <div class="dlist"><dl>
  3381. <dt class="hdlist1">
  3382. uri
  3383. </dt>
  3384. <dd>
  3385. <p>
  3386. URI originally added.
  3387. </p>
  3388. </dd>
  3389. <dt class="hdlist1">
  3390. currentUri
  3391. </dt>
  3392. <dd>
  3393. <p>
  3394. This is the URI currently used for downloading. If redirection is
  3395. involved, currentUri and uri may differ.
  3396. </p>
  3397. </dd>
  3398. <dt class="hdlist1">
  3399. downloadSpeed
  3400. </dt>
  3401. <dd>
  3402. <p>
  3403. Download speed (byte/sec)
  3404. </p>
  3405. </dd>
  3406. </dl></div>
  3407. </dd>
  3408. </dl></div>
  3409. <div class="paragraph"><p><strong>aria2.tellActive</strong></p></div>
  3410. <div class="paragraph"><p>This method returns the list of active downloads. The response is of
  3411. type array and its element is the same struct returned by
  3412. <strong>aria2.tellStatus</strong> method.</p></div>
  3413. <div class="paragraph"><p><strong>aria2.tellWaiting</strong> <em>offset, num</em></p></div>
  3414. <div class="paragraph"><p>This method returns the list of waiting download. <em>offset</em> is of type
  3415. integer and specifies the offset from the download waiting at the
  3416. front. <em>num</em> is of type integer and specifies the number of downloads
  3417. to be returned.</p></div>
  3418. <div class="paragraph"><p>If offset is a positive integer, this method returns downloads in the
  3419. range of [<em>offset</em>, <em>offset</em>+<em>num</em>).</p></div>
  3420. <div class="paragraph"><p><em>offset</em> can be a negative integer. <em>offset</em> == -1 points last
  3421. download in the waiting queue and <em>offset</em> == -2 points the download
  3422. before the last download, and so on. The downloads in the response are
  3423. in reversed order.</p></div>
  3424. <div class="paragraph"><p>For example, imagine that three downloads "A","B" and "C" are waiting
  3425. in this order. aria2.tellWaiting(0, 1) returns
  3426. ["A"]. aria2.tellWaiting(1, 2) returns ["B", "C"].
  3427. aria2.tellWaiting(-1, 2) returns ["C", "B"].</p></div>
  3428. <div class="paragraph"><p>The response is of type array and its element is the same struct
  3429. returned by <strong>aria2.tellStatus</strong> method.</p></div>
  3430. <div class="paragraph"><p><strong>aria2.tellStopped</strong> <em>offset, num</em></p></div>
  3431. <div class="paragraph"><p>This method returns the list of stopped download. <em>offset</em> is of type
  3432. integer and specifies the offset from the oldest download. <em>num</em> is of
  3433. type integer and specifies the number of downloads to be returned.</p></div>
  3434. <div class="paragraph"><p><em>offset</em> and <em>num</em> have the same semantics as <strong>aria2.tellWaiting</strong>
  3435. method.</p></div>
  3436. <div class="paragraph"><p>The response is of type array and its element is the same struct
  3437. returned by <strong>aria2.tellStatus</strong> method.</p></div>
  3438. <div class="paragraph"><p><strong>aria2.changePosition</strong> <em>gid, pos, how</em></p></div>
  3439. <div class="paragraph"><p>This method changes the position of the download denoted by
  3440. <em>gid</em>. <em>pos</em> is of type integer. <em>how</em> is of type string. If <em>how</em> is
  3441. "POS_SET", it moves the download to a position relative to the
  3442. beginning of the queue. If <em>how</em> is "POS_CUR", it moves the download
  3443. to a position relative to the current position. If <em>how</em> is "POS_END",
  3444. it moves the download to a position relative to the end of the
  3445. queue. If the destination position is less than 0 or beyond the end of
  3446. the queue, it moves the download to the beginning or the end of the
  3447. queue respectively. The response is of type integer and it is the
  3448. destination position.</p></div>
  3449. <div class="paragraph"><p>For example, if GID#1 is placed in position 3, aria2.changePosition(1,
  3450. -1, POS_CUR) will change its position to 2. Additional
  3451. aria2.changePosition(1, 0, POS_SET) will change its position to 0(the
  3452. beginning of the queue).</p></div>
  3453. <div class="paragraph"><p><strong>aria2.changeUri</strong> <em>gid, fileIndex, delUris, addUris[, position]</em></p></div>
  3454. <div class="paragraph"><p>This method removes URIs in <em>delUris</em> from and appends URIs in
  3455. <em>addUris</em> to download denoted by <em>gid</em>. <em>delUris</em> and <em>addUris</em> are
  3456. list of string. A download can contain multiple files and URIs are
  3457. attached to each file. <em>fileIndex</em> is used to select which file to
  3458. remove/attach given URIs. <em>fileIndex</em> is 1-based. <em>position</em> is used
  3459. to specify where URIs are inserted in the existing waiting URI
  3460. list. <em>position</em> is 0-based. When <em>position</em> is omitted, URIs are
  3461. appended to the back of the list. This method first execute removal
  3462. and then addition. <em>position</em> is the position after URIs are removed,
  3463. not the position when this method is called. When removing URI, if
  3464. same URIs exist in download, only one of them is removed for each URI
  3465. in <em>delUris</em>. In other words, there are three URIs
  3466. "http://example.org/aria2" and you want remove them all, you have to
  3467. specify (at least) 3 "http://example.org/aria2" in <em>delUris</em>. This
  3468. method returns a list which contains 2 integers. The first integer is
  3469. the number of URIs deleted. The second integer is the number of URIs
  3470. added.</p></div>
  3471. <div class="paragraph"><p><strong>aria2.getOption</strong> <em>gid</em></p></div>
  3472. <div class="paragraph"><p>This method returns options of the download denoted by <em>gid</em>. The
  3473. response is of type struct. Its key is the name of option. The value type
  3474. is string.</p></div>
  3475. <div class="paragraph"><p><strong>aria2.changeOption</strong> <em>gid, options</em></p></div>
  3476. <div class="paragraph"><p>This method changes options of the download denoted by <em>gid</em>
  3477. dynamically. <em>gid</em> is of type string. <em>options</em> is of type struct
  3478. and the available options are: <strong>bt-max-peers</strong>,
  3479. <strong>bt-request-peer-speed-limit</strong>, <strong>max-download-limit</strong> and
  3480. <strong>max-upload-limit</strong>. This method returns "OK" for success.</p></div>
  3481. <div class="paragraph"><p><strong>aria2.getGlobalOption</strong></p></div>
  3482. <div class="paragraph"><p>This method returns global options. The response is of type
  3483. struct. Its key is the name of option. The value type is string.
  3484. Because global options are used as a template for the options of newly
  3485. added download, the response contains keys returned by
  3486. <strong>aria2.getOption</strong> method.</p></div>
  3487. <div class="paragraph"><p><strong>aria2.changeGlobalOption</strong> <em>options</em></p></div>
  3488. <div class="paragraph"><p>This method changes global options dynamically. <em>options</em> is of type
  3489. struct and the available options are <strong>max-concurrent-downloads</strong>,
  3490. <strong>max-overall-download-limit</strong> and <strong>max-overall-upload-limit</strong>. This
  3491. method returns "OK" for success.</p></div>
  3492. <div class="paragraph"><p><strong>aria2.purgeDownloadResult</strong></p></div>
  3493. <div class="paragraph"><p>This method purges completed/error/removed downloads to free memory.
  3494. This method returns "OK".</p></div>
  3495. <div class="paragraph"><p><strong>aria2.getVersion</strong></p></div>
  3496. <div class="paragraph"><p>This method returns version of the program and the list of enabled
  3497. features. The response is of type struct and contains following keys.</p></div>
  3498. <div class="dlist"><dl>
  3499. <dt class="hdlist1">
  3500. version
  3501. </dt>
  3502. <dd>
  3503. <p>
  3504. Version number of the program in string.
  3505. </p>
  3506. </dd>
  3507. <dt class="hdlist1">
  3508. enabledFeatures
  3509. </dt>
  3510. <dd>
  3511. <p>
  3512. List of enabled features. Each feature name is of type string.
  3513. </p>
  3514. </dd>
  3515. </dl></div>
  3516. <div class="paragraph"><p><strong>aria2.getSessionInfo</strong></p></div>
  3517. <div class="paragraph"><p>This method returns session information.
  3518. The response is of type struct and contains following key.</p></div>
  3519. <div class="dlist"><dl>
  3520. <dt class="hdlist1">
  3521. sessionId
  3522. </dt>
  3523. <dd>
  3524. <p>
  3525. Session ID, which is generated each time when aria2 is invoked.
  3526. </p>
  3527. </dd>
  3528. </dl></div>
  3529. <div class="paragraph"><p><strong>system.multicall</strong> <em>methods</em></p></div>
  3530. <div class="paragraph"><p>This methods encapsulates multiple method calls in a single request.
  3531. <em>methods</em> is of type array and its element is struct. The struct
  3532. contains two keys: "methodName" and "params". "methodName" is the
  3533. method name to call and "params" is array containing parameters to the
  3534. method. This method returns array of responses. The element of array
  3535. will either be a one-item array containing the return value of each
  3536. method call or struct of fault element if an encapsulated method call
  3537. fails.</p></div>
  3538. <h3 id="_error_handling">Error Handling</h3><div style="clear:left"></div>
  3539. <div class="paragraph"><p>In case of error, aria2 returns faultCode=1 and the error message in
  3540. faultString.</p></div>
  3541. <h3 id="_options_2">Options</h3><div style="clear:left"></div>
  3542. <div class="paragraph"><p>Same options for <strong>-i</strong> list are available. See <strong>Input File</strong> subsection
  3543. for complete list of options.</p></div>
  3544. <div class="paragraph"><p>In the option struct, name element is option name(without preceding
  3545. "--") and value element is argument as string.</p></div>
  3546. <div class="listingblock">
  3547. <div class="content">
  3548. <pre><tt>&lt;struct&gt;
  3549. &lt;member&gt;
  3550. &lt;name&gt;split&lt;/name&gt;
  3551. &lt;value&gt;&lt;string&gt;1&lt;/string&gt;&lt;/value&gt;
  3552. &lt;/member&gt;
  3553. &lt;member&gt;
  3554. &lt;name&gt;http-proxy&lt;/name&gt;
  3555. &lt;value&gt;&lt;string&gt;http://proxy/&lt;/string&gt;&lt;/value&gt;
  3556. &lt;/member&gt;
  3557. &lt;/struct&gt;</tt></pre>
  3558. </div></div>
  3559. <div class="paragraph"><p><strong>header</strong> and <strong>index-out</strong> option are allowed multiple times in
  3560. command-line. Since name should be unique in struct(many XML-RPC
  3561. library implementation uses hash or dict for struct), single string is
  3562. not enough. To overcome this situation, they can take array as value
  3563. as well as string.</p></div>
  3564. <div class="listingblock">
  3565. <div class="content">
  3566. <pre><tt>&lt;struct&gt;
  3567. &lt;member&gt;
  3568. &lt;name&gt;header&lt;/name&gt;
  3569. &lt;value&gt;
  3570. &lt;array&gt;
  3571. &lt;data&gt;
  3572. &lt;value&gt;&lt;string&gt;Accept-Language: ja&lt;/string&gt;&lt;/value&gt;
  3573. &lt;value&gt;&lt;string&gt;Accept-Charset: utf-8&lt;/string&gt;&lt;/value&gt;
  3574. &lt;/data&gt;
  3575. &lt;/array&gt;
  3576. &lt;/value&gt;
  3577. &lt;/member&gt;
  3578. &lt;/struct&gt;</tt></pre>
  3579. </div></div>
  3580. <h3 id="_sample_xml_rpc_client_code">Sample XML-RPC Client Code</h3><div style="clear:left"></div>
  3581. <div class="paragraph"><p>The following Ruby script adds <em>http://localhost/aria2.tar.bz2</em> to
  3582. aria2c operated on localhost with option <strong>--dir</strong>=<em>/downloads</em> and
  3583. prints its reponse.</p></div>
  3584. <div class="listingblock">
  3585. <div class="content">
  3586. <pre><tt>#!/usr/bin/env ruby
  3587. require 'xmlrpc/client'
  3588. require 'pp'
  3589. client=XMLRPC::Client.new2("http://localhost:6800/rpc")
  3590. options={ "dir" =&gt; "/downloads" }
  3591. result=client.call("aria2.addUri", [ "http://localhost/aria2.tar.bz2" ], options)
  3592. pp result</tt></pre>
  3593. </div></div>
  3594. <div class="paragraph"><p>If you are a Python lover, you can use xmlrpclib(for Python3.x, use
  3595. xmlrpc.client instead) to interact with aria2.</p></div>
  3596. <div class="listingblock">
  3597. <div class="content">
  3598. <pre><tt>import xmlrpclib
  3599. from pprint import pprint
  3600. s = xmlrpclib.ServerProxy("http://localhost:6800/rpc")
  3601. r = s.aria2.addUri(["http://localhost/aria2.tar.bz2"], {"dir":"/downloads"})
  3602. pprint(r)</tt></pre>
  3603. </div></div>
  3604. </div>
  3605. <h2 id="_example">EXAMPLE</h2>
  3606. <div class="sectionbody">
  3607. <h3 id="_http_ftp_segmented_download">HTTP/FTP Segmented Download</h3><div style="clear:left"></div>
  3608. <h4 id="_download_a_file">Download a file</h4>
  3609. <div class="listingblock">
  3610. <div class="content">
  3611. <pre><tt>aria2c "http://host/file.zip"</tt></pre>
  3612. </div></div>
  3613. <div class="admonitionblock">
  3614. <table><tr>
  3615. <td class="icon">
  3616. <div class="title">Note</div>
  3617. </td>
  3618. <td class="content">aria2 uses 5 connections to download 1 file by default.</td>
  3619. </tr></table>
  3620. </div>
  3621. <h4 id="_download_a_file_using_1_connection">Download a file using 1 connection</h4>
  3622. <div class="listingblock">
  3623. <div class="content">
  3624. <pre><tt>aria2c -s1 "http://host/file.zip"</tt></pre>
  3625. </div></div>
  3626. <div class="admonitionblock">
  3627. <table><tr>
  3628. <td class="icon">
  3629. <div class="title">Note</div>
  3630. </td>
  3631. <td class="content">aria2 uses 5 connections to download 1 file by default.
  3632. -s1 limits the number of connections to just 1.</td>
  3633. </tr></table>
  3634. </div>
  3635. <div class="admonitionblock">
  3636. <table><tr>
  3637. <td class="icon">
  3638. <div class="title">Note</div>
  3639. </td>
  3640. <td class="content">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 URIs as long as they are pointing to the same file.</td>
  3641. </tr></table>
  3642. </div>
  3643. <h4 id="_download_a_file_from_2_different_http_servers">Download a file from 2 different HTTP servers</h4>
  3644. <div class="listingblock">
  3645. <div class="content">
  3646. <pre><tt>aria2c "http://host/file.zip" "http://mirror/file.zip"</tt></pre>
  3647. </div></div>
  3648. <h4 id="_download_a_file_from_http_and_ftp_servers">Download a file from HTTP and FTP servers</h4>
  3649. <div class="listingblock">
  3650. <div class="content">
  3651. <pre><tt>aria2c "http://host1/file.zip" "ftp://host2/file.zip"</tt></pre>
  3652. </div></div>
  3653. <h4 id="_download_files_listed_in_a_text_file_concurrently">Download files listed in a text file concurrently</h4>
  3654. <div class="listingblock">
  3655. <div class="content">
  3656. <pre><tt>aria2c -ifiles.txt -j2</tt></pre>
  3657. </div></div>
  3658. <div class="admonitionblock">
  3659. <table><tr>
  3660. <td class="icon">
  3661. <div class="title">Note</div>
  3662. </td>
  3663. <td class="content">-j option specifies the number of parallel downloads.</td>
  3664. </tr></table>
  3665. </div>
  3666. <h4 id="_using_proxy">Using proxy</h4>
  3667. <div class="paragraph"><p>For HTTP:</p></div>
  3668. <div class="listingblock">
  3669. <div class="content">
  3670. <pre><tt>aria2c --http-proxy="http://proxy:8080" "http://host/file"</tt></pre>
  3671. </div></div>
  3672. <div class="listingblock">
  3673. <div class="content">
  3674. <pre><tt>aria2c --http-proxy="http://proxy:8080" --no-proxy="localhost,127.0.0.1,192.168.0.0/16" "http://host/file"</tt></pre>
  3675. </div></div>
  3676. <div class="paragraph"><p>For FTP:</p></div>
  3677. <div class="listingblock">
  3678. <div class="content">
  3679. <pre><tt>aria2c --ftp-proxy="http://proxy:8080" "ftp://host/file"</tt></pre>
  3680. </div></div>
  3681. <div class="admonitionblock">
  3682. <table><tr>
  3683. <td class="icon">
  3684. <div class="title">Note</div>
  3685. </td>
  3686. <td class="content">See <strong>--http-proxy</strong>, <strong>--https-proxy</strong>, <strong>--ftp-proxy</strong>, <strong>--all-proxy</strong> and
  3687. <strong>--no-proxy</strong> for details. You can specify proxy in the environment
  3688. variables. See <strong>ENVIRONMENT</strong> section.</td>
  3689. </tr></table>
  3690. </div>
  3691. <h4 id="_proxy_with_authorization">Proxy with authorization</h4>
  3692. <div class="listingblock">
  3693. <div class="content">
  3694. <pre><tt>aria2c --http-proxy="http://username:password@proxy:8080" "http://host/file"</tt></pre>
  3695. </div></div>
  3696. <div class="listingblock">
  3697. <div class="content">
  3698. <pre><tt>aria2c --http-proxy="http://proxy:8080" --http-proxy-user="username" --http-proxy-passwd="password" "http://host/file"</tt></pre>
  3699. </div></div>
  3700. <h3 id="_metalink_download">Metalink Download</h3><div style="clear:left"></div>
  3701. <h4 id="_download_files_with_remote_metalink">Download files with remote Metalink</h4>
  3702. <div class="listingblock">
  3703. <div class="content">
  3704. <pre><tt>aria2c --follow-metalink=mem "http://host/file.metalink"</tt></pre>
  3705. </div></div>
  3706. <h4 id="_download_using_a_local_metalink_file">Download using a local metalink file</h4>
  3707. <div class="listingblock">
  3708. <div class="content">
  3709. <pre><tt>aria2c -p --lowest-speed-limit=4000 file.metalink</tt></pre>
  3710. </div></div>
  3711. <div class="admonitionblock">
  3712. <table><tr>
  3713. <td class="icon">
  3714. <div class="title">Note</div>
  3715. </td>
  3716. <td class="content">To pause a download, press Ctrl-C.
  3717. You can resume the transfer by running aria2c with the same argument in the same
  3718. directory.</td>
  3719. </tr></table>
  3720. </div>
  3721. <h4 id="_download_several_local_metalink_files">Download several local metalink files</h4>
  3722. <div class="listingblock">
  3723. <div class="content">
  3724. <pre><tt>aria2c -j2 file1.metalink file2.metalink</tt></pre>
  3725. </div></div>
  3726. <h4 id="_download_only_selected_files_using_index">Download only selected files using index</h4>
  3727. <div class="listingblock">
  3728. <div class="content">
  3729. <pre><tt>aria2c --select-file=1-4,8 file.metalink</tt></pre>
  3730. </div></div>
  3731. <div class="admonitionblock">
  3732. <table><tr>
  3733. <td class="icon">
  3734. <div class="title">Note</div>
  3735. </td>
  3736. <td class="content">The index is printed to the console using -S option.</td>
  3737. </tr></table>
  3738. </div>
  3739. <h4 id="_download_a_file_using_a_local_metalink_file_with_user_preference">Download a file using a local .metalink file with user preference</h4>
  3740. <div class="listingblock">
  3741. <div class="content">
  3742. <pre><tt>aria2c --metalink-location=jp,us --metalink-version=1.1 --metalink-language=en-US file.metalink</tt></pre>
  3743. </div></div>
  3744. <h3 id="_bittorrent_download">BitTorrent Download</h3><div style="clear:left"></div>
  3745. <h4 id="_download_files_from_remote_bittorrent_file">Download files from remote BitTorrent file</h4>
  3746. <div class="listingblock">
  3747. <div class="content">
  3748. <pre><tt>aria2c --follow-torrent=mem "http://host/file.torrent"</tt></pre>
  3749. </div></div>
  3750. <h4 id="_download_using_a_local_torrent_file">Download using a local torrent file</h4>
  3751. <div class="listingblock">
  3752. <div class="content">
  3753. <pre><tt>aria2c --max-upload-limit=40K file.torrent</tt></pre>
  3754. </div></div>
  3755. <div class="admonitionblock">
  3756. <table><tr>
  3757. <td class="icon">
  3758. <div class="title">Note</div>
  3759. </td>
  3760. <td class="content">--max-upload-limit specifies the max of upload rate.</td>
  3761. </tr></table>
  3762. </div>
  3763. <div class="admonitionblock">
  3764. <table><tr>
  3765. <td class="icon">
  3766. <div class="title">Note</div>
  3767. </td>
  3768. <td class="content">To pause a download, press Ctrl-C. You can resume the transfer by running aria2c with the same argument in the same directory.</td>
  3769. </tr></table>
  3770. </div>
  3771. <h4 id="_download_using_bittorrent_magnet_uri">Download using BitTorrent Magnet URI</h4>
  3772. <div class="listingblock">
  3773. <div class="content">
  3774. <pre><tt>aria2c "magnet:?xt=urn:btih:248D0A1CD08284299DE78D5C1ED359BB46717D8C&amp;dn=aria2"</tt></pre>
  3775. </div></div>
  3776. <div class="admonitionblock">
  3777. <table><tr>
  3778. <td class="icon">
  3779. <div class="title">Note</div>
  3780. </td>
  3781. <td class="content">Don&#8217;t forget to quote BitTorrent Magnet URI which includes "&amp;"
  3782. character with single(') or double(") quotation.</td>
  3783. </tr></table>
  3784. </div>
  3785. <h4 id="_download_2_torrents">Download 2 torrents</h4>
  3786. <div class="listingblock">
  3787. <div class="content">
  3788. <pre><tt>aria2c -j2 file1.torrent file2.torrent</tt></pre>
  3789. </div></div>
  3790. <h4 id="_download_a_file_using_torrent_and_http_ftp_server">Download a file using torrent and HTTP/FTP server</h4>
  3791. <div class="listingblock">
  3792. <div class="content">
  3793. <pre><tt>aria2c -Ttest.torrent "http://host1/file" "ftp://host2/file"</tt></pre>
  3794. </div></div>
  3795. <div class="admonitionblock">
  3796. <table><tr>
  3797. <td class="icon">
  3798. <div class="title">Note</div>
  3799. </td>
  3800. <td class="content">Downloading multi file torrent with HTTP/FTP is not supported.</td>
  3801. </tr></table>
  3802. </div>
  3803. <h4 id="_download_only_selected_files_using_index_usually_called_selectable_download">Download only selected files using index(usually called "selectable download")</h4>
  3804. <div class="listingblock">
  3805. <div class="content">
  3806. <pre><tt>aria2c --select-file=1-4,8 file.torrent</tt></pre>
  3807. </div></div>
  3808. <div class="admonitionblock">
  3809. <table><tr>
  3810. <td class="icon">
  3811. <div class="title">Note</div>
  3812. </td>
  3813. <td class="content">The index is printed to the console using -S option.</td>
  3814. </tr></table>
  3815. </div>
  3816. <h4 id="_specify_output_filename">Specify output filename</h4>
  3817. <div class="paragraph"><p>To specify output filename for BitTorrent downloads, you need to know
  3818. the index of file in torrent file using <strong>-S</strong> option. For example, the
  3819. output looks like this:</p></div>
  3820. <div class="listingblock">
  3821. <div class="content">
  3822. <pre><tt>idx|path/length
  3823. ===+======================
  3824. 1|dist/base-2.6.18.iso
  3825. |99.9MiB
  3826. ---+----------------------
  3827. 2|dist/driver-2.6.18.iso
  3828. |169.0MiB
  3829. ---+----------------------</tt></pre>
  3830. </div></div>
  3831. <div class="paragraph"><p>To save <em>dist/base-2.6.18.iso</em> in <em>/tmp/mydir/base.iso</em> and
  3832. <em>dist/driver-2.6.18.iso</em> in <em>/tmp/dir/driver.iso</em>, use the following
  3833. command:</p></div>
  3834. <div class="listingblock">
  3835. <div class="content">
  3836. <pre><tt>aria2c --dir=/tmp --index-out=1=mydir/base.iso --index-out=2=dir/driver.iso file.torrent</tt></pre>
  3837. </div></div>
  3838. <h4 id="_change_the_listening_port_for_incoming_peer">Change the listening port for incoming peer</h4>
  3839. <div class="listingblock">
  3840. <div class="content">
  3841. <pre><tt>aria2c --listen-port=7000-7001,8000 file.torrent</tt></pre>
  3842. </div></div>
  3843. <div class="admonitionblock">
  3844. <table><tr>
  3845. <td class="icon">
  3846. <div class="title">Note</div>
  3847. </td>
  3848. <td class="content">Since aria2 doesn&#8217;t configure firewall or router for port forwarding, it&#8217;s up
  3849. to you to do it manually.</td>
  3850. </tr></table>
  3851. </div>
  3852. <h4 id="_specify_the_condition_to_stop_program_after_torrent_download_finished">Specify the condition to stop program after torrent download finished</h4>
  3853. <div class="listingblock">
  3854. <div class="content">
  3855. <pre><tt>aria2c --seed-time=120 --seed-ratio=1.0 file.torrent</tt></pre>
  3856. </div></div>
  3857. <div class="admonitionblock">
  3858. <table><tr>
  3859. <td class="icon">
  3860. <div class="title">Note</div>
  3861. </td>
  3862. <td class="content">In the above example, the program exits when the 120 minutes has elapsed since download completed or seed ratio reaches 1.0.</td>
  3863. </tr></table>
  3864. </div>
  3865. <h4 id="_throttle_upload_speed">Throttle upload speed</h4>
  3866. <div class="listingblock">
  3867. <div class="content">
  3868. <pre><tt>aria2c --max-upload-limit=100K file.torrent</tt></pre>
  3869. </div></div>
  3870. <h4 id="_enable_dht">Enable DHT</h4>
  3871. <div class="listingblock">
  3872. <div class="content">
  3873. <pre><tt>aria2c --enable-dht --dht-listen-port=6881 file.torrent</tt></pre>
  3874. </div></div>
  3875. <div class="admonitionblock">
  3876. <table><tr>
  3877. <td class="icon">
  3878. <div class="title">Note</div>
  3879. </td>
  3880. <td class="content">DHT uses udp port. Since aria2 doesn&#8217;t configure firewall or router for port
  3881. forwarding, it&#8217;s up to you to do it manually.</td>
  3882. </tr></table>
  3883. </div>
  3884. <h3 id="_more_advanced_http_features">More advanced HTTP features</h3><div style="clear:left"></div>
  3885. <h4 id="_load_cookies">Load cookies</h4>
  3886. <div class="listingblock">
  3887. <div class="content">
  3888. <pre><tt>aria2c --load-cookies=cookies.txt "http://host/file.zip"</tt></pre>
  3889. </div></div>
  3890. <div class="admonitionblock">
  3891. <table><tr>
  3892. <td class="icon">
  3893. <div class="title">Note</div>
  3894. </td>
  3895. <td class="content">You can use Firefox/Mozilla&#8217;s cookie file without modification.</td>
  3896. </tr></table>
  3897. </div>
  3898. <h4 id="_resume_download_started_by_web_browsers_or_another_programs">Resume download started by web browsers or another programs</h4>
  3899. <div class="listingblock">
  3900. <div class="content">
  3901. <pre><tt>aria2c -c -s2 "http://host/partiallydownloadedfile.zip"</tt></pre>
  3902. </div></div>
  3903. <h4 id="_client_certificate_authorization_for_ssl_tls">Client certificate authorization for SSL/TLS</h4>
  3904. <div class="listingblock">
  3905. <div class="content">
  3906. <pre><tt>aria2c --certificate=/path/to/mycert.pem --private-key=/path/to/mykey.pem https://host/file</tt></pre>
  3907. </div></div>
  3908. <div class="admonitionblock">
  3909. <table><tr>
  3910. <td class="icon">
  3911. <div class="title">Note</div>
  3912. </td>
  3913. <td class="content">The file specified in <strong>--private-key</strong> must be decrypted. The behavior when
  3914. encrypted one is given is undefined.</td>
  3915. </tr></table>
  3916. </div>
  3917. <h4 id="_verify_peer_in_ssl_tls_using_given_ca_certificates">Verify peer in SSL/TLS using given CA certificates</h4>
  3918. <div class="listingblock">
  3919. <div class="content">
  3920. <pre><tt>aria2c --ca-certificate=/path/to/ca-certificates.crt --check-certificate https://host/file</tt></pre>
  3921. </div></div>
  3922. <h3 id="_and_more_advanced_features">And more advanced features</h3><div style="clear:left"></div>
  3923. <h4 id="_throttle_download_speed">Throttle download speed</h4>
  3924. <div class="listingblock">
  3925. <div class="content">
  3926. <pre><tt>aria2c --max-download-limit=100K file.metalink</tt></pre>
  3927. </div></div>
  3928. <h4 id="_repair_a_damaged_download">Repair a damaged download</h4>
  3929. <div class="listingblock">
  3930. <div class="content">
  3931. <pre><tt>aria2c -V file.metalink</tt></pre>
  3932. </div></div>
  3933. <div class="admonitionblock">
  3934. <table><tr>
  3935. <td class="icon">
  3936. <div class="title">Note</div>
  3937. </td>
  3938. <td class="content">This option is only available used with BitTorrent or metalink with chunk
  3939. checksums.</td>
  3940. </tr></table>
  3941. </div>
  3942. <h4 id="_drop_connection_if_download_speed_is_lower_than_specified_value">Drop connection if download speed is lower than specified value</h4>
  3943. <div class="listingblock">
  3944. <div class="content">
  3945. <pre><tt>aria2c --lowest-speed-limit=10K file.metalink</tt></pre>
  3946. </div></div>
  3947. <h4 id="_parameterized_uri_support">Parameterized URI support</h4>
  3948. <div class="paragraph"><p>You can specify set of parts:</p></div>
  3949. <div class="listingblock">
  3950. <div class="content">
  3951. <pre><tt>aria2c -P "http://{host1,host2,host3}/file.iso"</tt></pre>
  3952. </div></div>
  3953. <div class="paragraph"><p>You can specify numeric sequence:</p></div>
  3954. <div class="listingblock">
  3955. <div class="content">
  3956. <pre><tt>aria2c -Z -P "http://host/image[000-100].png"</tt></pre>
  3957. </div></div>
  3958. <div class="admonitionblock">
  3959. <table><tr>
  3960. <td class="icon">
  3961. <div class="title">Note</div>
  3962. </td>
  3963. <td class="content">-Z option is required if the all URIs don&#8217;t point to the same file, such as the above example.</td>
  3964. </tr></table>
  3965. </div>
  3966. <div class="paragraph"><p>You can specify step counter:</p></div>
  3967. <div class="listingblock">
  3968. <div class="content">
  3969. <pre><tt>aria2c -Z -P "http://host/image[A-Z:2].png"</tt></pre>
  3970. </div></div>
  3971. <h4 id="_parallel_downloads_of_arbitrary_number_of_uri_metalink_torrent">Parallel downloads of arbitrary number of URI,metalink,torrent</h4>
  3972. <div class="listingblock">
  3973. <div class="content">
  3974. <pre><tt>aria2c -j3 -Z "http://host/file1" file2.torrent file3.metalink</tt></pre>
  3975. </div></div>
  3976. <h4 id="_bittorrent_encryption">BitTorrent Encryption</h4>
  3977. <div class="paragraph"><p>Encrypt whole payload using ARC4:</p></div>
  3978. <div class="listingblock">
  3979. <div class="content">
  3980. <pre><tt>aria2c --bt-min-crypto-level=arc4 --bt-require-crypto=true file.torrent</tt></pre>
  3981. </div></div>
  3982. </div>
  3983. <h2 id="_see_also">SEE ALSO</h2>
  3984. <div class="sectionbody">
  3985. <div class="paragraph"><p>Project Web Site: <a href="http://aria2.sourceforge.net/">http://aria2.sourceforge.net/</a></p></div>
  3986. <div class="paragraph"><p>aria2 Wiki: <a href="http://sourceforge.net/apps/trac/aria2/wiki">http://sourceforge.net/apps/trac/aria2/wiki</a></p></div>
  3987. <div class="paragraph"><p>Metalink Homepage: <a href="http://www.metalinker.org/">http://www.metalinker.org/</a></p></div>
  3988. </div>
  3989. <h2 id="_copyright">COPYRIGHT</h2>
  3990. <div class="sectionbody">
  3991. <div class="paragraph"><p>Copyright &#169; 2006, 2010 Tatsuhiro Tsujikawa</p></div>
  3992. <div class="paragraph"><p>This program is free software; you can redistribute it and/or modify
  3993. it under the terms of the GNU General Public License as published by
  3994. the Free Software Foundation; either version 2 of the License, or
  3995. (at your option) any later version.</p></div>
  3996. <div class="paragraph"><p>This program is distributed in the hope that it will be useful,
  3997. but WITHOUT ANY WARRANTY; without even the implied warranty of
  3998. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  3999. GNU General Public License for more details.</p></div>
  4000. <div class="paragraph"><p>You should have received a copy of the GNU General Public License
  4001. along with this program; if not, write to the Free Software
  4002. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</p></div>
  4003. <div class="paragraph"><p>In addition, as a special exception, the copyright holders give
  4004. permission to link the code of portions of this program with the
  4005. OpenSSL library under certain conditions as described in each
  4006. individual source file, and distribute linked combinations
  4007. including the two.
  4008. You must obey the GNU General Public License in all respects
  4009. for all of the code used other than OpenSSL. If you modify
  4010. file(s) with this exception, you may extend this exception to your
  4011. version of the file(s), but you are not obligated to do so. If you
  4012. do not wish to do so, delete this exception statement from your
  4013. version. If you delete this exception statement from all source
  4014. files in the program, then also delete it here.</p></div>
  4015. </div>
  4016. </div>
  4017. <div id="footnotes"><hr /></div>
  4018. <div id="footer">
  4019. <div id="footer-text">
  4020. Last updated 2010-03-30 23:43:40 JST
  4021. </div>
  4022. </div>
  4023. </body>
  4024. </html>