aria2c.1.html 135 KB

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