aria2c.1.html 113 KB

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