aria2c.1.html 135 KB

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