aria2c.1 90 KB

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