aria2c.1.html 100 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503
  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) URL,
  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.
  620. You can override this setting and specify a proxy server for a particular
  621. protocol using <strong>--http-proxy</strong>, <strong>--https-proxy</strong> and <strong>--ftp-proxy</strong> options.
  622. This affects all URLs.
  623. The format of PROXY is [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
  624. </p>
  625. </dd>
  626. <dt class="hdlist1">
  627. <strong>--connect-timeout</strong>=SEC
  628. </dt>
  629. <dd>
  630. <p>
  631. Set the connect timeout in seconds to establish connection to
  632. HTTP/FTP/proxy server. After the connection is established, this
  633. option makes no effect and <strong>--timeout</strong> option is used instead.
  634. Default: <em>60</em>
  635. </p>
  636. </dd>
  637. <dt class="hdlist1">
  638. <strong>--dry-run</strong>[=<em>true</em>|<em>false</em>]
  639. </dt>
  640. <dd>
  641. <p>
  642. If <em>true</em> is given, aria2 just checks whether the remote file is
  643. available and doesn&#8217;t download data. This option has effect on
  644. HTTP/FTP download. BitTorrent downloads are canceled if <em>true</em> is
  645. specified. Default: <em>false</em>
  646. </p>
  647. </dd>
  648. <dt class="hdlist1">
  649. <strong>--lowest-speed-limit</strong>=SPEED
  650. </dt>
  651. <dd>
  652. <p>
  653. Close connection if download speed is lower than or equal to this
  654. value(bytes per sec).
  655. <em>0</em> means aria2 does not have a lowest speed limit.
  656. You can append <em>K</em> or <em>M</em>(1K = 1024, 1M = 1024K).
  657. This option does not affect BitTorrent downloads.
  658. Default: <em>0</em>
  659. </p>
  660. </dd>
  661. <dt class="hdlist1">
  662. <strong>--max-file-not-found</strong>=NUM
  663. </dt>
  664. <dd>
  665. <p>
  666. If aria2 receives &#8216;file not found&#8217; status from the remote HTTP/FTP
  667. servers NUM times without getting a single byte, then force the
  668. download to fail. Specify <em>0</em> to disable this option. This options is
  669. effective only when using HTTP/FTP servers.
  670. Default: <em>0</em>
  671. </p>
  672. </dd>
  673. <dt class="hdlist1">
  674. <strong>-m</strong>, <strong>--max-tries</strong>=N
  675. </dt>
  676. <dd>
  677. <p>
  678. Set number of tries. <em>0</em> means unlimited.
  679. Default: <em>5</em>
  680. </p>
  681. </dd>
  682. <dt class="hdlist1">
  683. <strong>-n</strong>, <strong>--no-netrc</strong>
  684. </dt>
  685. <dd>
  686. <p>
  687. Disables netrc support. netrc support is enabled by default.
  688. </p>
  689. </dd>
  690. <dt class="hdlist1">
  691. <strong>--no-proxy</strong>=DOMAINS
  692. </dt>
  693. <dd>
  694. <p>
  695. Specify comma separated hostnames or domains where proxy should not be
  696. used.
  697. </p>
  698. </dd>
  699. <dt class="hdlist1">
  700. <strong>-o</strong>, <strong>--out</strong>=FILE
  701. </dt>
  702. <dd>
  703. <p>
  704. The file name of the downloaded file.
  705. </p>
  706. </dd>
  707. </dl></div>
  708. <div class="admonitionblock">
  709. <table><tr>
  710. <td class="icon">
  711. <div class="title">Note</div>
  712. </td>
  713. <td class="content">In Metalink or BitTorrent download you cannot specify file name.
  714. The file name specified here is only used when the URLs fed to aria2
  715. are done by command line without <strong>-i</strong>, <strong>-Z</strong> option. For example:
  716. aria2c -o myfile.zip "http://mirror1/file.zip" "http://mirror2/file.zip"</td>
  717. </tr></table>
  718. </div>
  719. <div class="dlist"><dl>
  720. <dt class="hdlist1">
  721. <strong>--proxy-method</strong>=METHOD
  722. </dt>
  723. <dd>
  724. <p>
  725. Set the method to use in proxy request. <em>METHOD</em> is either <em>get</em> or
  726. <em>tunnel</em>. HTTPS downloads always use <em>tunnel</em> regardless of this
  727. option.
  728. Default: <em>get</em>
  729. </p>
  730. </dd>
  731. <dt class="hdlist1">
  732. <strong>-R</strong>, <strong>--remote-time</strong>[=<em>true</em>|<em>false</em>]
  733. </dt>
  734. <dd>
  735. <p>
  736. Retrieve timestamp of the remote file from the remote HTTP/FTP
  737. server and if it is available, apply it to the local file.
  738. Default: <em>false</em>
  739. </p>
  740. </dd>
  741. <dt class="hdlist1">
  742. <strong>--server-stat-of</strong>=FILE
  743. </dt>
  744. <dd>
  745. <p>
  746. Specify the filename to which performance profile of the servers is
  747. saved. You can load saved data using <strong>--server-stat-if</strong> option. See
  748. <strong>Server Performance Profile</strong> subsection below for file format.
  749. </p>
  750. </dd>
  751. <dt class="hdlist1">
  752. <strong>--server-stat-if</strong>=FILE
  753. </dt>
  754. <dd>
  755. <p>
  756. Specify the filename to load performance profile of the servers. The
  757. loaded data will be used in some URI selector such as <em>feedback</em>.
  758. See also <strong>--uri-selector</strong> option. See <strong>Server Performance Profile</strong>
  759. subsection below for file format.
  760. </p>
  761. </dd>
  762. <dt class="hdlist1">
  763. <strong>--server-stat-timeout</strong>=SEC
  764. </dt>
  765. <dd>
  766. <p>
  767. Specifies timeout in seconds to invalidate performance profile of
  768. the servers since the last contact to them.
  769. Default: <em>86400</em> (24hours)
  770. </p>
  771. </dd>
  772. <dt class="hdlist1">
  773. <strong>-s</strong>, <strong>--split</strong>=N
  774. </dt>
  775. <dd>
  776. <p>
  777. Download a file using N connections.
  778. If more than N URLs are given, first N URLs are used and remaining URLs are
  779. used for backup.
  780. If less than N URLs are given, those URLs are used more than once so that N
  781. connections total are made simultaneously.
  782. Please see <strong>-j</strong> option too.
  783. Please note that in Metalink download, this option has no effect and use
  784. <strong>-C</strong> option instead.
  785. Default: <em>5</em>
  786. </p>
  787. </dd>
  788. <dt class="hdlist1">
  789. <strong>-t</strong>, <strong>--timeout</strong>=SEC
  790. </dt>
  791. <dd>
  792. <p>
  793. Set timeout in seconds.
  794. Default: <em>60</em>
  795. </p>
  796. </dd>
  797. <dt class="hdlist1">
  798. <strong>--uri-selector</strong>=SELECTOR
  799. </dt>
  800. <dd>
  801. <p>
  802. Specify URI selection algorithm. The possible values are <em>inorder</em>,
  803. <em>feedback</em> and <em>adaptive</em>. If <em>inorder</em> is given, URI is tried in
  804. the order appeared in the URI list. If <em>feedback</em> is given, aria2
  805. uses download speed observed in the previous downloads and choose
  806. fastest server in the URI list. This also effectively skips dead
  807. mirrors. The observed download speed is a part of performance
  808. profile of servers mentioned in <strong>--server-stat-of</strong> and
  809. <strong>--server-stat-if</strong> options. If <em>adaptive</em> is given, selects one of
  810. the best mirrors for the first and reserved connections. For
  811. supplementary ones, it returns mirrors which has not been tested
  812. yet, and if each of them has already been tested, returns mirrors
  813. which has to be tested again. Otherwise, it doesn&#8217;t select anymore
  814. mirrors. Like <em>feedback</em>, it uses a performance profile of servers.
  815. Default: <em>feedback</em>
  816. </p>
  817. </dd>
  818. </dl></div>
  819. <h3 id="_http_specific_options">HTTP Specific Options</h3><div style="clear:left"></div>
  820. <div class="dlist"><dl>
  821. <dt class="hdlist1">
  822. <strong>--ca-certificate</strong>=FILE
  823. </dt>
  824. <dd>
  825. <p>
  826. Use the certificate authorities in FILE to verify the peers.
  827. The certificate file must be in PEM format and can contain multiple CA
  828. certificates.
  829. Use <strong>--check-certificate</strong> option to enable verification.
  830. </p>
  831. </dd>
  832. <dt class="hdlist1">
  833. <strong>--certificate</strong>=FILE
  834. </dt>
  835. <dd>
  836. <p>
  837. Use the client certificate in FILE.
  838. The certificate must be in PEM format.
  839. You may use <strong>--private-key</strong> option to specify the private key.
  840. </p>
  841. </dd>
  842. <dt class="hdlist1">
  843. <strong>--check-certificate</strong>[=<em>true</em>|<em>false</em>]
  844. </dt>
  845. <dd>
  846. <p>
  847. Verify the peer using certificates specified in <strong>--ca-certificate</strong> option.
  848. Default: <em>true</em>
  849. </p>
  850. </dd>
  851. <dt class="hdlist1">
  852. <strong>--http-auth-challenge</strong>[=<em>true</em>|<em>false</em>]
  853. </dt>
  854. <dd>
  855. <p>
  856. Send HTTP authorization header only when it is requested by the
  857. server. If <em>false</em> is set, then authorization header is always sent
  858. to the server. There is an exception: if username and password are
  859. embedded in URI, authorization header is always sent to the server
  860. regardless of this option. Default: <em>false</em>
  861. </p>
  862. </dd>
  863. <dt class="hdlist1">
  864. <strong>--http-user</strong>=USER
  865. </dt>
  866. <dd>
  867. <p>
  868. Set HTTP user. This affects all URLs.
  869. </p>
  870. </dd>
  871. <dt class="hdlist1">
  872. <strong>--http-passwd</strong>=PASSWD
  873. </dt>
  874. <dd>
  875. <p>
  876. Set HTTP password. This affects all URLs.
  877. </p>
  878. </dd>
  879. <dt class="hdlist1">
  880. <strong>--http-proxy</strong>=PROXY
  881. </dt>
  882. <dd>
  883. <p>
  884. Use this proxy server for HTTP. See also <strong>--all-proxy</strong> option.
  885. This affects all URLs.
  886. The format of PROXY is [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
  887. </p>
  888. </dd>
  889. <dt class="hdlist1">
  890. <strong>--https-proxy</strong>=PROXY
  891. </dt>
  892. <dd>
  893. <p>
  894. Use this proxy server for HTTPS. See also <strong>--all-proxy</strong> option.
  895. This affects all URLs.
  896. The format of PROXY is [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
  897. </p>
  898. </dd>
  899. <dt class="hdlist1">
  900. <strong>--private-key</strong>=FILE
  901. </dt>
  902. <dd>
  903. <p>
  904. Use the private key in FILE.
  905. The private key must be decrypted and in PEM format.
  906. The behavior when encrypted one is given is undefined.
  907. See also <strong>--certificate</strong> option.
  908. </p>
  909. </dd>
  910. <dt class="hdlist1">
  911. <strong>--referer</strong>=REFERER
  912. </dt>
  913. <dd>
  914. <p>
  915. Set Referer. This affects all URLs.
  916. </p>
  917. </dd>
  918. <dt class="hdlist1">
  919. <strong>--enable-http-keep-alive</strong>[=<em>true</em>|<em>false</em>]
  920. </dt>
  921. <dd>
  922. <p>
  923. Enable HTTP/1.1 persistent connection.
  924. Default: <em>true</em>
  925. </p>
  926. </dd>
  927. <dt class="hdlist1">
  928. <strong>--enable-http-pipelining</strong>[=<em>true</em>|<em>false</em>]
  929. </dt>
  930. <dd>
  931. <p>
  932. Enable HTTP/1.1 pipelining.
  933. Default: <em>false</em>
  934. </p>
  935. </dd>
  936. <dt class="hdlist1">
  937. <strong>--header</strong>=HEADER
  938. </dt>
  939. <dd>
  940. <p>
  941. Append HEADER to HTTP request header.
  942. You can use this option repeatedly to specify more than one header:
  943. aria2c <strong>--header</strong>="X-A: b78" <strong>--header</strong>="X-B: 9J1" "http://host/file"
  944. </p>
  945. </dd>
  946. <dt class="hdlist1">
  947. <strong>--load-cookies</strong>=FILE
  948. </dt>
  949. <dd>
  950. <p>
  951. Load Cookies from FILE using the Firefox3 format (SQLite3) and the
  952. Mozilla/Firefox(1.x/2.x)/Netscape format.
  953. </p>
  954. </dd>
  955. </dl></div>
  956. <div class="admonitionblock">
  957. <table><tr>
  958. <td class="icon">
  959. <div class="title">Note</div>
  960. </td>
  961. <td class="content">If aria2 is built without libsqlite3, then it doesn&#8217;t support Firefox3 cookie format.</td>
  962. </tr></table>
  963. </div>
  964. <div class="dlist"><dl>
  965. <dt class="hdlist1">
  966. <strong>--save-cookies</strong>=FILE
  967. </dt>
  968. <dd>
  969. <p>
  970. Save Cookies to FILE in Mozilla/Firefox(1.x/2.x)/ Netscape
  971. format. If FILE already exists, it is overwritten. Session Cookies
  972. are also saved and their expiry values are treated as 0. Possible
  973. Values: <em>/path/to/file</em>
  974. </p>
  975. </dd>
  976. <dt class="hdlist1">
  977. <strong>--use-head</strong>[=<em>true</em>|<em>false</em>]
  978. </dt>
  979. <dd>
  980. <p>
  981. Use HEAD method for the first request to the HTTP server.
  982. Default: <em>false</em>
  983. </p>
  984. </dd>
  985. <dt class="hdlist1">
  986. <strong>-U</strong>, <strong>--user-agent</strong>=USER_AGENT
  987. </dt>
  988. <dd>
  989. <p>
  990. Set user agent for HTTP(S) downloads.
  991. Default: <em>aria2/$VERSION</em>, $VERSION is replaced by package version.
  992. </p>
  993. </dd>
  994. </dl></div>
  995. <h3 id="_ftp_specific_options">FTP Specific Options</h3><div style="clear:left"></div>
  996. <div class="dlist"><dl>
  997. <dt class="hdlist1">
  998. <strong>--ftp-user</strong>=USER
  999. </dt>
  1000. <dd>
  1001. <p>
  1002. Set FTP user. This affects all URLs.
  1003. Default: <em>anonymous</em>
  1004. </p>
  1005. </dd>
  1006. <dt class="hdlist1">
  1007. <strong>--ftp-passwd</strong>=PASSWD
  1008. </dt>
  1009. <dd>
  1010. <p>
  1011. Set FTP password. This affects all URLs.
  1012. If user name is embedded but password is missing in URI, aria2 tries
  1013. to resolve password using .netrc. If password is found in .netrc,
  1014. then use it as password. If not, use the password specified in this
  1015. option.
  1016. Default: <em>ARIA2USER@</em>
  1017. </p>
  1018. </dd>
  1019. <dt class="hdlist1">
  1020. <strong>-p</strong>, <strong>--ftp-pasv</strong>[=<em>true</em>|<em>false</em>]
  1021. </dt>
  1022. <dd>
  1023. <p>
  1024. Use the passive mode in FTP.
  1025. If <em>false</em> is given, the active mode will be used.
  1026. Default: <em>true</em>
  1027. </p>
  1028. </dd>
  1029. <dt class="hdlist1">
  1030. <strong>--ftp-proxy</strong>=PROXY
  1031. </dt>
  1032. <dd>
  1033. <p>
  1034. Use this proxy server for FTP. See also <strong>--all-proxy</strong> option.
  1035. This affects all URLs.
  1036. The format of PROXY is [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
  1037. </p>
  1038. </dd>
  1039. <dt class="hdlist1">
  1040. <strong>--ftp-type</strong>=TYPE
  1041. </dt>
  1042. <dd>
  1043. <p>
  1044. Set FTP transfer type. TYPE is either <em>binary</em> or <em>ascii</em>.
  1045. Default: <em>binary</em>
  1046. </p>
  1047. </dd>
  1048. <dt class="hdlist1">
  1049. <strong>--ftp-reuse-connection</strong>[=<em>true</em>|<em>false</em>]
  1050. </dt>
  1051. <dd>
  1052. <p>
  1053. Reuse connection in FTP.
  1054. Default: <em>true</em>
  1055. </p>
  1056. </dd>
  1057. </dl></div>
  1058. <h3 id="_bittorrent_metalink_options">BitTorrent/Metalink Options</h3><div style="clear:left"></div>
  1059. <div class="dlist"><dl>
  1060. <dt class="hdlist1">
  1061. <strong>--select-file</strong>=INDEX&#8230;
  1062. </dt>
  1063. <dd>
  1064. <p>
  1065. Set file to download by specifying its index.
  1066. You can find the file index using the <strong>--show-files</strong> option.
  1067. Multiple indexes can be specified by using ",", for example: <em>3,6</em>.
  1068. You can also use "-" to specify a range: <em>1-5</em>.
  1069. "," and "-" can be used together: <em>1-5,8,9</em>.
  1070. When used with the -M option, index may vary depending on the query
  1071. (see <strong>--metalink-</strong>* options).
  1072. </p>
  1073. </dd>
  1074. </dl></div>
  1075. <div class="admonitionblock">
  1076. <table><tr>
  1077. <td class="icon">
  1078. <div class="title">Note</div>
  1079. </td>
  1080. <td class="content">In multi file torrent, the adjacent files specified by this option may
  1081. also be downloaded. This is by design, not a bug.
  1082. A single piece may include several files or part of files, and aria2
  1083. writes the piece to the appropriate files.</td>
  1084. </tr></table>
  1085. </div>
  1086. <div class="dlist"><dl>
  1087. <dt class="hdlist1">
  1088. <strong>-S</strong>, <strong>--show-files</strong>
  1089. </dt>
  1090. <dd>
  1091. <p>
  1092. Print file listing of .torrent or .metalink file and exit.
  1093. In case of .torrent file, additional information
  1094. (infohash, piece length, etc) is also printed.
  1095. </p>
  1096. </dd>
  1097. </dl></div>
  1098. <h3 id="_bittorrent_specific_options">BitTorrent Specific Options</h3><div style="clear:left"></div>
  1099. <div class="dlist"><dl>
  1100. <dt class="hdlist1">
  1101. <strong>--bt-external-ip</strong>=IPADDRESS
  1102. </dt>
  1103. <dd>
  1104. <p>
  1105. Specify the external IP address to report to a BitTorrent
  1106. tracker. Although this function is named "external", it can accept
  1107. any kind of IP addresses. IPADDRESS must be a numeric IP address.
  1108. </p>
  1109. </dd>
  1110. <dt class="hdlist1">
  1111. <strong>--bt-hash-check-seed</strong>[=<em>true</em>|<em>false</em>]
  1112. </dt>
  1113. <dd>
  1114. <p>
  1115. If <em>true</em> is given, after hash check using <strong>--check-integrity</strong> option and
  1116. file is complete, continue to seed file. If you want to check file
  1117. and download it only when it is damaged or incomplete, set this
  1118. option to <em>false</em>. This option has effect only on BitTorrent download.
  1119. Default: <em>true</em>
  1120. </p>
  1121. </dd>
  1122. <dt class="hdlist1">
  1123. <strong>--bt-max-open-files</strong>=NUM
  1124. </dt>
  1125. <dd>
  1126. <p>
  1127. Specify maximum number of files to open in each BitTorrent download.
  1128. Default: <em>100</em>
  1129. </p>
  1130. </dd>
  1131. <dt class="hdlist1">
  1132. <strong>--bt-max-peers</strong>=NUM
  1133. </dt>
  1134. <dd>
  1135. <p>
  1136. Specify the maximum number of peers per torrent. <em>0</em> means
  1137. unlimited. See also <strong>--bt-request-peer-speed-limit</strong> option.
  1138. Default: <em>55</em>
  1139. </p>
  1140. </dd>
  1141. <dt class="hdlist1">
  1142. <strong>--bt-min-crypto-level</strong>=<em>plain</em>|<em>arc4</em>
  1143. </dt>
  1144. <dd>
  1145. <p>
  1146. Set minimum level of encryption method.
  1147. If several encryption methods are provided by a peer, aria2 chooses the lowest
  1148. one which satisfies the given level.
  1149. Default: <em>plain</em>
  1150. </p>
  1151. </dd>
  1152. <dt class="hdlist1">
  1153. <strong>--bt-prioritize-piece</strong>=<em>head</em>[=SIZE],<em>tail</em>[=SIZE]
  1154. </dt>
  1155. <dd>
  1156. <p>
  1157. Try to download first and last pieces of each file first. This is
  1158. useful for previewing files. The argument can contain 2 keywords:
  1159. <em>head</em> and <em>tail</em>. To include both keywords, they must be separated
  1160. by comma. These keywords can take one parameter, SIZE. For example,
  1161. if <em>head</em>=SIZE is specified, pieces in the range of first SIZE bytes
  1162. of each file get higher priority. <em>tail</em>=SIZE means the range of
  1163. last SIZE bytes of each file. SIZE can include <em>K</em> or <em>M</em>(1K = 1024,
  1164. 1M = 1024K). If SIZE is omitted, SIZE=1M is used.
  1165. </p>
  1166. </dd>
  1167. <dt class="hdlist1">
  1168. <strong>--bt-require-crypto</strong>=<em>true</em>|<em>false</em>
  1169. </dt>
  1170. <dd>
  1171. <p>
  1172. If true is given, aria2 doesn&#8217;t accept and establish connection with legacy
  1173. BitTorrent handshake(\19BitTorrent protocol).
  1174. Thus aria2 always uses Obfuscation handshake.
  1175. Default: <em>false</em>
  1176. </p>
  1177. </dd>
  1178. <dt class="hdlist1">
  1179. <strong>--bt-request-peer-speed-limit</strong>=SPEED
  1180. </dt>
  1181. <dd>
  1182. <p>
  1183. If the whole download speed of every torrent is lower than SPEED,
  1184. aria2 temporarily increases the number of peers to try for more
  1185. download speed. Configuring this option with your preferred download
  1186. speed can increase your download speed in some cases.
  1187. You can append <em>K</em> or <em>M</em>(1K = 1024, 1M = 1024K).
  1188. Default: <em>50K</em>
  1189. </p>
  1190. </dd>
  1191. <dt class="hdlist1">
  1192. <strong>--bt-seed-unverified</strong>[=<em>true</em>|<em>false</em>]
  1193. </dt>
  1194. <dd>
  1195. <p>
  1196. Seed previously downloaded files without verifying piece hashes.
  1197. Default: <em>false</em>
  1198. </p>
  1199. </dd>
  1200. <dt class="hdlist1">
  1201. <strong>--bt-stop-timeout</strong>=SEC
  1202. </dt>
  1203. <dd>
  1204. <p>
  1205. Stop BitTorrent download if download speed is 0 in consecutive SEC
  1206. seconds. If <em>0</em> is given, this feature is disabled. Default: <em>0</em>
  1207. </p>
  1208. </dd>
  1209. <dt class="hdlist1">
  1210. <strong>--bt-tracker-interval</strong>=SEC
  1211. </dt>
  1212. <dd>
  1213. <p>
  1214. Set the interval in seconds between tracker requests. This
  1215. completely overrides interval value and aria2 just uses this value
  1216. and ignores the min interval and interval value in the response of
  1217. tracker. If <em>0</em> is set, aria2 determines interval based on the
  1218. response of tracker and the download progress. Default: <em>0</em>
  1219. </p>
  1220. </dd>
  1221. <dt class="hdlist1">
  1222. <strong>--dht-entry-point</strong>=HOST:PORT
  1223. </dt>
  1224. <dd>
  1225. <p>
  1226. Set host and port as an entry point to DHT network.
  1227. </p>
  1228. </dd>
  1229. <dt class="hdlist1">
  1230. <strong>--dht-file-path</strong>=PATH
  1231. </dt>
  1232. <dd>
  1233. <p>
  1234. Change the DHT routing table file to PATH.
  1235. Default: <em>$HOME/.aria2/dht.dat</em>
  1236. </p>
  1237. </dd>
  1238. <dt class="hdlist1">
  1239. <strong>--dht-listen-port</strong>=PORT&#8230;
  1240. </dt>
  1241. <dd>
  1242. <p>
  1243. Set UDP listening port for DHT.
  1244. Multiple ports can be specified by using ",", for example: <em>6881,6885</em>.
  1245. You can also use "-" to specify a range: <em>6881-6999</em>. "," and "-" can be used
  1246. together.
  1247. Default: <em>6881-6999</em>
  1248. </p>
  1249. </dd>
  1250. </dl></div>
  1251. <div class="admonitionblock">
  1252. <table><tr>
  1253. <td class="icon">
  1254. <div class="title">Note</div>
  1255. </td>
  1256. <td class="content">Make sure that the specified ports are open for incoming UDP traffic.</td>
  1257. </tr></table>
  1258. </div>
  1259. <div class="dlist"><dl>
  1260. <dt class="hdlist1">
  1261. <strong>--enable-dht</strong>[=<em>true</em>|<em>false</em>]
  1262. </dt>
  1263. <dd>
  1264. <p>
  1265. Enable DHT functionality. If a private flag is set in a torrent, aria2
  1266. doesn&#8217;t use DHT for that download even if <em>true</em> is given.
  1267. Default: <em>true</em>
  1268. </p>
  1269. </dd>
  1270. <dt class="hdlist1">
  1271. <strong>--enable-peer-exchange</strong>[=<em>true</em>|<em>false</em>]
  1272. </dt>
  1273. <dd>
  1274. <p>
  1275. Enable Peer Exchange extension. If a private flag is set in a torrent, this
  1276. feature is disabled for that download even if <em>true</em> is given.
  1277. Default: <em>true</em>
  1278. </p>
  1279. </dd>
  1280. <dt class="hdlist1">
  1281. <strong>--follow-torrent</strong>=<em>true</em>|<em>false</em>|<em>mem</em>
  1282. </dt>
  1283. <dd>
  1284. <p>
  1285. If <em>true</em> or <em>mem</em> is specified, when a file whose suffix is ".torrent" or content
  1286. type is "application/x-bittorrent" is downloaded, aria2 parses it as a torrent
  1287. file and downloads files mentioned in it.
  1288. If <em>mem</em> is specified, a torrent file is not written to the disk, but is just
  1289. kept in memory.
  1290. If <em>false</em> is specified, the action mentioned above is not taken.
  1291. Default: <em>true</em>
  1292. </p>
  1293. </dd>
  1294. <dt class="hdlist1">
  1295. <strong>-O</strong>, <strong>--index-out</strong>=INDEX=PATH
  1296. </dt>
  1297. <dd>
  1298. <p>
  1299. Set file path for file with index=INDEX. You can find the file index
  1300. using the <strong>--show-files</strong> option. PATH is a relative path to the
  1301. path specified in <strong>--dir</strong> option. You can use this option multiple
  1302. times. Using this option, you can specify the output filenames of
  1303. BitTorrent downloads.
  1304. </p>
  1305. </dd>
  1306. <dt class="hdlist1">
  1307. <strong>--listen-port</strong>=PORT&#8230;
  1308. </dt>
  1309. <dd>
  1310. <p>
  1311. Set TCP port number for BitTorrent downloads.
  1312. Multiple ports can be specified by using ",", for example: <em>6881,6885</em>.
  1313. You can also use "-" to specify a range: <em>6881-6999</em>.
  1314. "," and "-" can be used together: <em>6881-6889,6999</em>.
  1315. Default: <em>6881-6999</em>
  1316. </p>
  1317. </dd>
  1318. </dl></div>
  1319. <div class="admonitionblock">
  1320. <table><tr>
  1321. <td class="icon">
  1322. <div class="title">Note</div>
  1323. </td>
  1324. <td class="content">Make sure that the specified ports are open for incoming TCP traffic.</td>
  1325. </tr></table>
  1326. </div>
  1327. <div class="dlist"><dl>
  1328. <dt class="hdlist1">
  1329. <strong>--max-overall-upload-limit</strong>=SPEED
  1330. </dt>
  1331. <dd>
  1332. <p>
  1333. Set max overall upload speed in bytes/sec.
  1334. <em>0</em> means unrestricted.
  1335. You can append <em>K</em> or <em>M</em>(1K = 1024, 1M = 1024K).
  1336. To limit the upload speed per torrent, use <strong>--max-upload-limit</strong> option.
  1337. Default: <em>0</em>
  1338. </p>
  1339. </dd>
  1340. <dt class="hdlist1">
  1341. <strong>-u</strong>, <strong>--max-upload-limit</strong>=SPEED
  1342. </dt>
  1343. <dd>
  1344. <p>
  1345. Set max upload speed per each torrent in bytes/sec.
  1346. <em>0</em> means unrestricted.
  1347. You can append <em>K</em> or <em>M</em>(1K = 1024, 1M = 1024K).
  1348. To limit the overall upload speed, use <strong>--max-overall-upload-limit</strong> option.
  1349. Default: <em>0</em>
  1350. </p>
  1351. </dd>
  1352. <dt class="hdlist1">
  1353. <strong>--peer-id-prefix</strong>=PEER_ID_PREFIX
  1354. </dt>
  1355. <dd>
  1356. <p>
  1357. Specify the prefix of peer ID. The peer ID in
  1358. BitTorrent is 20 byte length. If more than 20
  1359. bytes are specified, only first 20 bytes are
  1360. used. If less than 20 bytes are specified, random
  1361. byte data are added to make its length 20 bytes.
  1362. Default: <em>aria2/$VERSION-</em>, $VERSION is replaced by package version.
  1363. </p>
  1364. </dd>
  1365. <dt class="hdlist1">
  1366. <strong>--seed-ratio</strong>=RATIO
  1367. </dt>
  1368. <dd>
  1369. <p>
  1370. Specify share ratio. Seed completed torrents until share ratio reaches
  1371. RATIO.
  1372. You are strongly encouraged to specify equals or more than <em>1.0</em> here.
  1373. Specify <em>0.0</em> if you intend to do seeding regardless of share ratio.
  1374. If <strong>--seed-time</strong> option is specified along with this option, seeding ends when
  1375. at least one of the conditions is satisfied.
  1376. Default: <em>1.0</em>
  1377. </p>
  1378. </dd>
  1379. <dt class="hdlist1">
  1380. <strong>--seed-time</strong>=MINUTES
  1381. </dt>
  1382. <dd>
  1383. <p>
  1384. Specify seeding time in minutes. Also see the <strong>--seed-ratio</strong> option.
  1385. </p>
  1386. </dd>
  1387. <dt class="hdlist1">
  1388. <strong>-T</strong>, <strong>--torrent-file</strong>=TORRENT_FILE
  1389. </dt>
  1390. <dd>
  1391. <p>
  1392. The path to the .torrent file. You are not required to use this
  1393. option because you can specify .torrent files without <strong>-T</strong>.
  1394. </p>
  1395. </dd>
  1396. </dl></div>
  1397. <h3 id="_metalink_specific_options">Metalink Specific Options</h3><div style="clear:left"></div>
  1398. <div class="dlist"><dl>
  1399. <dt class="hdlist1">
  1400. <strong>--follow-metalink</strong>=<em>true</em>|<em>false</em>|<em>mem</em>
  1401. </dt>
  1402. <dd>
  1403. <p>
  1404. If <em>true</em> or <em>mem</em> is specified, when a file whose suffix is ".metalink" or content
  1405. type of "application/metalink+xml" is downloaded, aria2 parses it as a metalink
  1406. file and downloads files mentioned in it.
  1407. If <em>mem</em> is specified, a metalink file is not written to the disk, but is just
  1408. kept in memory.
  1409. If <em>false</em> is specified, the action mentioned above is not taken.
  1410. Default: <em>true</em>
  1411. </p>
  1412. </dd>
  1413. <dt class="hdlist1">
  1414. <strong>-M</strong>, <strong>--metalink-file</strong>=METALINK_FILE
  1415. </dt>
  1416. <dd>
  1417. <p>
  1418. The file path to .metalink file. Reads input from stdin when <em>-</em> is
  1419. specified. You are not required to use this option because you can
  1420. specify .metalink files without <strong>-M</strong>.
  1421. </p>
  1422. </dd>
  1423. <dt class="hdlist1">
  1424. <strong>-C</strong>, <strong>--metalink-servers</strong>=NUM_SERVERS
  1425. </dt>
  1426. <dd>
  1427. <p>
  1428. The number of servers to connect to simultaneously.
  1429. Some Metalinks regulate the number of servers to connect.
  1430. aria2 strictly respects them.
  1431. This means that if Metalink defines the maxconnections attribute lower
  1432. than NUM_SERVERS, then aria2 uses the value of maxconnections attribute
  1433. instead of NUM_SERVERS.
  1434. See also <strong>-s</strong> and <strong>-j</strong> options.
  1435. Default: <em>5</em>
  1436. </p>
  1437. </dd>
  1438. <dt class="hdlist1">
  1439. <strong>--metalink-language</strong>=LANGUAGE
  1440. </dt>
  1441. <dd>
  1442. <p>
  1443. The language of the file to download.
  1444. </p>
  1445. </dd>
  1446. <dt class="hdlist1">
  1447. <strong>--metalink-location</strong>=LOCATION[,&#8230;]
  1448. </dt>
  1449. <dd>
  1450. <p>
  1451. The location of the preferred server.
  1452. A comma-delimited list of locations is acceptable, for example, <em>JP,US</em>.
  1453. </p>
  1454. </dd>
  1455. <dt class="hdlist1">
  1456. <strong>--metalink-os</strong>=OS
  1457. </dt>
  1458. <dd>
  1459. <p>
  1460. The operating system of the file to download.
  1461. </p>
  1462. </dd>
  1463. <dt class="hdlist1">
  1464. <strong>--metalink-version</strong>=VERSION
  1465. </dt>
  1466. <dd>
  1467. <p>
  1468. The version of the file to download.
  1469. </p>
  1470. </dd>
  1471. <dt class="hdlist1">
  1472. <strong>--metalink-preferred-protocol</strong>=PROTO
  1473. </dt>
  1474. <dd>
  1475. <p>
  1476. Specify preferred protocol.
  1477. The possible values are <em>http</em>, <em>https</em>, <em>ftp</em> and <em>none</em>.
  1478. Specify <em>none</em> to disable this feature.
  1479. Default: <em>none</em>
  1480. </p>
  1481. </dd>
  1482. <dt class="hdlist1">
  1483. <strong>--metalink-enable-unique-protocol</strong>=<em>true</em>|<em>false</em>
  1484. </dt>
  1485. <dd>
  1486. <p>
  1487. If <em>true</em> is given and several protocols are available for a mirror in a
  1488. metalink file, aria2 uses one of them.
  1489. Use <strong>--metalink-preferred-protocol</strong> option to specify the preference of
  1490. protocol.
  1491. Default: <em>true</em>
  1492. </p>
  1493. </dd>
  1494. </dl></div>
  1495. <h3 id="_xml_rpc_options">XML-RPC Options</h3><div style="clear:left"></div>
  1496. <div class="dlist"><dl>
  1497. <dt class="hdlist1">
  1498. <strong>--enable-xml-rpc</strong>[=<em>true</em>|<em>false</em>]
  1499. </dt>
  1500. <dd>
  1501. <p>
  1502. Enable XML-RPC server. It is strongly recommended to set username
  1503. and password using <strong>--xml-rpc-user</strong> and <strong>--xml-rpc-passwd</strong>
  1504. option. See also <strong>--xml-rpc-listen-port</strong> option. Default: <em>false</em>
  1505. </p>
  1506. </dd>
  1507. <dt class="hdlist1">
  1508. <strong>--xml-rpc-listen-all</strong>[=<em>true</em>|<em>false</em>]
  1509. </dt>
  1510. <dd>
  1511. <p>
  1512. Listen incoming XML-RPC requests on all network interfaces. If false
  1513. is given, listen only on local loopback interface. Default: <em>false</em>
  1514. </p>
  1515. </dd>
  1516. <dt class="hdlist1">
  1517. <strong>--xml-rpc-listen-port</strong>=PORT
  1518. </dt>
  1519. <dd>
  1520. <p>
  1521. Specify a port number for XML-RPC server to listen to. Possible
  1522. Values: <em>1024</em>-<em>65535</em> Default: <em>6800</em>
  1523. </p>
  1524. </dd>
  1525. <dt class="hdlist1">
  1526. <strong>--xml-rpc-max-request-size</strong>=SIZE
  1527. </dt>
  1528. <dd>
  1529. <p>
  1530. Set max size of XML-RPC request. If aria2 detects the request is
  1531. more than SIZE bytes, it drops connection. Default: <em>2M</em>
  1532. </p>
  1533. </dd>
  1534. <dt class="hdlist1">
  1535. <strong>--xml-rpc-passwd</strong>=PASSWD
  1536. </dt>
  1537. <dd>
  1538. <p>
  1539. Set XML-RPC password.
  1540. </p>
  1541. </dd>
  1542. <dt class="hdlist1">
  1543. <strong>--xml-rpc-user</strong>=USER
  1544. </dt>
  1545. <dd>
  1546. <p>
  1547. Set XML-RPC user.
  1548. </p>
  1549. </dd>
  1550. </dl></div>
  1551. <h3 id="_advanced_options">Advanced Options</h3><div style="clear:left"></div>
  1552. <div class="dlist"><dl>
  1553. <dt class="hdlist1">
  1554. <strong>--allow-overwrite</strong>=<em>true</em>|<em>false</em>
  1555. </dt>
  1556. <dd>
  1557. <p>
  1558. If <em>false</em> is given, and a file already exists but the corresponding
  1559. control file (filename.aria2) doesn&#8217;t exist, then aria2 will not
  1560. re-download the file. See also <strong>--auto-file-renaming</strong> option.
  1561. Default: <em>false</em>
  1562. </p>
  1563. </dd>
  1564. <dt class="hdlist1">
  1565. <strong>--allow-piece-length-change</strong>=<em>true</em>|<em>false</em>
  1566. </dt>
  1567. <dd>
  1568. <p>
  1569. If false is given, aria2 aborts download when a piece length is different
  1570. from one in a control file.
  1571. If true is given, you can proceed but some download progress will be lost.
  1572. Default: <em>false</em>
  1573. </p>
  1574. </dd>
  1575. <dt class="hdlist1">
  1576. <strong>--async-dns</strong>[=<em>true</em>|<em>false</em>]
  1577. </dt>
  1578. <dd>
  1579. <p>
  1580. Enable asynchronous DNS.
  1581. Default: <em>true</em>
  1582. </p>
  1583. </dd>
  1584. <dt class="hdlist1">
  1585. <strong>--auto-file-renaming</strong>[=<em>true</em>|<em>false</em>]
  1586. </dt>
  1587. <dd>
  1588. <p>
  1589. Rename file name if the same file already exists.
  1590. This option works only in HTTP(S)/FTP download.
  1591. The new file name has a dot and a number(1..9999) appended.
  1592. Default: <em>true</em>
  1593. </p>
  1594. </dd>
  1595. <dt class="hdlist1">
  1596. <strong>--auto-save-interval</strong>=SEC
  1597. </dt>
  1598. <dd>
  1599. <p>
  1600. Save a control file(*.aria2) every SEC seconds.
  1601. If <em>0</em> is given, a control file is not saved during download. aria2 saves a
  1602. control file when it stops regardless of the value.
  1603. The possible values are between <em>0</em> to <em>600</em>.
  1604. Default: <em>60</em>
  1605. </p>
  1606. </dd>
  1607. <dt class="hdlist1">
  1608. <strong>--conf-path</strong>=PATH
  1609. </dt>
  1610. <dd>
  1611. <p>
  1612. Change the configuration file path to PATH.
  1613. Default: <em>$HOME/.aria2/aria2.conf</em>
  1614. </p>
  1615. </dd>
  1616. <dt class="hdlist1">
  1617. <strong>-D</strong>, <strong>--daemon</strong>
  1618. </dt>
  1619. <dd>
  1620. <p>
  1621. Run as daemon. The current working directory will be changed to <em>/</em>
  1622. and standard input, standard output and standard error will be
  1623. redirected to <em>/dev/null</em>. Default: <em>false</em>
  1624. </p>
  1625. </dd>
  1626. <dt class="hdlist1">
  1627. <strong>--disable-ipv6</strong>[=<em>true</em>|<em>false</em>]
  1628. </dt>
  1629. <dd>
  1630. <p>
  1631. Disable IPv6. This is useful if you have to use broken DNS and want
  1632. to avoid terribly slow AAAA record lookup. Default: <em>false</em>
  1633. </p>
  1634. </dd>
  1635. <dt class="hdlist1">
  1636. <strong>--enable-direct-io</strong>[=<em>true</em>|<em>false</em>]
  1637. </dt>
  1638. <dd>
  1639. <p>
  1640. Enable directI/O, which lowers cpu usage while allocating/checking files.
  1641. Turn off if you encounter any error.
  1642. Default: <em>true</em>
  1643. </p>
  1644. </dd>
  1645. <dt class="hdlist1">
  1646. <strong>--event-poll</strong>=POLL
  1647. </dt>
  1648. <dd>
  1649. <p>
  1650. Specify the method for polling events. The possible Values are
  1651. <em>epoll</em> and <em>select</em>. If you use recent Linux that has epoll, then
  1652. the default value is <em>epoll</em>. Otherwise, the default value is
  1653. <em>select</em>.
  1654. </p>
  1655. </dd>
  1656. <dt class="hdlist1">
  1657. <strong>--file-allocation</strong>=METHOD
  1658. </dt>
  1659. <dd>
  1660. <p>
  1661. Specify file allocation method.
  1662. <em>none</em> doesn&#8217;t pre-allocate file space. <em>prealloc</em> pre-allocates file space
  1663. before download begins. This may take some time depending on the size of the
  1664. file.
  1665. If you are using newer file systems such as ext4
  1666. (with extents support), btrfs or xfs, <em>falloc</em> is
  1667. your best choice. It allocates large(few GiB)
  1668. files almost instantly. Don&#8217;t use <em>falloc</em> with
  1669. legacy file systems such as ext3 because it takes
  1670. almost same time as <em>prealloc</em> and it blocks aria2
  1671. entirely until allocation finishes. <em>falloc</em> may
  1672. not be available if your system doesn&#8217;t have
  1673. <strong>posix_fallocate</strong>() function.
  1674. Possible Values: <em>none</em>, <em>prealloc</em>, <em>falloc</em>
  1675. Default: <em>prealloc</em>
  1676. </p>
  1677. </dd>
  1678. <dt class="hdlist1">
  1679. <strong>--interface</strong>=INTERFACE
  1680. </dt>
  1681. <dd>
  1682. <p>
  1683. Bind sockets to given interface. You can specify interface name, IP
  1684. address and hostname.
  1685. Possible Values: interface, IP address, hostname
  1686. </p>
  1687. </dd>
  1688. </dl></div>
  1689. <div class="admonitionblock">
  1690. <table><tr>
  1691. <td class="icon">
  1692. <div class="title">Note</div>
  1693. </td>
  1694. <td class="content">If an interface has multiple addresses, it is highly recommended to
  1695. specify IP address explicitly. See also <strong>--disable-ipv6</strong>. If your
  1696. system doesn&#8217;t have getifaddrs(), this option doesn&#8217;t accept interface
  1697. name.</td>
  1698. </tr></table>
  1699. </div>
  1700. <div class="dlist"><dl>
  1701. <dt class="hdlist1">
  1702. <strong>--log-level</strong>=LEVEL
  1703. </dt>
  1704. <dd>
  1705. <p>
  1706. Set log level to output.
  1707. LEVEL is either <em>debug</em>, <em>info</em>, <em>notice</em>, <em>warn</em> or <em>error</em>.
  1708. Default: <em>debug</em>
  1709. </p>
  1710. </dd>
  1711. <dt class="hdlist1">
  1712. <strong>--on-download-complete</strong>=COMMAND
  1713. </dt>
  1714. <dd>
  1715. <p>
  1716. Set the command to be executed when download completes. See
  1717. <strong>--on-download-start</strong> option for the requirement of COMMAND. See
  1718. also <strong>--on-download-stop</strong> option. Possible Values:
  1719. <em>/path/to/command</em>
  1720. </p>
  1721. </dd>
  1722. <dt class="hdlist1">
  1723. <strong>--on-download-error</strong>=COMMAND
  1724. </dt>
  1725. <dd>
  1726. <p>
  1727. Set the command to be executed when download aborts due to error.
  1728. See <strong>--on-download-start</strong> option for the requirement of COMMAND.
  1729. See also <strong>--on-download-stop</strong> option. Possible Values:
  1730. <em>/path/to/command</em>
  1731. </p>
  1732. </dd>
  1733. <dt class="hdlist1">
  1734. <strong>--on-download-start</strong>=COMMAND
  1735. </dt>
  1736. <dd>
  1737. <p>
  1738. Set the command to be executed when download starts up. COMMAND must
  1739. take just one argument and GID is passed to COMMAND as a first
  1740. argument. Possible Values: <em>/path/to/command</em>
  1741. </p>
  1742. </dd>
  1743. <dt class="hdlist1">
  1744. <strong>--on-download-stop</strong>=COMMAND
  1745. </dt>
  1746. <dd>
  1747. <p>
  1748. Set the command to be executed when download stops. You can override
  1749. the command to be executed for particular download result using
  1750. <strong>--on-download-complete</strong> and <strong>--on-download-error</strong>. If they are
  1751. specified, command specified in this option is not executed. See
  1752. <strong>--on-download-start</strong> option for the requirement of COMMAND.
  1753. Possible Values: <em>/path/to/command</em>
  1754. </p>
  1755. </dd>
  1756. <dt class="hdlist1">
  1757. <strong>--summary-interval</strong>=SEC
  1758. </dt>
  1759. <dd>
  1760. <p>
  1761. Set interval in seconds to output download progress summary.
  1762. Setting <em>0</em> suppresses the output.
  1763. Default: <em>60</em>
  1764. </p>
  1765. </dd>
  1766. </dl></div>
  1767. <div class="admonitionblock">
  1768. <table><tr>
  1769. <td class="icon">
  1770. <div class="title">Note</div>
  1771. </td>
  1772. <td class="content">In multi file torrent downloads, the files adjacent forward to the specified files
  1773. are also allocated if they share the same piece.</td>
  1774. </tr></table>
  1775. </div>
  1776. <div class="dlist"><dl>
  1777. <dt class="hdlist1">
  1778. <strong>-Z</strong>, <strong>--force-sequential</strong>[=<em>true</em>|<em>false</em>]
  1779. </dt>
  1780. <dd>
  1781. <p>
  1782. Fetch URIs in the command-line sequentially and download each URI in a
  1783. separate session, like the usual command-line download utilities.
  1784. Default: <em>false</em>
  1785. </p>
  1786. </dd>
  1787. <dt class="hdlist1">
  1788. <strong>--max-overall-download-limit</strong>=SPEED
  1789. </dt>
  1790. <dd>
  1791. <p>
  1792. Set max overall download speed in bytes/sec. <em>0</em> means
  1793. unrestricted. You can append <em>K</em> or <em>M</em>(1K = 1024, 1M = 1024K). To
  1794. limit the download speed per download, use <strong>--max-download-limit</strong>
  1795. option. Default: <em>0</em>
  1796. </p>
  1797. </dd>
  1798. <dt class="hdlist1">
  1799. <strong>--max-download-limit</strong>=SPEED
  1800. </dt>
  1801. <dd>
  1802. <p>
  1803. Set max download speed per each download in bytes/sec. <em>0</em> means
  1804. unrestricted. You can append <em>K</em> or <em>M</em>(1K = 1024, 1M = 1024K). To
  1805. limit the overall download speed, use <strong>--max-overall-download-limit</strong>
  1806. option. Default: <em>0</em>
  1807. </p>
  1808. </dd>
  1809. <dt class="hdlist1">
  1810. <strong>--no-conf</strong>
  1811. </dt>
  1812. <dd>
  1813. <p>
  1814. Disable loading aria2.conf file.
  1815. </p>
  1816. </dd>
  1817. <dt class="hdlist1">
  1818. <strong>--no-file-allocation-limit</strong>=SIZE
  1819. </dt>
  1820. <dd>
  1821. <p>
  1822. No file allocation is made for files whose size is smaller than SIZE.
  1823. You can append <em>K</em> or <em>M</em>(1K = 1024, 1M = 1024K).
  1824. Default: <em>5M</em>
  1825. </p>
  1826. </dd>
  1827. <dt class="hdlist1">
  1828. <strong>-P</strong>, <strong>--parameterized-uri</strong>[=<em>true</em>|<em>false</em>]
  1829. </dt>
  1830. <dd>
  1831. <p>
  1832. Enable parameterized URI support.
  1833. You can specify set of parts: <em>http://{sv1,sv2,sv3}/foo.iso</em>.
  1834. Also you can specify numeric sequences with step counter:
  1835. <em>http://host/image[000-100:2].img</em>.
  1836. A step counter can be omitted.
  1837. If all URIs do not point to the same file, such as the second example above,
  1838. -Z option is required.
  1839. Default: <em>false</em>
  1840. </p>
  1841. </dd>
  1842. <dt class="hdlist1">
  1843. <strong>-q</strong>, <strong>--quiet</strong>[=<em>true</em>|<em>false</em>]
  1844. </dt>
  1845. <dd>
  1846. <p>
  1847. Make aria2 quiet (no console output).
  1848. Default: <em>false</em>
  1849. </p>
  1850. </dd>
  1851. <dt class="hdlist1">
  1852. <strong>--realtime-chunk-checksum</strong>=<em>true</em>|<em>false</em>
  1853. </dt>
  1854. <dd>
  1855. <p>
  1856. Validate chunk of data by calculating checksum while downloading a file if
  1857. chunk checksums are provided.
  1858. Default: <em>true</em>
  1859. </p>
  1860. </dd>
  1861. <dt class="hdlist1">
  1862. <strong>--stop</strong>=SEC
  1863. </dt>
  1864. <dd>
  1865. <p>
  1866. Stop application after SEC seconds has passed.
  1867. If <em>0</em> is given, this feature is disabled.
  1868. Default: <em>0</em>
  1869. </p>
  1870. </dd>
  1871. <dt class="hdlist1">
  1872. <strong>-v</strong>, <strong>--version</strong>
  1873. </dt>
  1874. <dd>
  1875. <p>
  1876. Print the version number, copyright and the configuration information and
  1877. exit.
  1878. </p>
  1879. </dd>
  1880. </dl></div>
  1881. <h3 id="_options_that_take_an_optional_argument">Options That Take An Optional Argument</h3><div style="clear:left"></div>
  1882. <div class="paragraph"><p>The options that have its argument surrounded by square brackets([])
  1883. take an optional argument. Usually omiting the argument is evaluated to <em>true</em>.
  1884. If you use short form of these options(such as <em>-V</em>) and give
  1885. an argument, then the option name and its argument should be concatenated(e.g.
  1886. <em>-Vfalse</em>). If any spaces are inserted between the option name and the argument,
  1887. the argument will be treated as URI and usually this is not what you expect.</p></div>
  1888. <h3 id="_uri_magnet_torrent_file_metalink_file">URI, MAGNET, TORRENT_FILE, METALINK_FILE</h3><div style="clear:left"></div>
  1889. <div class="paragraph"><p>You can specify multiple URLs in command-line. Unless you specify
  1890. <strong>-Z</strong> option, all URLs must point to the same file or downloading will
  1891. fail.</p></div>
  1892. <div class="paragraph"><p>You can specify arbitrary number of BitTorrent Magnet URI. Please note
  1893. that they are always treated as a separate download. Both hex encoded
  1894. 40 characters Info Hash and Base32 encoded 32 characters Info Hash are
  1895. supported. The multiple "tr" paramters are supported. Because
  1896. BitTorrent Magnet URI is likely to contain "&amp;" character, it is highly
  1897. recommended to always quote URI with single(') or double(") quotation.
  1898. It is strongly recommended to enable DHT especially when "tr"
  1899. parameter is missing. See <a href="http://www.bittorrent.org/beps/bep_0009.html">http://www.bittorrent.org/beps/bep_0009.html</a>
  1900. for more details about BitTorrent Magnet URI.</p></div>
  1901. <div class="paragraph"><p>You can also specify arbitrary number of torrent files and metalink files
  1902. stored on a local drive. Please note that they are always treated as a
  1903. separate download.</p></div>
  1904. <div class="paragraph"><p>You can specify both torrent file with -T option and URLs. By doing
  1905. this, you can download a file from both torrent swarm and HTTP(S)/FTP
  1906. server at the same time, while the data from HTTP(S)/FTP are uploaded
  1907. to the torrent swarm. For single file torrents, URL can be a complete
  1908. URL pointing to the resource or if URL ends with /, name in torrent
  1909. file in torrent is added. For multi-file torrents, name and path are
  1910. added to form a URL for each file.</p></div>
  1911. <div class="admonitionblock">
  1912. <table><tr>
  1913. <td class="icon">
  1914. <div class="title">Note</div>
  1915. </td>
  1916. <td class="content">Make sure that URL is quoted with single(') or double(") quotation if it
  1917. contains "&amp;" or any characters that have special meaning in shell.</td>
  1918. </tr></table>
  1919. </div>
  1920. <h3 id="_resuming_download">Resuming Download</h3><div style="clear:left"></div>
  1921. <div class="paragraph"><p>Usually, you can resume transfer by just issuing same command(aria2c
  1922. URL) if the previous transfer is made by aria2.</p></div>
  1923. <div class="paragraph"><p>If the previous transfer is made by a browser or wget like sequential
  1924. download manager, then use -c option to continue the transfer(aria2c
  1925. <strong>-c</strong> URL).</p></div>
  1926. </div>
  1927. <h2 id="_exit_status">EXIT STATUS</h2>
  1928. <div class="sectionbody">
  1929. <div class="paragraph"><p>Because aria2 can handle multiple downloads at once, it encounters
  1930. lots of errors in a session. aria2 returns the following exit status
  1931. based on the last error encountered.</p></div>
  1932. <div class="dlist"><dl>
  1933. <dt class="hdlist1">
  1934. <strong>0</strong>
  1935. </dt>
  1936. <dd>
  1937. <p>
  1938. If all downloads are successful.
  1939. </p>
  1940. </dd>
  1941. <dt class="hdlist1">
  1942. <strong>1</strong>
  1943. </dt>
  1944. <dd>
  1945. <p>
  1946. If an unknown error occurs.
  1947. </p>
  1948. </dd>
  1949. <dt class="hdlist1">
  1950. <strong>2</strong>
  1951. </dt>
  1952. <dd>
  1953. <p>
  1954. If time out occurs.
  1955. </p>
  1956. </dd>
  1957. <dt class="hdlist1">
  1958. <strong>3</strong>
  1959. </dt>
  1960. <dd>
  1961. <p>
  1962. If a resource is not found.
  1963. </p>
  1964. </dd>
  1965. <dt class="hdlist1">
  1966. <strong>4</strong>
  1967. </dt>
  1968. <dd>
  1969. <p>
  1970. If aria2 sees the specfied number of "resource not found" error.
  1971. See <strong>--max-file-not-found</strong> option).
  1972. </p>
  1973. </dd>
  1974. <dt class="hdlist1">
  1975. <strong>5</strong>
  1976. </dt>
  1977. <dd>
  1978. <p>
  1979. If a download aborts because download speed is too slow.
  1980. See <strong>--lowest-speed-limit</strong> option)
  1981. </p>
  1982. </dd>
  1983. <dt class="hdlist1">
  1984. <strong>6</strong>
  1985. </dt>
  1986. <dd>
  1987. <p>
  1988. If network problem occurs.
  1989. </p>
  1990. </dd>
  1991. <dt class="hdlist1">
  1992. <strong>7</strong>
  1993. </dt>
  1994. <dd>
  1995. <p>
  1996. If there are unfinished downloads. This error is only reported if
  1997. all finished downloads are successful and there are unfinished
  1998. downloads in a queue when aria2 exits by pressing Ctrl-C by an user
  1999. or sending TERM or INT signal.
  2000. </p>
  2001. </dd>
  2002. </dl></div>
  2003. <div class="admonitionblock">
  2004. <table><tr>
  2005. <td class="icon">
  2006. <div class="title">Note</div>
  2007. </td>
  2008. <td class="content">An error occurred in a finished download will not be reported
  2009. as exit status.</td>
  2010. </tr></table>
  2011. </div>
  2012. </div>
  2013. <h2 id="_environment">ENVIRONMENT</h2>
  2014. <div class="sectionbody">
  2015. <div class="paragraph"><p>aria2 recognizes the following environment variables.</p></div>
  2016. <div class="dlist"><dl>
  2017. <dt class="hdlist1">
  2018. http_proxy [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
  2019. </dt>
  2020. <dd>
  2021. <p>
  2022. Specify proxy server for use in HTTP.
  2023. Overrides http-proxy value in configuration file.
  2024. The command-line option <strong>--http-proxy</strong> overrides this value.
  2025. </p>
  2026. </dd>
  2027. <dt class="hdlist1">
  2028. https_proxy [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
  2029. </dt>
  2030. <dd>
  2031. <p>
  2032. Specify proxy server for use in HTTPS.
  2033. Overrides https-proxy value in configuration file.
  2034. The command-line option <strong>--https-proxy</strong> overrides this value.
  2035. </p>
  2036. </dd>
  2037. <dt class="hdlist1">
  2038. ftp_proxy [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
  2039. </dt>
  2040. <dd>
  2041. <p>
  2042. Specify proxy server for use in FTP.
  2043. Overrides ftp-proxy value in configuration file.
  2044. The command-line option <strong>--ftp-proxy</strong> overrides this value.
  2045. </p>
  2046. </dd>
  2047. <dt class="hdlist1">
  2048. all_proxy [<a href="http://][USER:PASSWORD@]HOST[:PORT">http://][USER:PASSWORD@]HOST[:PORT</a>]
  2049. </dt>
  2050. <dd>
  2051. <p>
  2052. Specify proxy server for use if no protocol-specific proxy is specified.
  2053. Overrides all-proxy value in configuration file.
  2054. The command-line option <strong>--all-proxy</strong> overrides this value.
  2055. </p>
  2056. </dd>
  2057. <dt class="hdlist1">
  2058. no_proxy [DOMAIN,&#8230;]
  2059. </dt>
  2060. <dd>
  2061. <p>
  2062. Specify comma-separated hostname or domains to which proxy should not be used.
  2063. Overrides no-proxy value in configuration file.
  2064. The command-line option <strong>--no-proxy</strong> overrides this value.
  2065. </p>
  2066. </dd>
  2067. </dl></div>
  2068. </div>
  2069. <h2 id="_files">FILES</h2>
  2070. <div class="sectionbody">
  2071. <h3 id="_aria2_conf">aria2.conf</h3><div style="clear:left"></div>
  2072. <div class="paragraph"><p>By default, aria2 parses <em>$HOME/.aria2/aria2.conf</em> as a configuraiton
  2073. file. You can specify the path to configuration file using
  2074. <strong>--conf-path</strong> option. If you don&#8217;t want to use the configuraitonf
  2075. file, use <strong>--no-conf</strong> option.</p></div>
  2076. <div class="paragraph"><p>The configuration file is a text file and has 1 option per each
  2077. line. In each line, you can specify name-value pair in the format:
  2078. NAME=VALUE, where name is the long command-line option name without
  2079. "--" prefix. You can use same syntax for the command-line option. The
  2080. lines beginning "#" are treated as comments.</p></div>
  2081. <div class="listingblock">
  2082. <div class="content">
  2083. <pre><tt># sample configuration file for aria2c
  2084. listen-port=60000
  2085. dht-listen-port=60000
  2086. seed-ratio=1.0
  2087. max-upload-limit=50K
  2088. ftp-pasv=true</tt></pre>
  2089. </div></div>
  2090. <h3 id="_dht_dat">dht.dat</h3><div style="clear:left"></div>
  2091. <div class="paragraph"><p>By default, the routing table of DHT is saved to the path $HOME/.aria2/dht.dat.</p></div>
  2092. <h3 id="_control_file">Control File</h3><div style="clear:left"></div>
  2093. <div class="paragraph"><p>aria2 uses a control file to track the progress of a download. A
  2094. control file is placed in the same directory as the downloading file
  2095. and its filename is the filename of downloading file with ".aria2"
  2096. appended. For example, if you are downloading file.zip, then the
  2097. control file should be file.zip.aria2. (There is a exception for this
  2098. naming convention. If you are downloading a multi torrent, its
  2099. control file is the "top directory" name of the torrent with ".aria2"
  2100. appended. The "top directory" name is a value of "name" key in "info"
  2101. directory in a torrent file.)</p></div>
  2102. <div class="paragraph"><p>Usually a control file is deleted once download completed. If aria2
  2103. decides that download cannot be resumed(for example, when downloading
  2104. a file from a HTTP server which doesn&#8217;t support resume), a control
  2105. file is not created.</p></div>
  2106. <div class="paragraph"><p>Normally if you lose a control file, you cannot resume download. But
  2107. if you have a torrent or metalink with chunk checksums for the file,
  2108. you can resume the download without a control file by giving -V option
  2109. to aria2c in command-line.</p></div>
  2110. <h3 id="_input_file">Input File</h3><div style="clear:left"></div>
  2111. <div class="paragraph"><p>The input file can contain a list of URIs for aria2 to download. You
  2112. can specify multiple URIs for a single entity: separate URIs on a
  2113. single line using the TAB character.</p></div>
  2114. <div class="paragraph"><p>Each line is treated as if it is provided in command-line argument.
  2115. Therefore they are affected by <strong>-Z</strong> and <strong>-P</strong> options.</p></div>
  2116. <div class="paragraph"><p>Additionally, the following options can be specified after each line
  2117. of URIs. These optional lines must start with white space(s).</p></div>
  2118. <div class="ulist"><ul>
  2119. <li>
  2120. <p>
  2121. dir
  2122. </p>
  2123. </li>
  2124. <li>
  2125. <p>
  2126. check-integrity
  2127. </p>
  2128. </li>
  2129. <li>
  2130. <p>
  2131. continue
  2132. </p>
  2133. </li>
  2134. <li>
  2135. <p>
  2136. all-proxy
  2137. </p>
  2138. </li>
  2139. <li>
  2140. <p>
  2141. connect-timeout
  2142. </p>
  2143. </li>
  2144. <li>
  2145. <p>
  2146. dry-run
  2147. </p>
  2148. </li>
  2149. <li>
  2150. <p>
  2151. lowest-speed-limit
  2152. </p>
  2153. </li>
  2154. <li>
  2155. <p>
  2156. max-file-not-found
  2157. </p>
  2158. </li>
  2159. <li>
  2160. <p>
  2161. max-tries
  2162. </p>
  2163. </li>
  2164. <li>
  2165. <p>
  2166. no-proxy
  2167. </p>
  2168. </li>
  2169. <li>
  2170. <p>
  2171. out
  2172. </p>
  2173. </li>
  2174. <li>
  2175. <p>
  2176. proxy-method
  2177. </p>
  2178. </li>
  2179. <li>
  2180. <p>
  2181. remote-time
  2182. </p>
  2183. </li>
  2184. <li>
  2185. <p>
  2186. split
  2187. </p>
  2188. </li>
  2189. <li>
  2190. <p>
  2191. timeout
  2192. </p>
  2193. </li>
  2194. <li>
  2195. <p>
  2196. http-auth-challenge
  2197. </p>
  2198. </li>
  2199. <li>
  2200. <p>
  2201. http-user
  2202. </p>
  2203. </li>
  2204. <li>
  2205. <p>
  2206. http-passwd
  2207. </p>
  2208. </li>
  2209. <li>
  2210. <p>
  2211. http-proxy
  2212. </p>
  2213. </li>
  2214. <li>
  2215. <p>
  2216. https-proxy
  2217. </p>
  2218. </li>
  2219. <li>
  2220. <p>
  2221. referer
  2222. </p>
  2223. </li>
  2224. <li>
  2225. <p>
  2226. enable-http-keep-alive
  2227. </p>
  2228. </li>
  2229. <li>
  2230. <p>
  2231. enable-http-pipelining
  2232. </p>
  2233. </li>
  2234. <li>
  2235. <p>
  2236. header
  2237. </p>
  2238. </li>
  2239. <li>
  2240. <p>
  2241. use-head
  2242. </p>
  2243. </li>
  2244. <li>
  2245. <p>
  2246. user-agent
  2247. </p>
  2248. </li>
  2249. <li>
  2250. <p>
  2251. ftp-user
  2252. </p>
  2253. </li>
  2254. <li>
  2255. <p>
  2256. ftp-passwd
  2257. </p>
  2258. </li>
  2259. <li>
  2260. <p>
  2261. ftp-pasv
  2262. </p>
  2263. </li>
  2264. <li>
  2265. <p>
  2266. ftp-proxy
  2267. </p>
  2268. </li>
  2269. <li>
  2270. <p>
  2271. ftp-type
  2272. </p>
  2273. </li>
  2274. <li>
  2275. <p>
  2276. ftp-reuse-connection
  2277. </p>
  2278. </li>
  2279. <li>
  2280. <p>
  2281. no-netrc
  2282. </p>
  2283. </li>
  2284. <li>
  2285. <p>
  2286. select-file
  2287. </p>
  2288. </li>
  2289. <li>
  2290. <p>
  2291. bt-external-ip
  2292. </p>
  2293. </li>
  2294. <li>
  2295. <p>
  2296. bt-hash-check-seed
  2297. </p>
  2298. </li>
  2299. <li>
  2300. <p>
  2301. bt-max-open-files
  2302. </p>
  2303. </li>
  2304. <li>
  2305. <p>
  2306. bt-max-peers
  2307. </p>
  2308. </li>
  2309. <li>
  2310. <p>
  2311. bt-min-crypto-level
  2312. </p>
  2313. </li>
  2314. <li>
  2315. <p>
  2316. bt-prioritize-piece
  2317. </p>
  2318. </li>
  2319. <li>
  2320. <p>
  2321. bt-require-crypto
  2322. </p>
  2323. </li>
  2324. <li>
  2325. <p>
  2326. bt-request-peer-speed-limit
  2327. </p>
  2328. </li>
  2329. <li>
  2330. <p>
  2331. bt-seed-unverified
  2332. </p>
  2333. </li>
  2334. <li>
  2335. <p>
  2336. bt-stop-timeout
  2337. </p>
  2338. </li>
  2339. <li>
  2340. <p>
  2341. bt-tracker-interval
  2342. </p>
  2343. </li>
  2344. <li>
  2345. <p>
  2346. enable-peer-exchange
  2347. </p>
  2348. </li>
  2349. <li>
  2350. <p>
  2351. follow-torrent
  2352. </p>
  2353. </li>
  2354. <li>
  2355. <p>
  2356. index-out
  2357. </p>
  2358. </li>
  2359. <li>
  2360. <p>
  2361. max-upload-limit
  2362. </p>
  2363. </li>
  2364. <li>
  2365. <p>
  2366. seed-ratio
  2367. </p>
  2368. </li>
  2369. <li>
  2370. <p>
  2371. seed-time
  2372. </p>
  2373. </li>
  2374. <li>
  2375. <p>
  2376. follow-metalink
  2377. </p>
  2378. </li>
  2379. <li>
  2380. <p>
  2381. metalink-servers
  2382. </p>
  2383. </li>
  2384. <li>
  2385. <p>
  2386. metalink-language
  2387. </p>
  2388. </li>
  2389. <li>
  2390. <p>
  2391. metalink-location
  2392. </p>
  2393. </li>
  2394. <li>
  2395. <p>
  2396. metalink-os
  2397. </p>
  2398. </li>
  2399. <li>
  2400. <p>
  2401. metalink-version
  2402. </p>
  2403. </li>
  2404. <li>
  2405. <p>
  2406. metalink-preferred-protocol
  2407. </p>
  2408. </li>
  2409. <li>
  2410. <p>
  2411. metalink-enable-unique-protocol
  2412. </p>
  2413. </li>
  2414. <li>
  2415. <p>
  2416. allow-overwrite
  2417. </p>
  2418. </li>
  2419. <li>
  2420. <p>
  2421. allow-piece-length-change
  2422. </p>
  2423. </li>
  2424. <li>
  2425. <p>
  2426. async-dns
  2427. </p>
  2428. </li>
  2429. <li>
  2430. <p>
  2431. auto-file-renaming
  2432. </p>
  2433. </li>
  2434. <li>
  2435. <p>
  2436. file-allocation
  2437. </p>
  2438. </li>
  2439. <li>
  2440. <p>
  2441. max-download-limit
  2442. </p>
  2443. </li>
  2444. <li>
  2445. <p>
  2446. no-file-allocation-limit
  2447. </p>
  2448. </li>
  2449. <li>
  2450. <p>
  2451. parameterized-uri
  2452. </p>
  2453. </li>
  2454. <li>
  2455. <p>
  2456. realtime-chunk-checksum
  2457. </p>
  2458. </li>
  2459. </ul></div>
  2460. <div class="paragraph"><p>These options have exactly same meaning of the ones in the
  2461. command-line options, but it just applies to the URIs it belongs to.</p></div>
  2462. <div class="paragraph"><p>For example, the content of uri.txt is</p></div>
  2463. <div class="listingblock">
  2464. <div class="content">
  2465. <pre><tt>http://server/file.iso http://mirror/file.iso
  2466. dir=/iso_images
  2467. out=file.img
  2468. http://foo/bar</tt></pre>
  2469. </div></div>
  2470. <div class="paragraph"><p>If aria2 is executed with <strong>-i</strong> uri.txt <strong>-d</strong> /tmp options, then
  2471. <em>file.iso</em> is saved as <em>/iso_images/file.img</em> and it is downloaded
  2472. from http://server/file.iso and http://mirror/file.iso. The file
  2473. <em>bar</em> is downloaded from http://foo/bar and saved as <em>/tmp/bar</em>.</p></div>
  2474. <div class="paragraph"><p>In some cases, <strong>out</strong> parameter has no effect. See note of <strong>--out</strong>
  2475. option for the restrictions.</p></div>
  2476. <h3 id="_server_performance_profile">Server Performance Profile</h3><div style="clear:left"></div>
  2477. <div class="paragraph"><p>This section describes the format of server performance profile. The
  2478. file is plain text and each line has several NAME=VALUE pair,
  2479. delimited by comma. Currently following NAMEs are recognized:</p></div>
  2480. <div class="dlist"><dl>
  2481. <dt class="hdlist1">
  2482. host
  2483. </dt>
  2484. <dd>
  2485. <p>
  2486. Hostname of the server. Required.
  2487. </p>
  2488. </dd>
  2489. <dt class="hdlist1">
  2490. protocol
  2491. </dt>
  2492. <dd>
  2493. <p>
  2494. Protocol for this profile, such as ftp, http. Required.
  2495. </p>
  2496. </dd>
  2497. <dt class="hdlist1">
  2498. dl_speed
  2499. </dt>
  2500. <dd>
  2501. <p>
  2502. The average download speed observed in the previous download in
  2503. bytes per sec. Required.
  2504. </p>
  2505. </dd>
  2506. <dt class="hdlist1">
  2507. sc_avg_speed
  2508. </dt>
  2509. <dd>
  2510. <p>
  2511. The average download speed observed in the previous download in
  2512. bytes per sec. This value is only updated if the download is done in
  2513. single connection environment and only used by
  2514. AdaptiveURISelector. Optional.
  2515. </p>
  2516. </dd>
  2517. <dt class="hdlist1">
  2518. mc_avg_speed
  2519. </dt>
  2520. <dd>
  2521. <p>
  2522. The average download speed observed in the previous download in
  2523. bytes per sec. This value is only updated if the download is done in
  2524. multi connection environment and only used by
  2525. AdaptiveURISelector. Optional.
  2526. </p>
  2527. </dd>
  2528. <dt class="hdlist1">
  2529. counter
  2530. </dt>
  2531. <dd>
  2532. <p>
  2533. How many times the server is used. Currently this value is only used
  2534. by AdaptiveURISelector. Optional.
  2535. </p>
  2536. </dd>
  2537. <dt class="hdlist1">
  2538. last_updated
  2539. </dt>
  2540. <dd>
  2541. <p>
  2542. Last contact time in GMT with this server, specified in the seconds
  2543. from the Epoch. Required.
  2544. </p>
  2545. </dd>
  2546. <dt class="hdlist1">
  2547. status
  2548. </dt>
  2549. <dd>
  2550. <p>
  2551. ERROR is set when server cannot be reached or out-of-service or
  2552. timeout occurred. Otherwise, OK is set.
  2553. </p>
  2554. </dd>
  2555. </dl></div>
  2556. <div class="paragraph"><p>Those fields must exist in one line. The order of the fields is not
  2557. significant. You can put pairs other than the above; they are simply
  2558. ignored.</p></div>
  2559. <div class="paragraph"><p>An example follows:</p></div>
  2560. <div class="listingblock">
  2561. <div class="content">
  2562. <pre><tt>host=localhost, protocol=http, dl_speed=32000, last_updated=1222491640, status=OK
  2563. host=localhost, protocol=ftp, dl_speed=0, last_updated=1222491632, status=ERROR</tt></pre>
  2564. </div></div>
  2565. </div>
  2566. <h2 id="_xml_rpc_interface">XML-RPC INTERFACE</h2>
  2567. <div class="sectionbody">
  2568. <h3 id="_terminology">Terminology</h3><div style="clear:left"></div>
  2569. <div class="dlist"><dl>
  2570. <dt class="hdlist1">
  2571. GID
  2572. </dt>
  2573. <dd>
  2574. <p>
  2575. GID(or gid) is the key to manage each download. Each download has an
  2576. unique GID. Currently GID looks like an integer, but don&#8217;t treat it
  2577. as integer because it may be changed to another type in the future
  2578. release.
  2579. </p>
  2580. </dd>
  2581. </dl></div>
  2582. <h3 id="_methods">Methods</h3><div style="clear:left"></div>
  2583. <div class="paragraph"><p><strong>aria2.addUri</strong> <em>uris[, options[, position]]</em></p></div>
  2584. <div class="paragraph"><p>This method adds new HTTP(S)/FTP/BitTorrent Magnet URI. <em>uris</em> is of
  2585. type array and its element is URI which is of type string. For
  2586. BitTorrent Magnet URI, <em>uris</em> must have only one element and it should
  2587. be BitTorrent Magnet URI. <em>options</em> is of type struct and its members
  2588. are a pair of option name and value. See <strong>Options</strong> below for more
  2589. details. If <em>position</em> is given as an integer starting from 0, the
  2590. new download is inserted at <em>position</em> in the waiting queue. If
  2591. <em>position</em> is not given or <em>position</em> is larger than the size of the
  2592. queue, it is appended at the end of the queue. This method returns
  2593. GID of registered download.</p></div>
  2594. <div class="paragraph"><p><strong>aria2.addTorrent</strong> <em>torrent[, uris[, options[, position]]]</em></p></div>
  2595. <div class="paragraph"><p>This method adds BitTorrent download by uploading .torrent file.
  2596. <em>torrent</em> is of type base64 which contains Base64-encoded .torrent
  2597. file. <em>uris</em> is of type array and its element is URI which is of type
  2598. string. <em>uris</em> is used for Web-seeding. For single file torrents, URI
  2599. can be a complete URI pointing to the resource or if URI ends with /,
  2600. name in torrent file is added. For multi-file torrents, name and path
  2601. in torrent are added to form a URI for each file. <em>options</em> is of
  2602. type struct and its members are a pair of option name and value. See
  2603. <strong>Options</strong> below for more details. If <em>position</em> is given as an
  2604. integer starting from 0, the new download is inserted at <em>position</em> in
  2605. the waiting queue. If <em>position</em> is not given or <em>position</em> is larger
  2606. than the size of the queue, it is appended at the end of the queue.
  2607. This method returns GID of registered download.</p></div>
  2608. <div class="paragraph"><p><strong>aria2.addMetalink</strong> <em>metalink[, options[, position]]</em></p></div>
  2609. <div class="paragraph"><p>This method adds Metalink download by uploading .metalink file.
  2610. <em>metalink</em> is of type base64 which contains Base64-encoded .metalink
  2611. file. <em>options</em> is of type struct and its members are a pair of
  2612. option name and value. See <strong>Options</strong> below for more details. If
  2613. <em>position</em> is given as an integer starting from 0, the new download is
  2614. inserted at <em>position</em> in the waiting queue. If <em>position</em> is not
  2615. given or <em>position</em> is larger than the size of the queue, it is
  2616. appended at the end of the queue. This method returns array of GID of
  2617. registered download.</p></div>
  2618. <div class="paragraph"><p><strong>aria2.remove</strong> <em>gid</em></p></div>
  2619. <div class="paragraph"><p>This method removes the download denoted by <em>gid</em>. <em>gid</em> is of type
  2620. string. If specified download is in progress, it is stopped at
  2621. first. The status of removed download becomes "removed". This method
  2622. returns GID of removed download.</p></div>
  2623. <div class="paragraph"><p><strong>aria2.tellStatus</strong> <em>gid</em></p></div>
  2624. <div class="paragraph"><p>This method returns download progress of the download denoted by
  2625. <em>gid</em>. <em>gid</em> is of type string. The response is of type struct and it
  2626. contains following keys. The value type is string.</p></div>
  2627. <div class="dlist"><dl>
  2628. <dt class="hdlist1">
  2629. gid
  2630. </dt>
  2631. <dd>
  2632. <p>
  2633. GID of this download.
  2634. </p>
  2635. </dd>
  2636. <dt class="hdlist1">
  2637. status
  2638. </dt>
  2639. <dd>
  2640. <p>
  2641. "active" for currently downloading/seeding entry. "waiting" for the
  2642. entry in the queue; download is not started. "error" for the stopped
  2643. download because of error. "complete" for the stopped and completed
  2644. download. "removed" for the download removed by user.
  2645. </p>
  2646. </dd>
  2647. <dt class="hdlist1">
  2648. totalLength
  2649. </dt>
  2650. <dd>
  2651. <p>
  2652. Total length of this download in bytes.
  2653. </p>
  2654. </dd>
  2655. <dt class="hdlist1">
  2656. completedLength
  2657. </dt>
  2658. <dd>
  2659. <p>
  2660. Completed length of this download in bytes.
  2661. </p>
  2662. </dd>
  2663. <dt class="hdlist1">
  2664. uploadLength
  2665. </dt>
  2666. <dd>
  2667. <p>
  2668. Uploaded length of this download in bytes.
  2669. </p>
  2670. </dd>
  2671. <dt class="hdlist1">
  2672. bitfield
  2673. </dt>
  2674. <dd>
  2675. <p>
  2676. Hexadecimal representation of the download progress. The highest bit
  2677. corresponds to piece index 0. The set bits indicate the piece is
  2678. available and unset bits indicate the piece is missing. The spare
  2679. bits at the end are set to zero.
  2680. </p>
  2681. </dd>
  2682. <dt class="hdlist1">
  2683. downloadSpeed
  2684. </dt>
  2685. <dd>
  2686. <p>
  2687. Download speed of this download measured in bytes/sec.
  2688. </p>
  2689. </dd>
  2690. <dt class="hdlist1">
  2691. uploadSpeed
  2692. </dt>
  2693. <dd>
  2694. <p>
  2695. Upload speed of this download measured in bytes/sec.
  2696. </p>
  2697. </dd>
  2698. <dt class="hdlist1">
  2699. infoHash
  2700. </dt>
  2701. <dd>
  2702. <p>
  2703. InfoHash. BitTorrent only.
  2704. </p>
  2705. </dd>
  2706. <dt class="hdlist1">
  2707. numSeeders
  2708. </dt>
  2709. <dd>
  2710. <p>
  2711. The number of seeders the client has connected to. BitTorrent only.
  2712. </p>
  2713. </dd>
  2714. <dt class="hdlist1">
  2715. pieceLength
  2716. </dt>
  2717. <dd>
  2718. <p>
  2719. Piece length in bytes.
  2720. </p>
  2721. </dd>
  2722. <dt class="hdlist1">
  2723. numPieces
  2724. </dt>
  2725. <dd>
  2726. <p>
  2727. The number of pieces.
  2728. </p>
  2729. </dd>
  2730. <dt class="hdlist1">
  2731. connections
  2732. </dt>
  2733. <dd>
  2734. <p>
  2735. The number of peers/servers the client has connected to.
  2736. </p>
  2737. </dd>
  2738. <dt class="hdlist1">
  2739. errorCode
  2740. </dt>
  2741. <dd>
  2742. <p>
  2743. The last error code occurred in this download. The value is of type
  2744. string. The error codes are defined in EXIT STATUS section. This
  2745. value is only available for stopped/completed downloads.
  2746. </p>
  2747. </dd>
  2748. <dt class="hdlist1">
  2749. followedBy
  2750. </dt>
  2751. <dd>
  2752. <p>
  2753. List of GIDs which are generated by the consequence of this
  2754. download. For example, when aria2 downloaded Metalink file, it
  2755. generates downloads described in it(see <strong>--follow-metalink</strong>
  2756. option). This value is useful to track these auto generated
  2757. downloads. If there is no such downloads, this key will not
  2758. be included in the response.
  2759. </p>
  2760. </dd>
  2761. <dt class="hdlist1">
  2762. belongsTo
  2763. </dt>
  2764. <dd>
  2765. <p>
  2766. GID of a parent download. Some downloads are a part of another
  2767. download. For example, if a file in Metalink has BitTorrent
  2768. resource, the download of .torrent is a part of that file. If this
  2769. download has no parent, this key will not be included in the
  2770. response.
  2771. </p>
  2772. </dd>
  2773. </dl></div>
  2774. <div class="paragraph"><p><strong>aria2.getUris</strong> <em>gid</em></p></div>
  2775. <div class="paragraph"><p>This method returns URIs used in the download denoted by <em>gid</em>. <em>gid</em>
  2776. is of type string. The response is of type array and its element is of
  2777. type struct and it contains following keys. The value type is string.</p></div>
  2778. <div class="dlist"><dl>
  2779. <dt class="hdlist1">
  2780. uri
  2781. </dt>
  2782. <dd>
  2783. <p>
  2784. URI
  2785. </p>
  2786. </dd>
  2787. </dl></div>
  2788. <div class="paragraph"><p><strong>aria2.getFiles</strong> <em>gid</em></p></div>
  2789. <div class="paragraph"><p>This method returns file list of the download denoted by <em>gid</em>. <em>gid</em>
  2790. is of type string. The response is of type array and its element is of
  2791. type struct and it contains following keys. The value type is string.</p></div>
  2792. <div class="dlist"><dl>
  2793. <dt class="hdlist1">
  2794. index
  2795. </dt>
  2796. <dd>
  2797. <p>
  2798. Index of file. Starting with 1. This is the same order with the
  2799. files in multi-file torrent.
  2800. </p>
  2801. </dd>
  2802. <dt class="hdlist1">
  2803. path
  2804. </dt>
  2805. <dd>
  2806. <p>
  2807. File path.
  2808. </p>
  2809. </dd>
  2810. <dt class="hdlist1">
  2811. length
  2812. </dt>
  2813. <dd>
  2814. <p>
  2815. File size in bytes.
  2816. </p>
  2817. </dd>
  2818. <dt class="hdlist1">
  2819. selected
  2820. </dt>
  2821. <dd>
  2822. <p>
  2823. "true" if this file is selected by <strong>--select-file</strong> option. If
  2824. <strong>--select-file</strong> is not specified or this is single torrent or no
  2825. torrent download, this value is always "true". Otherwise "false".
  2826. </p>
  2827. </dd>
  2828. </dl></div>
  2829. <div class="paragraph"><p><strong>aria2.getPeers</strong> <em>gid</em></p></div>
  2830. <div class="paragraph"><p>This method returns peer list of the download denoted by <em>gid</em>. <em>gid</em>
  2831. is of type string. This method is for BitTorrent only. The response
  2832. is of type array and its element is of type struct and it contains
  2833. following keys. The value type is string.</p></div>
  2834. <div class="dlist"><dl>
  2835. <dt class="hdlist1">
  2836. peerId
  2837. </dt>
  2838. <dd>
  2839. <p>
  2840. Percent-encoded peer ID.
  2841. </p>
  2842. </dd>
  2843. <dt class="hdlist1">
  2844. ip
  2845. </dt>
  2846. <dd>
  2847. <p>
  2848. IP address of the peer.
  2849. </p>
  2850. </dd>
  2851. <dt class="hdlist1">
  2852. port
  2853. </dt>
  2854. <dd>
  2855. <p>
  2856. Port number of the peer.
  2857. </p>
  2858. </dd>
  2859. <dt class="hdlist1">
  2860. bitfield
  2861. </dt>
  2862. <dd>
  2863. <p>
  2864. Hexadecimal representation of the download progress of the peer. The
  2865. highest bit corresponds to piece index 0. The set bits indicate the
  2866. piece is available and unset bits indicate the piece is missing. The
  2867. spare bits at the end are set to zero.
  2868. </p>
  2869. </dd>
  2870. <dt class="hdlist1">
  2871. amChoking
  2872. </dt>
  2873. <dd>
  2874. <p>
  2875. "true" if this client is choking the peer. Otherwise "false".
  2876. </p>
  2877. </dd>
  2878. <dt class="hdlist1">
  2879. peerChoking
  2880. </dt>
  2881. <dd>
  2882. <p>
  2883. "true" if the peer is choking this client. Otherwise "false".
  2884. </p>
  2885. </dd>
  2886. <dt class="hdlist1">
  2887. downloadSpeed
  2888. </dt>
  2889. <dd>
  2890. <p>
  2891. Download speed (byte/sec) that this client obtains from the peer.
  2892. </p>
  2893. </dd>
  2894. <dt class="hdlist1">
  2895. uploadSpeed
  2896. </dt>
  2897. <dd>
  2898. <p>
  2899. Upload speed(byte/sec) that this client uploads to the peer.
  2900. </p>
  2901. </dd>
  2902. <dt class="hdlist1">
  2903. seeder
  2904. </dt>
  2905. <dd>
  2906. <p>
  2907. "true" is this client is a seeder. Otherwise "false".
  2908. </p>
  2909. </dd>
  2910. </dl></div>
  2911. <div class="paragraph"><p><strong>aria2.tellActive</strong></p></div>
  2912. <div class="paragraph"><p>This method returns the list of active downloads. The respose is of
  2913. type array and its element is the same struct returned by
  2914. <strong>aria2.tellStatus</strong> method.</p></div>
  2915. <div class="paragraph"><p><strong>aria2.tellWaiting</strong> <em>offset, num</em></p></div>
  2916. <div class="paragraph"><p>This method returns the list of waiting download in the range of
  2917. [<em>offset</em>, <em>offset</em>+<em>num</em>). <em>offset</em> is of type integer and specifies
  2918. the offset from the download waiting at the front. <em>num</em> is of type
  2919. integer and specifies the number of downloads to be returned. For
  2920. example, imagine that three downloads "A","B" and "C" are waiting in
  2921. this order. aria2.tellWaiting(0, 1) returns "A". aria2.tellWaiting(1,
  2922. 2) returns "B" and "C". The respose is of type array and its element
  2923. is the same struct returned by <strong>aria2.tellStatus</strong> method.</p></div>
  2924. <div class="paragraph"><p><strong>aria2.getOption</strong> <em>gid</em></p></div>
  2925. <div class="paragraph"><p>This method returns options of the download denoted by <em>gid</em>. The
  2926. response is of type struct. Its key is the name of option. The value type
  2927. is string.</p></div>
  2928. <div class="paragraph"><p><strong>aria2.changeOption</strong> <em>gid, options</em></p></div>
  2929. <div class="paragraph"><p>This method changes options of the download denoted by <em>gid</em>
  2930. dynamically. <em>gid</em> is of type string. <em>options</em> is of type struct
  2931. and the available options are: <strong>bt-max-peers</strong>,
  2932. <strong>bt-request-peer-speed-limit</strong>, <strong>max-download-limit</strong> and
  2933. <strong>max-upload-limit</strong>. This method returns "OK" for success.</p></div>
  2934. <div class="paragraph"><p><strong>aria2.getGlobalOption</strong></p></div>
  2935. <div class="paragraph"><p>This method returns global options. The response is of type
  2936. struct. Its key is the name of option. The value type is string.
  2937. Because global options are used as a template for the options of newly
  2938. added download, the response contains keys returned by
  2939. <strong>aria2.getOption</strong> method.</p></div>
  2940. <div class="paragraph"><p><strong>aria2.changeGlobalOption</strong> <em>options</em></p></div>
  2941. <div class="paragraph"><p>This method changes global options dynamically. <em>options</em> is of type
  2942. struct and the available options are <strong>max-concurrent-downloads</strong>,
  2943. <strong>max-overall-download-limit</strong> and <strong>max-overall-upload-limit</strong>. This
  2944. method returns "OK" for success.</p></div>
  2945. <div class="paragraph"><p><strong>aria2.purgeDownloadResult</strong></p></div>
  2946. <div class="paragraph"><p>This method purges completed/error/removed downloads to free memory.
  2947. This method returns "OK".</p></div>
  2948. <div class="paragraph"><p><strong>aria2.getVersion</strong></p></div>
  2949. <div class="paragraph"><p>This method returns version of the program and the list of enabled
  2950. features. The response is of type struct and contains following keys.</p></div>
  2951. <div class="dlist"><dl>
  2952. <dt class="hdlist1">
  2953. version
  2954. </dt>
  2955. <dd>
  2956. <p>
  2957. Version number of the program in string.
  2958. </p>
  2959. </dd>
  2960. <dt class="hdlist1">
  2961. enabledFeatures
  2962. </dt>
  2963. <dd>
  2964. <p>
  2965. List of enabled features. Each feature name is of type string.
  2966. </p>
  2967. </dd>
  2968. </dl></div>
  2969. <h3 id="_error_handling">Error Handling</h3><div style="clear:left"></div>
  2970. <div class="paragraph"><p>In case of error, aria2 returns faultCode=1 and the error message in
  2971. faultString.</p></div>
  2972. <h3 id="_options_2">Options</h3><div style="clear:left"></div>
  2973. <div class="paragraph"><p>Same options for <strong>-i</strong> list are available. See <strong>Input File</strong> subsection
  2974. for complete list of options.</p></div>
  2975. <div class="paragraph"><p>In the option struct, name element is option name(without preceeding
  2976. "--") and value element is argument as string.</p></div>
  2977. <div class="listingblock">
  2978. <div class="content">
  2979. <pre><tt>&lt;struct&gt;
  2980. &lt;member&gt;
  2981. &lt;name&gt;split&lt;/name&gt;
  2982. &lt;value&gt;&lt;string&gt;1&lt;/string&gt;&lt;/value&gt;
  2983. &lt;/member&gt;
  2984. &lt;member&gt;
  2985. &lt;name&gt;http-proxy&lt;/name&gt;
  2986. &lt;value&gt;&lt;string&gt;http://proxy/&lt;/string&gt;&lt;/value&gt;
  2987. &lt;/member&gt;
  2988. &lt;/struct&gt;</tt></pre>
  2989. </div></div>
  2990. <div class="paragraph"><p><strong>header</strong> and <strong>index-out</strong> option are allowed multiple times in
  2991. command-line. Since name should be unique in struct(many XML-RPC
  2992. library implementation uses hash or dict for struct), single string is
  2993. not enough. To overcome this situation, they can take array as value
  2994. as well as string.</p></div>
  2995. <div class="listingblock">
  2996. <div class="content">
  2997. <pre><tt>&lt;struct&gt;
  2998. &lt;member&gt;
  2999. &lt;name&gt;header&lt;/name&gt;
  3000. &lt;value&gt;
  3001. &lt;array&gt;
  3002. &lt;data&gt;
  3003. &lt;value&gt;&lt;string&gt;Accept-Language: ja&lt;/string&gt;&lt;/value&gt;
  3004. &lt;value&gt;&lt;string&gt;Accept-Charset: utf-8&lt;/string&gt;&lt;/value&gt;
  3005. &lt;/data&gt;
  3006. &lt;/array&gt;
  3007. &lt;/value&gt;
  3008. &lt;/member&gt;
  3009. &lt;/struct&gt;</tt></pre>
  3010. </div></div>
  3011. <h3 id="_sample_xml_rpc_client_code">Sample XML-RPC Client Code</h3><div style="clear:left"></div>
  3012. <div class="paragraph"><p>The following Ruby script adds <em>http://localhost/aria2.tar.bz2</em> to
  3013. aria2c operated on localhost with option <strong>--dir</strong>=<em>/downloads</em> and
  3014. prints its reponse.</p></div>
  3015. <div class="listingblock">
  3016. <div class="content">
  3017. <pre><tt>#!/usr/bin/env ruby
  3018. require 'xmlrpc/client'
  3019. require 'pp'
  3020. client=XMLRPC::Client.new2("http://localhost:6800/rpc")
  3021. options={ "dir" =&gt; "/downloads" }
  3022. result=client.call("aria2.addUri", [ "http://localhost/aria2.tar.bz2" ], options)
  3023. pp result</tt></pre>
  3024. </div></div>
  3025. </div>
  3026. <h2 id="_example">EXAMPLE</h2>
  3027. <div class="sectionbody">
  3028. <h3 id="_http_ftp_segmented_download">HTTP/FTP Segmented Download</h3><div style="clear:left"></div>
  3029. <h4 id="_download_a_file">Download a file</h4>
  3030. <div class="listingblock">
  3031. <div class="content">
  3032. <pre><tt>aria2c "http://host/file.zip"</tt></pre>
  3033. </div></div>
  3034. <div class="admonitionblock">
  3035. <table><tr>
  3036. <td class="icon">
  3037. <div class="title">Note</div>
  3038. </td>
  3039. <td class="content">aria2 uses 5 connections to download 1 file by default.</td>
  3040. </tr></table>
  3041. </div>
  3042. <h4 id="_download_a_file_using_1_connection">Download a file using 1 connection</h4>
  3043. <div class="listingblock">
  3044. <div class="content">
  3045. <pre><tt>aria2c -s1 "http://host/file.zip"</tt></pre>
  3046. </div></div>
  3047. <div class="admonitionblock">
  3048. <table><tr>
  3049. <td class="icon">
  3050. <div class="title">Note</div>
  3051. </td>
  3052. <td class="content">aria2 uses 5 connections to download 1 file by default.
  3053. -s1 limits the number of connections to just 1.</td>
  3054. </tr></table>
  3055. </div>
  3056. <div class="admonitionblock">
  3057. <table><tr>
  3058. <td class="icon">
  3059. <div class="title">Note</div>
  3060. </td>
  3061. <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 URLs as long as they are pointing to the same file.</td>
  3062. </tr></table>
  3063. </div>
  3064. <h4 id="_download_a_file_from_2_different_http_servers">Download a file from 2 different HTTP servers</h4>
  3065. <div class="listingblock">
  3066. <div class="content">
  3067. <pre><tt>aria2c "http://host/file.zip" "http://mirror/file.zip"</tt></pre>
  3068. </div></div>
  3069. <h4 id="_download_a_file_from_http_and_ftp_servers">Download a file from HTTP and FTP servers</h4>
  3070. <div class="listingblock">
  3071. <div class="content">
  3072. <pre><tt>aria2c "http://host1/file.zip" "ftp://host2/file.zip"</tt></pre>
  3073. </div></div>
  3074. <h4 id="_download_files_listed_in_a_text_file_concurrently">Download files listed in a text file concurrently</h4>
  3075. <div class="listingblock">
  3076. <div class="content">
  3077. <pre><tt>aria2c -ifiles.txt -j2</tt></pre>
  3078. </div></div>
  3079. <div class="admonitionblock">
  3080. <table><tr>
  3081. <td class="icon">
  3082. <div class="title">Note</div>
  3083. </td>
  3084. <td class="content">-j option specifies the number of parallel downloads.</td>
  3085. </tr></table>
  3086. </div>
  3087. <h4 id="_using_proxy">Using proxy</h4>
  3088. <div class="paragraph"><p>For HTTP:</p></div>
  3089. <div class="listingblock">
  3090. <div class="content">
  3091. <pre><tt>aria2c --http-proxy="http://proxy:8080" "http://host/file"</tt></pre>
  3092. </div></div>
  3093. <div class="paragraph"><p>For FTP:</p></div>
  3094. <div class="listingblock">
  3095. <div class="content">
  3096. <pre><tt>aria2c --ftp-proxy="http://proxy:8080" "ftp://host/file"</tt></pre>
  3097. </div></div>
  3098. <div class="admonitionblock">
  3099. <table><tr>
  3100. <td class="icon">
  3101. <div class="title">Note</div>
  3102. </td>
  3103. <td class="content">See <strong>--http-proxy</strong>, <strong>--https-proxy</strong>, <strong>--ftp-proxy</strong> and <strong>--all-proxy</strong> for
  3104. details.
  3105. You can specify proxy in the environment variables. See <strong>ENVIRONMENT</strong> section.</td>
  3106. </tr></table>
  3107. </div>
  3108. <h4 id="_proxy_with_authorization">Proxy with authorization</h4>
  3109. <div class="listingblock">
  3110. <div class="content">
  3111. <pre><tt>aria2c --http-proxy="http://username:password@proxy:8080" "http://host/file"</tt></pre>
  3112. </div></div>
  3113. <h3 id="_metalink_download">Metalink Download</h3><div style="clear:left"></div>
  3114. <h4 id="_download_files_with_remote_metalink">Download files with remote Metalink</h4>
  3115. <div class="listingblock">
  3116. <div class="content">
  3117. <pre><tt>aria2c --follow-metalink=mem "http://host/file.metalink"</tt></pre>
  3118. </div></div>
  3119. <h4 id="_download_using_a_local_metalink_file">Download using a local metalink file</h4>
  3120. <div class="listingblock">
  3121. <div class="content">
  3122. <pre><tt>aria2c -p --lowest-speed-limit=4000 file.metalink</tt></pre>
  3123. </div></div>
  3124. <div class="admonitionblock">
  3125. <table><tr>
  3126. <td class="icon">
  3127. <div class="title">Note</div>
  3128. </td>
  3129. <td class="content">To pause a download, press Ctrl-C.
  3130. You can resume the transfer by running aria2c with the same argument in the same
  3131. directory.</td>
  3132. </tr></table>
  3133. </div>
  3134. <h4 id="_download_several_local_metalink_files">Download several local metalink files</h4>
  3135. <div class="listingblock">
  3136. <div class="content">
  3137. <pre><tt>aria2c -j2 file1.metalink file2.metalink</tt></pre>
  3138. </div></div>
  3139. <h4 id="_download_only_selected_files_using_index">Download only selected files using index</h4>
  3140. <div class="listingblock">
  3141. <div class="content">
  3142. <pre><tt>aria2c --select-file=1-4,8 file.metalink</tt></pre>
  3143. </div></div>
  3144. <div class="admonitionblock">
  3145. <table><tr>
  3146. <td class="icon">
  3147. <div class="title">Note</div>
  3148. </td>
  3149. <td class="content">The index is printed to the console using -S option.</td>
  3150. </tr></table>
  3151. </div>
  3152. <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>
  3153. <div class="listingblock">
  3154. <div class="content">
  3155. <pre><tt>aria2c --metalink-location=JP,US --metalink-version=1.1 --metalink-language=en-US file.metalink</tt></pre>
  3156. </div></div>
  3157. <h3 id="_bittorrent_download">BitTorrent Download</h3><div style="clear:left"></div>
  3158. <h4 id="_download_files_from_remote_bittorrent_file">Download files from remote BitTorrent file</h4>
  3159. <div class="listingblock">
  3160. <div class="content">
  3161. <pre><tt>aria2c --follow-torrent=mem "http://host/file.torrent"</tt></pre>
  3162. </div></div>
  3163. <h4 id="_download_using_a_local_torrent_file">Download using a local torrent file</h4>
  3164. <div class="listingblock">
  3165. <div class="content">
  3166. <pre><tt>aria2c --max-upload-limit=40K file.torrent</tt></pre>
  3167. </div></div>
  3168. <div class="admonitionblock">
  3169. <table><tr>
  3170. <td class="icon">
  3171. <div class="title">Note</div>
  3172. </td>
  3173. <td class="content">--max-upload-limit specifies the max of upload rate.</td>
  3174. </tr></table>
  3175. </div>
  3176. <div class="admonitionblock">
  3177. <table><tr>
  3178. <td class="icon">
  3179. <div class="title">Note</div>
  3180. </td>
  3181. <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>
  3182. </tr></table>
  3183. </div>
  3184. <h4 id="_download_using_bittorrent_magnet_uri">Download using BitTorrent Magnet URI</h4>
  3185. <div class="listingblock">
  3186. <div class="content">
  3187. <pre><tt>aria2c "magnet:?xt=urn:btih:248d0a1cd08284299de78d5c1ed359bb46717d8c&amp;dn=aria2"</tt></pre>
  3188. </div></div>
  3189. <div class="admonitionblock">
  3190. <table><tr>
  3191. <td class="icon">
  3192. <div class="title">Note</div>
  3193. </td>
  3194. <td class="content">Don&#8217;t forget to quote BitTorrent Magnet URI which includes "&amp;"
  3195. character with single(') or double(") quotation.</td>
  3196. </tr></table>
  3197. </div>
  3198. <h4 id="_download_2_torrents">Download 2 torrents</h4>
  3199. <div class="listingblock">
  3200. <div class="content">
  3201. <pre><tt>aria2c -j2 file1.torrent file2.torrent</tt></pre>
  3202. </div></div>
  3203. <h4 id="_download_a_file_using_torrent_and_http_ftp_server">Download a file using torrent and HTTP/FTP server</h4>
  3204. <div class="listingblock">
  3205. <div class="content">
  3206. <pre><tt>aria2c -Ttest.torrent "http://host1/file" "ftp://host2/file"</tt></pre>
  3207. </div></div>
  3208. <div class="admonitionblock">
  3209. <table><tr>
  3210. <td class="icon">
  3211. <div class="title">Note</div>
  3212. </td>
  3213. <td class="content">Downloading multi file torrent with HTTP/FTP is not supported.</td>
  3214. </tr></table>
  3215. </div>
  3216. <h4 id="_download_only_selected_files_using_index_usually_called_selectable_download">Download only selected files using index(usually called "selectable download")</h4>
  3217. <div class="listingblock">
  3218. <div class="content">
  3219. <pre><tt>aria2c --select-file=1-4,8 file.torrent</tt></pre>
  3220. </div></div>
  3221. <div class="admonitionblock">
  3222. <table><tr>
  3223. <td class="icon">
  3224. <div class="title">Note</div>
  3225. </td>
  3226. <td class="content">The index is printed to the console using -S option.</td>
  3227. </tr></table>
  3228. </div>
  3229. <h4 id="_specify_output_filename">Specify output filename</h4>
  3230. <div class="paragraph"><p>To specify output filename for BitTorrent downloads, you need to know
  3231. the index of file in torrent file using <strong>-S</strong> option. For example, the
  3232. output looks like this:</p></div>
  3233. <div class="listingblock">
  3234. <div class="content">
  3235. <pre><tt>idx|path/length
  3236. ===+======================
  3237. 1|dist/base-2.6.18.iso
  3238. |99.9MiB
  3239. ---+----------------------
  3240. 2|dist/driver-2.6.18.iso
  3241. |169.0MiB
  3242. ---+----------------------</tt></pre>
  3243. </div></div>
  3244. <div class="paragraph"><p>To save <em>dist/base-2.6.18.iso</em> in <em>/tmp/mydir/base.iso</em> and
  3245. <em>dist/driver-2.6.18.iso</em> in <em>/tmp/dir/driver.iso</em>, use the following
  3246. command:</p></div>
  3247. <div class="listingblock">
  3248. <div class="content">
  3249. <pre><tt>aria2c --dir=/tmp --index-out=1=mydir/base.iso --index-out=2=dir/driver.iso file.torrent</tt></pre>
  3250. </div></div>
  3251. <h4 id="_change_the_listening_port_for_incoming_peer">Change the listening port for incoming peer</h4>
  3252. <div class="listingblock">
  3253. <div class="content">
  3254. <pre><tt>aria2c --listen-port=7000-7001,8000 file.torrent</tt></pre>
  3255. </div></div>
  3256. <div class="admonitionblock">
  3257. <table><tr>
  3258. <td class="icon">
  3259. <div class="title">Note</div>
  3260. </td>
  3261. <td class="content">Since aria2 doesn&#8217;t configure firewall or router for port forwarding, it&#8217;s up
  3262. to you to do it manually.</td>
  3263. </tr></table>
  3264. </div>
  3265. <h4 id="_specify_the_condition_to_stop_program_after_torrent_download_finished">Specify the condition to stop program after torrent download finished</h4>
  3266. <div class="listingblock">
  3267. <div class="content">
  3268. <pre><tt>aria2c --seed-time=120 --seed-ratio=1.0 file.torrent</tt></pre>
  3269. </div></div>
  3270. <div class="admonitionblock">
  3271. <table><tr>
  3272. <td class="icon">
  3273. <div class="title">Note</div>
  3274. </td>
  3275. <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>
  3276. </tr></table>
  3277. </div>
  3278. <h4 id="_throttle_upload_speed">Throttle upload speed</h4>
  3279. <div class="listingblock">
  3280. <div class="content">
  3281. <pre><tt>aria2c --max-upload-limit=100K file.torrent</tt></pre>
  3282. </div></div>
  3283. <h4 id="_enable_dht">Enable DHT</h4>
  3284. <div class="listingblock">
  3285. <div class="content">
  3286. <pre><tt>aria2c --enable-dht --dht-listen-port=6881 file.torrent</tt></pre>
  3287. </div></div>
  3288. <div class="admonitionblock">
  3289. <table><tr>
  3290. <td class="icon">
  3291. <div class="title">Note</div>
  3292. </td>
  3293. <td class="content">DHT uses udp port. Since aria2 doesn&#8217;t configure firewall or router for port
  3294. forwarding, it&#8217;s up to you to do it manually.</td>
  3295. </tr></table>
  3296. </div>
  3297. <h3 id="_more_advanced_http_features">More advanced HTTP features</h3><div style="clear:left"></div>
  3298. <h4 id="_load_cookies">Load cookies</h4>
  3299. <div class="listingblock">
  3300. <div class="content">
  3301. <pre><tt>aria2c --load-cookies=cookies.txt "http://host/file.zip"</tt></pre>
  3302. </div></div>
  3303. <div class="admonitionblock">
  3304. <table><tr>
  3305. <td class="icon">
  3306. <div class="title">Note</div>
  3307. </td>
  3308. <td class="content">You can use Firefox/Mozilla&#8217;s cookie file without modification.</td>
  3309. </tr></table>
  3310. </div>
  3311. <h4 id="_resume_download_started_by_web_browsers_or_another_programs">Resume download started by web browsers or another programs</h4>
  3312. <div class="listingblock">
  3313. <div class="content">
  3314. <pre><tt>aria2c -c -s2 "http://host/partiallydownloadedfile.zip"</tt></pre>
  3315. </div></div>
  3316. <h4 id="_client_certificate_authorization_for_ssl_tls">Client certificate authorization for SSL/TLS</h4>
  3317. <div class="listingblock">
  3318. <div class="content">
  3319. <pre><tt>aria2c --certificate=/path/to/mycert.pem --private-key=/path/to/mykey.pem https://host/file</tt></pre>
  3320. </div></div>
  3321. <div class="admonitionblock">
  3322. <table><tr>
  3323. <td class="icon">
  3324. <div class="title">Note</div>
  3325. </td>
  3326. <td class="content">The file specified in <strong>--private-key</strong> must be decrypted. The behavior when
  3327. encrypted one is given is undefined.</td>
  3328. </tr></table>
  3329. </div>
  3330. <h4 id="_verify_peer_in_ssl_tls_using_given_ca_certificates">Verify peer in SSL/TLS using given CA certificates</h4>
  3331. <div class="listingblock">
  3332. <div class="content">
  3333. <pre><tt>aria2c --ca-certificate=/path/to/ca-certificates.crt --check-certificate https://host/file</tt></pre>
  3334. </div></div>
  3335. <h3 id="_and_more_advanced_features">And more advanced features</h3><div style="clear:left"></div>
  3336. <h4 id="_throttle_download_speed">Throttle download speed</h4>
  3337. <div class="listingblock">
  3338. <div class="content">
  3339. <pre><tt>aria2c --max-download-limit=100K file.metalink</tt></pre>
  3340. </div></div>
  3341. <h4 id="_repair_a_damaged_download">Repair a damaged download</h4>
  3342. <div class="listingblock">
  3343. <div class="content">
  3344. <pre><tt>aria2c -V file.metalink</tt></pre>
  3345. </div></div>
  3346. <div class="admonitionblock">
  3347. <table><tr>
  3348. <td class="icon">
  3349. <div class="title">Note</div>
  3350. </td>
  3351. <td class="content">This option is only available used with BitTorrent or metalink with chunk
  3352. checksums.</td>
  3353. </tr></table>
  3354. </div>
  3355. <h4 id="_drop_connection_if_download_speed_is_lower_than_specified_value">Drop connection if download speed is lower than specified value</h4>
  3356. <div class="listingblock">
  3357. <div class="content">
  3358. <pre><tt>aria2c --lowest-speed-limit=10K file.metalink</tt></pre>
  3359. </div></div>
  3360. <h4 id="_parameterized_uri_support">Parameterized URI support</h4>
  3361. <div class="paragraph"><p>You can specify set of parts:</p></div>
  3362. <div class="listingblock">
  3363. <div class="content">
  3364. <pre><tt>aria2c -P "http://{host1,host2,host3}/file.iso"</tt></pre>
  3365. </div></div>
  3366. <div class="paragraph"><p>You can specify numeric sequence:</p></div>
  3367. <div class="listingblock">
  3368. <div class="content">
  3369. <pre><tt>aria2c -Z -P "http://host/image[000-100].png"</tt></pre>
  3370. </div></div>
  3371. <div class="admonitionblock">
  3372. <table><tr>
  3373. <td class="icon">
  3374. <div class="title">Note</div>
  3375. </td>
  3376. <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>
  3377. </tr></table>
  3378. </div>
  3379. <div class="paragraph"><p>You can specify step counter:</p></div>
  3380. <div class="listingblock">
  3381. <div class="content">
  3382. <pre><tt>aria2c -Z -P "http://host/image[A-Z:2].png"</tt></pre>
  3383. </div></div>
  3384. <h4 id="_parallel_downloads_of_arbitrary_number_of_url_metalink_torrent">Parallel downloads of arbitrary number of URL,metalink,torrent</h4>
  3385. <div class="listingblock">
  3386. <div class="content">
  3387. <pre><tt>aria2c -j3 -Z "http://host/file1" file2.torrent file3.metalink</tt></pre>
  3388. </div></div>
  3389. <h4 id="_bittorrent_encryption">BitTorrent Encryption</h4>
  3390. <div class="paragraph"><p>Encrypt whole payload using ARC4:</p></div>
  3391. <div class="listingblock">
  3392. <div class="content">
  3393. <pre><tt>aria2c --bt-min-crypto-level=arc4 --bt-require-crypto=true file.torrent</tt></pre>
  3394. </div></div>
  3395. </div>
  3396. <h2 id="_see_also">SEE ALSO</h2>
  3397. <div class="sectionbody">
  3398. <div class="paragraph"><p>Project Web Site: <a href="http://aria2.sourceforge.net/">http://aria2.sourceforge.net/</a></p></div>
  3399. <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>
  3400. <div class="paragraph"><p>Metalink Homepage: <a href="http://www.metalinker.org/">http://www.metalinker.org/</a></p></div>
  3401. </div>
  3402. <h2 id="_copyright">COPYRIGHT</h2>
  3403. <div class="sectionbody">
  3404. <div class="paragraph"><p>Copyright &#169; 2006, 2009 Tatsuhiro Tsujikawa</p></div>
  3405. <div class="paragraph"><p>This program is free software; you can redistribute it and/or modify
  3406. it under the terms of the GNU General Public License as published by
  3407. the Free Software Foundation; either version 2 of the License, or
  3408. (at your option) any later version.</p></div>
  3409. <div class="paragraph"><p>This program is distributed in the hope that it will be useful,
  3410. but WITHOUT ANY WARRANTY; without even the implied warranty of
  3411. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  3412. GNU General Public License for more details.</p></div>
  3413. <div class="paragraph"><p>You should have received a copy of the GNU General Public License
  3414. along with this program; if not, write to the Free Software
  3415. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</p></div>
  3416. <div class="paragraph"><p>In addition, as a special exception, the copyright holders give
  3417. permission to link the code of portions of this program with the
  3418. OpenSSL library under certain conditions as described in each
  3419. individual source file, and distribute linked combinations
  3420. including the two.
  3421. You must obey the GNU General Public License in all respects
  3422. for all of the code used other than OpenSSL. If you modify
  3423. file(s) with this exception, you may extend this exception to your
  3424. version of the file(s), but you are not obligated to do so. If you
  3425. do not wish to do so, delete this exception statement from your
  3426. version. If you delete this exception statement from all source
  3427. files in the program, then also delete it here.</p></div>
  3428. </div>
  3429. </div>
  3430. <div id="footnotes"><hr /></div>
  3431. <div id="footer">
  3432. <div id="footer-text">
  3433. Last updated 2009-12-20 23:42:01 JST
  3434. </div>
  3435. </div>
  3436. </body>
  3437. </html>