aria2c.1 74 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414
  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: 12/10/2009
  6. .\" Manual: Aria2 Manual
  7. .\" Source: Aria2
  8. .\" Language: English
  9. .\"
  10. .TH "ARIA2C" "1" "12/10/2009" "Aria2" "Aria2 Manual"
  11. .\" -----------------------------------------------------------------
  12. .\" * set default formatting
  13. .\" -----------------------------------------------------------------
  14. .\" disable hyphenation
  15. .nh
  16. .\" disable justification (adjust text to left margin only)
  17. .ad l
  18. .\" -----------------------------------------------------------------
  19. .\" * MAIN CONTENT STARTS HERE *
  20. .\" -----------------------------------------------------------------
  21. .SH "NAME"
  22. aria2c \- The ultra fast download utility
  23. .SH "SYNOPSIS"
  24. .sp
  25. aria2c [\fIOPTIONS\fR] [\fIURI\fR | \fIMAGNET\fR | \fITORRENT_FILE\fR | \fIMETALINK_FILE\fR]\&...
  26. .SH "DESCRIPTION"
  27. .sp
  28. 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\&.
  29. .SH "OPTIONS"
  30. .SS "Basic Options"
  31. .PP
  32. \fB\-d\fR, \fB\-\-dir\fR=DIR
  33. .RS 4
  34. The directory to store the downloaded file\&.
  35. .RE
  36. .PP
  37. \fB\-i\fR, \fB\-\-input\-file\fR=FILE
  38. .RS 4
  39. 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
  40. \fI\-\fR
  41. is specified\&. The additional
  42. \fBout\fR
  43. and
  44. \fBdir\fR
  45. options can be specified after each line of URIs\&. This optional line must start with white space(s)\&. See
  46. \fBInput File\fR
  47. subsection for details\&.
  48. .RE
  49. .PP
  50. \fB\-l\fR, \fB\-\-log\fR=LOG
  51. .RS 4
  52. The file name of the log file\&. If
  53. \fI\-\fR
  54. is specified, log is written to stdout\&.
  55. .RE
  56. .PP
  57. \fB\-j\fR, \fB\-\-max\-concurrent\-downloads\fR=N
  58. .RS 4
  59. Set maximum number of parallel downloads for every static (HTTP/FTP) URL, torrent and metalink\&. See also
  60. \fB\-s\fR
  61. and
  62. \fB\-C\fR
  63. option\&. Default:
  64. \fI5\fR
  65. .RE
  66. .PP
  67. \fB\-V\fR, \fB\-\-check\-integrity\fR[=\fItrue\fR|\fIfalse\fR]
  68. .RS 4
  69. 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:
  70. \fIfalse\fR
  71. .RE
  72. .PP
  73. \fB\-c\fR, \fB\-\-continue\fR
  74. .RS 4
  75. 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\&.
  76. .RE
  77. .PP
  78. \fB\-h\fR, \fB\-\-help\fR[=TAG|KEYWORD]
  79. .RS 4
  80. 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:
  81. \fI#basic\fR,
  82. \fI#advanced\fR,
  83. \fI#http\fR,
  84. \fI#https\fR,
  85. \fI#ftp\fR,
  86. \fI#metalink\fR,
  87. \fI#bittorrent\fR,
  88. \fI#cookie\fR,
  89. \fI#hook\fR,
  90. \fI#file\fR,
  91. \fI#xml\-rpc\fR,
  92. \fI#experimental\fR,
  93. \fI#all\fR
  94. Default:
  95. \fI#basic\fR
  96. .RE
  97. .SS "HTTP/FTP Options"
  98. .PP
  99. \fB\-\-all\-proxy\fR=PROXY
  100. .RS 4
  101. Use this proxy server for all protocols\&. You can override this setting and specify a proxy server for a particular protocol using
  102. \fB\-\-http\-proxy\fR,
  103. \fB\-\-https\-proxy\fR
  104. and
  105. \fB\-\-ftp\-proxy\fR
  106. options\&. This affects all URLs\&. The format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]
  107. .RE
  108. .PP
  109. \fB\-\-connect\-timeout\fR=SEC
  110. .RS 4
  111. 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
  112. \fB\-\-timeout\fR
  113. option is used instead\&. Default:
  114. \fI60\fR
  115. .RE
  116. .PP
  117. \fB\-\-dry\-run\fR[=\fItrue\fR|\fIfalse\fR]
  118. .RS 4
  119. If
  120. \fItrue\fR
  121. 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
  122. \fItrue\fR
  123. is specified\&. Default:
  124. \fIfalse\fR
  125. .RE
  126. .PP
  127. \fB\-\-lowest\-speed\-limit\fR=SPEED
  128. .RS 4
  129. Close connection if download speed is lower than or equal to this value(bytes per sec)\&.
  130. \fI0\fR
  131. means aria2 does not have a lowest speed limit\&. You can append
  132. \fIK\fR
  133. or
  134. \fIM\fR(1K = 1024, 1M = 1024K)\&. This option does not affect BitTorrent downloads\&. Default:
  135. \fI0\fR
  136. .RE
  137. .PP
  138. \fB\-\-max\-file\-not\-found\fR=NUM
  139. .RS 4
  140. 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
  141. \fI0\fR
  142. to disable this option\&. This options is effective only when using HTTP/FTP servers\&. Default:
  143. \fI0\fR
  144. .RE
  145. .PP
  146. \fB\-m\fR, \fB\-\-max\-tries\fR=N
  147. .RS 4
  148. Set number of tries\&.
  149. \fI0\fR
  150. means unlimited\&. Default:
  151. \fI5\fR
  152. .RE
  153. .PP
  154. \fB\-n\fR, \fB\-\-no\-netrc\fR
  155. .RS 4
  156. Disables netrc support\&. netrc support is enabled by default\&.
  157. .RE
  158. .PP
  159. \fB\-\-no\-proxy\fR=DOMAINS
  160. .RS 4
  161. Specify comma separated hostnames or domains where proxy should not be used\&.
  162. .RE
  163. .PP
  164. \fB\-o\fR, \fB\-\-out\fR=FILE
  165. .RS 4
  166. The file name of the downloaded file\&.
  167. .RE
  168. .if n \{\
  169. .sp
  170. .\}
  171. .RS 4
  172. .it 1 an-trap
  173. .nr an-no-space-flag 1
  174. .nr an-break-flag 1
  175. .br
  176. .ps +1
  177. \fBNote\fR
  178. .ps -1
  179. .br
  180. .sp
  181. In Metalink or BitTorrent download you cannot specify file name\&. The file name specified here is only used when the URLs 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"
  182. .sp .5v
  183. .RE
  184. .PP
  185. \fB\-\-proxy\-method\fR=METHOD
  186. .RS 4
  187. Set the method to use in proxy request\&.
  188. \fIMETHOD\fR
  189. is either
  190. \fIget\fR
  191. or
  192. \fItunnel\fR\&. HTTPS downloads always use
  193. \fItunnel\fR
  194. regardless of this option\&. Default:
  195. \fIget\fR
  196. .RE
  197. .PP
  198. \fB\-R\fR, \fB\-\-remote\-time\fR[=\fItrue\fR|\fIfalse\fR]
  199. .RS 4
  200. Retrieve timestamp of the remote file from the remote HTTP/FTP server and if it is available, apply it to the local file\&. Default:
  201. \fIfalse\fR
  202. .RE
  203. .PP
  204. \fB\-\-server\-stat\-of\fR=FILE
  205. .RS 4
  206. Specify the filename to which performance profile of the servers is saved\&. You can load saved data using
  207. \fB\-\-server\-stat\-if\fR
  208. option\&. See
  209. \fBServer Performance Profile\fR
  210. subsection below for file format\&.
  211. .RE
  212. .PP
  213. \fB\-\-server\-stat\-if\fR=FILE
  214. .RS 4
  215. Specify the filename to load performance profile of the servers\&. The loaded data will be used in some URI selector such as
  216. \fIfeedback\fR\&. See also
  217. \fB\-\-uri\-selector\fR
  218. option\&. See
  219. \fBServer Performance Profile\fR
  220. subsection below for file format\&.
  221. .RE
  222. .PP
  223. \fB\-\-server\-stat\-timeout\fR=SEC
  224. .RS 4
  225. Specifies timeout in seconds to invalidate performance profile of the servers since the last contact to them\&. Default:
  226. \fI86400\fR
  227. (24hours)
  228. .RE
  229. .PP
  230. \fB\-s\fR, \fB\-\-split\fR=N
  231. .RS 4
  232. Download a file using N connections\&. If more than N URLs are given, first N URLs are used and remaining URLs are used for backup\&. If less than N URLs are given, those URLs are used more than once so that N connections total are made simultaneously\&. Please see
  233. \fB\-j\fR
  234. option too\&. Please note that in Metalink download, this option has no effect and use
  235. \fB\-C\fR
  236. option instead\&. Default:
  237. \fI5\fR
  238. .RE
  239. .PP
  240. \fB\-t\fR, \fB\-\-timeout\fR=SEC
  241. .RS 4
  242. Set timeout in seconds\&. Default:
  243. \fI60\fR
  244. .RE
  245. .PP
  246. \fB\-\-uri\-selector\fR=SELECTOR
  247. .RS 4
  248. Specify URI selection algorithm\&. The possible values are
  249. \fIinorder\fR,
  250. \fIfeedback\fR
  251. and
  252. \fIadaptive\fR\&. If
  253. \fIinorder\fR
  254. is given, URI is tried in the order appeared in the URI list\&. If
  255. \fIfeedback\fR
  256. 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
  257. \fB\-\-server\-stat\-of\fR
  258. and
  259. \fB\-\-server\-stat\-if\fR
  260. options\&. If
  261. \fIadaptive\fR
  262. 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
  263. \fIfeedback\fR, it uses a performance profile of servers\&. Default:
  264. \fIfeedback\fR
  265. .RE
  266. .SS "HTTP Specific Options"
  267. .PP
  268. \fB\-\-ca\-certificate\fR=FILE
  269. .RS 4
  270. 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
  271. \fB\-\-check\-certificate\fR
  272. option to enable verification\&.
  273. .RE
  274. .PP
  275. \fB\-\-certificate\fR=FILE
  276. .RS 4
  277. Use the client certificate in FILE\&. The certificate must be in PEM format\&. You may use
  278. \fB\-\-private\-key\fR
  279. option to specify the private key\&.
  280. .RE
  281. .PP
  282. \fB\-\-check\-certificate\fR[=\fItrue\fR|\fIfalse\fR]
  283. .RS 4
  284. Verify the peer using certificates specified in
  285. \fB\-\-ca\-certificate\fR
  286. option\&. Default:
  287. \fItrue\fR
  288. .RE
  289. .PP
  290. \fB\-\-http\-auth\-challenge\fR[=\fItrue\fR|\fIfalse\fR]
  291. .RS 4
  292. Send HTTP authorization header only when it is requested by the server\&. If
  293. \fIfalse\fR
  294. 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:
  295. \fIfalse\fR
  296. .RE
  297. .PP
  298. \fB\-\-http\-user\fR=USER
  299. .RS 4
  300. Set HTTP user\&. This affects all URLs\&.
  301. .RE
  302. .PP
  303. \fB\-\-http\-passwd\fR=PASSWD
  304. .RS 4
  305. Set HTTP password\&. This affects all URLs\&.
  306. .RE
  307. .PP
  308. \fB\-\-http\-proxy\fR=PROXY
  309. .RS 4
  310. Use this proxy server for HTTP\&. See also
  311. \fB\-\-all\-proxy\fR
  312. option\&. This affects all URLs\&. The format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]
  313. .RE
  314. .PP
  315. \fB\-\-https\-proxy\fR=PROXY
  316. .RS 4
  317. Use this proxy server for HTTPS\&. See also
  318. \fB\-\-all\-proxy\fR
  319. option\&. This affects all URLs\&. The format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]
  320. .RE
  321. .PP
  322. \fB\-\-private\-key\fR=FILE
  323. .RS 4
  324. 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
  325. \fB\-\-certificate\fR
  326. option\&.
  327. .RE
  328. .PP
  329. \fB\-\-referer\fR=REFERER
  330. .RS 4
  331. Set Referer\&. This affects all URLs\&.
  332. .RE
  333. .PP
  334. \fB\-\-enable\-http\-keep\-alive\fR[=\fItrue\fR|\fIfalse\fR]
  335. .RS 4
  336. Enable HTTP/1\&.1 persistent connection\&. Default:
  337. \fItrue\fR
  338. .RE
  339. .PP
  340. \fB\-\-enable\-http\-pipelining\fR[=\fItrue\fR|\fIfalse\fR]
  341. .RS 4
  342. Enable HTTP/1\&.1 pipelining\&. Default:
  343. \fIfalse\fR
  344. .RE
  345. .PP
  346. \fB\-\-header\fR=HEADER
  347. .RS 4
  348. Append HEADER to HTTP request header\&. You can use this option repeatedly to specify more than one header: aria2c
  349. \fB\-\-header\fR="X\-A: b78"
  350. \fB\-\-header\fR="X\-B: 9J1" "http://host/file"
  351. .RE
  352. .PP
  353. \fB\-\-load\-cookies\fR=FILE
  354. .RS 4
  355. Load Cookies from FILE using the Firefox3 format (SQLite3) and the Mozilla/Firefox(1\&.x/2\&.x)/Netscape format\&.
  356. .RE
  357. .if n \{\
  358. .sp
  359. .\}
  360. .RS 4
  361. .it 1 an-trap
  362. .nr an-no-space-flag 1
  363. .nr an-break-flag 1
  364. .br
  365. .ps +1
  366. \fBNote\fR
  367. .ps -1
  368. .br
  369. .sp
  370. If aria2 is built without libsqlite3, then it doesn\(cqt support Firefox3 cookie format\&.
  371. .sp .5v
  372. .RE
  373. .PP
  374. \fB\-\-save\-cookies\fR=FILE
  375. .RS 4
  376. 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:
  377. \fI/path/to/file\fR
  378. .RE
  379. .PP
  380. \fB\-\-use\-head\fR[=\fItrue\fR|\fIfalse\fR]
  381. .RS 4
  382. Use HEAD method for the first request to the HTTP server\&. Default:
  383. \fIfalse\fR
  384. .RE
  385. .PP
  386. \fB\-U\fR, \fB\-\-user\-agent\fR=USER_AGENT
  387. .RS 4
  388. Set user agent for HTTP(S) downloads\&. Default:
  389. \fIaria2/$VERSION\fR, $VERSION is replaced by package version\&.
  390. .RE
  391. .SS "FTP Specific Options"
  392. .PP
  393. \fB\-\-ftp\-user\fR=USER
  394. .RS 4
  395. Set FTP user\&. This affects all URLs\&. Default:
  396. \fIanonymous\fR
  397. .RE
  398. .PP
  399. \fB\-\-ftp\-passwd\fR=PASSWD
  400. .RS 4
  401. Set FTP password\&. This affects all URLs\&. 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:
  402. \fIARIA2USER@\fR
  403. .RE
  404. .PP
  405. \fB\-p\fR, \fB\-\-ftp\-pasv\fR[=\fItrue\fR|\fIfalse\fR]
  406. .RS 4
  407. Use the passive mode in FTP\&. If
  408. \fIfalse\fR
  409. is given, the active mode will be used\&. Default:
  410. \fItrue\fR
  411. .RE
  412. .PP
  413. \fB\-\-ftp\-proxy\fR=PROXY
  414. .RS 4
  415. Use this proxy server for FTP\&. See also
  416. \fB\-\-all\-proxy\fR
  417. option\&. This affects all URLs\&. The format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]
  418. .RE
  419. .PP
  420. \fB\-\-ftp\-type\fR=TYPE
  421. .RS 4
  422. Set FTP transfer type\&. TYPE is either
  423. \fIbinary\fR
  424. or
  425. \fIascii\fR\&. Default:
  426. \fIbinary\fR
  427. .RE
  428. .PP
  429. \fB\-\-ftp\-reuse\-connection\fR[=\fItrue\fR|\fIfalse\fR]
  430. .RS 4
  431. Reuse connection in FTP\&. Default:
  432. \fItrue\fR
  433. .RE
  434. .SS "BitTorrent/Metalink Options"
  435. .PP
  436. \fB\-\-select\-file\fR=INDEX\&...
  437. .RS 4
  438. Set file to download by specifying its index\&. You can find the file index using the
  439. \fB\-\-show\-files\fR
  440. option\&. Multiple indexes can be specified by using ",", for example:
  441. \fI3,6\fR\&. You can also use "\-" to specify a range:
  442. \fI1\-5\fR\&. "," and "\-" can be used together:
  443. \fI1\-5,8,9\fR\&. When used with the \-M option, index may vary depending on the query (see
  444. \fB\-\-metalink\-\fR* options)\&.
  445. .RE
  446. .if n \{\
  447. .sp
  448. .\}
  449. .RS 4
  450. .it 1 an-trap
  451. .nr an-no-space-flag 1
  452. .nr an-break-flag 1
  453. .br
  454. .ps +1
  455. \fBNote\fR
  456. .ps -1
  457. .br
  458. .sp
  459. 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\&.
  460. .sp .5v
  461. .RE
  462. .PP
  463. \fB\-S\fR, \fB\-\-show\-files\fR
  464. .RS 4
  465. Print file listing of \&.torrent or \&.metalink file and exit\&. In case of \&.torrent file, additional information (infohash, piece length, etc) is also printed\&.
  466. .RE
  467. .SS "BitTorrent Specific Options"
  468. .PP
  469. \fB\-\-bt\-external\-ip\fR=IPADDRESS
  470. .RS 4
  471. 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\&.
  472. .RE
  473. .PP
  474. \fB\-\-bt\-hash\-check\-seed\fR[=\fItrue\fR|\fIfalse\fR]
  475. .RS 4
  476. If
  477. \fItrue\fR
  478. is given, after hash check using
  479. \fB\-\-check\-integrity\fR
  480. 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
  481. \fIfalse\fR\&. This option has effect only on BitTorrent download\&. Default:
  482. \fItrue\fR
  483. .RE
  484. .PP
  485. \fB\-\-bt\-max\-open\-files\fR=NUM
  486. .RS 4
  487. Specify maximum number of files to open in each BitTorrent download\&. Default:
  488. \fI100\fR
  489. .RE
  490. .PP
  491. \fB\-\-bt\-max\-peers\fR=NUM
  492. .RS 4
  493. Specify the maximum number of peers per torrent\&.
  494. \fI0\fR
  495. means unlimited\&. See also
  496. \fB\-\-bt\-request\-peer\-speed\-limit\fR
  497. option\&. Default:
  498. \fI55\fR
  499. .RE
  500. .PP
  501. \fB\-\-bt\-min\-crypto\-level\fR=\fIplain\fR|\fIarc4\fR
  502. .RS 4
  503. 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:
  504. \fIplain\fR
  505. .RE
  506. .PP
  507. \fB\-\-bt\-prioritize\-piece\fR=\fIhead\fR[=SIZE],\fItail\fR[=SIZE]
  508. .RS 4
  509. Try to download first and last pieces of each file first\&. This is useful for previewing files\&. The argument can contain 2 keywords:
  510. \fIhead\fR
  511. and
  512. \fItail\fR\&. To include both keywords, they must be separated by comma\&. These keywords can take one parameter, SIZE\&. For example, if
  513. \fIhead\fR=SIZE is specified, pieces in the range of first SIZE bytes of each file get higher priority\&.
  514. \fItail\fR=SIZE means the range of last SIZE bytes of each file\&. SIZE can include
  515. \fIK\fR
  516. or
  517. \fIM\fR(1K = 1024, 1M = 1024K)\&. If SIZE is omitted, SIZE=1M is used\&.
  518. .RE
  519. .PP
  520. \fB\-\-bt\-require\-crypto\fR=\fItrue\fR|\fIfalse\fR
  521. .RS 4
  522. If true is given, aria2 doesn\(cqt accept and establish connection with legacy BitTorrent handshake(\e19BitTorrent protocol)\&. Thus aria2 always uses Obfuscation handshake\&. Default:
  523. \fIfalse\fR
  524. .RE
  525. .PP
  526. \fB\-\-bt\-request\-peer\-speed\-limit\fR=SPEED
  527. .RS 4
  528. 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
  529. \fIK\fR
  530. or
  531. \fIM\fR(1K = 1024, 1M = 1024K)\&. Default:
  532. \fI50K\fR
  533. .RE
  534. .PP
  535. \fB\-\-bt\-seed\-unverified\fR[=\fItrue\fR|\fIfalse\fR]
  536. .RS 4
  537. Seed previously downloaded files without verifying piece hashes\&. Default:
  538. \fIfalse\fR
  539. .RE
  540. .PP
  541. \fB\-\-bt\-stop\-timeout\fR=SEC
  542. .RS 4
  543. Stop BitTorrent download if download speed is 0 in consecutive SEC seconds\&. If
  544. \fI0\fR
  545. is given, this feature is disabled\&. Default:
  546. \fI0\fR
  547. .RE
  548. .PP
  549. \fB\-\-bt\-tracker\-interval\fR=SEC
  550. .RS 4
  551. 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
  552. \fI0\fR
  553. is set, aria2 determines interval based on the response of tracker and the download progress\&. Default:
  554. \fI0\fR
  555. .RE
  556. .PP
  557. \fB\-\-dht\-entry\-point\fR=HOST:PORT
  558. .RS 4
  559. Set host and port as an entry point to DHT network\&.
  560. .RE
  561. .PP
  562. \fB\-\-dht\-file\-path\fR=PATH
  563. .RS 4
  564. Change the DHT routing table file to PATH\&. Default:
  565. \fI$HOME/\&.aria2/dht\&.dat\fR
  566. .RE
  567. .PP
  568. \fB\-\-dht\-listen\-port\fR=PORT\&...
  569. .RS 4
  570. Set UDP listening port for DHT\&. Multiple ports can be specified by using ",", for example:
  571. \fI6881,6885\fR\&. You can also use "\-" to specify a range:
  572. \fI6881\-6999\fR\&. "," and "\-" can be used together\&. Default:
  573. \fI6881\-6999\fR
  574. .RE
  575. .if n \{\
  576. .sp
  577. .\}
  578. .RS 4
  579. .it 1 an-trap
  580. .nr an-no-space-flag 1
  581. .nr an-break-flag 1
  582. .br
  583. .ps +1
  584. \fBNote\fR
  585. .ps -1
  586. .br
  587. .sp
  588. Make sure that the specified ports are open for incoming UDP traffic\&.
  589. .sp .5v
  590. .RE
  591. .PP
  592. \fB\-\-enable\-dht\fR[=\fItrue\fR|\fIfalse\fR]
  593. .RS 4
  594. Enable DHT functionality\&. If a private flag is set in a torrent, aria2 doesn\(cqt use DHT for that download even if
  595. \fItrue\fR
  596. is given\&. Default:
  597. \fIfalse\fR
  598. .RE
  599. .PP
  600. \fB\-\-enable\-peer\-exchange\fR[=\fItrue\fR|\fIfalse\fR]
  601. .RS 4
  602. Enable Peer Exchange extension\&. If a private flag is set in a torrent, this feature is disabled for that download even if
  603. \fItrue\fR
  604. is given\&. Default:
  605. \fItrue\fR
  606. .RE
  607. .PP
  608. \fB\-\-follow\-torrent\fR=\fItrue\fR|\fIfalse\fR|\fImem\fR
  609. .RS 4
  610. If
  611. \fItrue\fR
  612. or
  613. \fImem\fR
  614. 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
  615. \fImem\fR
  616. is specified, a torrent file is not written to the disk, but is just kept in memory\&. If
  617. \fIfalse\fR
  618. is specified, the action mentioned above is not taken\&. Default:
  619. \fItrue\fR
  620. .RE
  621. .PP
  622. \fB\-O\fR, \fB\-\-index\-out\fR=INDEX=PATH
  623. .RS 4
  624. Set file path for file with index=INDEX\&. You can find the file index using the
  625. \fB\-\-show\-files\fR
  626. option\&. PATH is a relative path to the path specified in
  627. \fB\-\-dir\fR
  628. option\&. You can use this option multiple times\&. Using this option, you can specify the output filenames of BitTorrent downloads\&.
  629. .RE
  630. .PP
  631. \fB\-\-listen\-port\fR=PORT\&...
  632. .RS 4
  633. Set TCP port number for BitTorrent downloads\&. Multiple ports can be specified by using ",", for example:
  634. \fI6881,6885\fR\&. You can also use "\-" to specify a range:
  635. \fI6881\-6999\fR\&. "," and "\-" can be used together:
  636. \fI6881\-6889,6999\fR\&. Default:
  637. \fI6881\-6999\fR
  638. .RE
  639. .if n \{\
  640. .sp
  641. .\}
  642. .RS 4
  643. .it 1 an-trap
  644. .nr an-no-space-flag 1
  645. .nr an-break-flag 1
  646. .br
  647. .ps +1
  648. \fBNote\fR
  649. .ps -1
  650. .br
  651. .sp
  652. Make sure that the specified ports are open for incoming TCP traffic\&.
  653. .sp .5v
  654. .RE
  655. .PP
  656. \fB\-\-max\-overall\-upload\-limit\fR=SPEED
  657. .RS 4
  658. Set max overall upload speed in bytes/sec\&.
  659. \fI0\fR
  660. means unrestricted\&. You can append
  661. \fIK\fR
  662. or
  663. \fIM\fR(1K = 1024, 1M = 1024K)\&. To limit the upload speed per torrent, use
  664. \fB\-\-max\-upload\-limit\fR
  665. option\&. Default:
  666. \fI0\fR
  667. .RE
  668. .PP
  669. \fB\-u\fR, \fB\-\-max\-upload\-limit\fR=SPEED
  670. .RS 4
  671. Set max upload speed per each torrent in bytes/sec\&.
  672. \fI0\fR
  673. means unrestricted\&. You can append
  674. \fIK\fR
  675. or
  676. \fIM\fR(1K = 1024, 1M = 1024K)\&. To limit the overall upload speed, use
  677. \fB\-\-max\-overall\-upload\-limit\fR
  678. option\&. Default:
  679. \fI0\fR
  680. .RE
  681. .PP
  682. \fB\-\-peer\-id\-prefix\fR=PEER_ID_PREFIX
  683. .RS 4
  684. 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:
  685. \fIaria2/$VERSION\-\fR, $VERSION is replaced by package version\&.
  686. .RE
  687. .PP
  688. \fB\-\-seed\-ratio\fR=RATIO
  689. .RS 4
  690. Specify share ratio\&. Seed completed torrents until share ratio reaches RATIO\&. You are strongly encouraged to specify equals or more than
  691. \fI1\&.0\fR
  692. here\&. Specify
  693. \fI0\&.0\fR
  694. if you intend to do seeding regardless of share ratio\&. If
  695. \fB\-\-seed\-time\fR
  696. option is specified along with this option, seeding ends when at least one of the conditions is satisfied\&. Default:
  697. \fI1\&.0\fR
  698. .RE
  699. .PP
  700. \fB\-\-seed\-time\fR=MINUTES
  701. .RS 4
  702. Specify seeding time in minutes\&. Also see the
  703. \fB\-\-seed\-ratio\fR
  704. option\&.
  705. .RE
  706. .PP
  707. \fB\-T\fR, \fB\-\-torrent\-file\fR=TORRENT_FILE
  708. .RS 4
  709. The path to the \&.torrent file\&. You are not required to use this option because you can specify \&.torrent files without
  710. \fB\-T\fR\&.
  711. .RE
  712. .SS "Metalink Specific Options"
  713. .PP
  714. \fB\-\-follow\-metalink\fR=\fItrue\fR|\fIfalse\fR|\fImem\fR
  715. .RS 4
  716. If
  717. \fItrue\fR
  718. or
  719. \fImem\fR
  720. 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
  721. \fImem\fR
  722. is specified, a metalink file is not written to the disk, but is just kept in memory\&. If
  723. \fIfalse\fR
  724. is specified, the action mentioned above is not taken\&. Default:
  725. \fItrue\fR
  726. .RE
  727. .PP
  728. \fB\-M\fR, \fB\-\-metalink\-file\fR=METALINK_FILE
  729. .RS 4
  730. The file path to \&.metalink file\&. Reads input from stdin when
  731. \fI\-\fR
  732. is specified\&. You are not required to use this option because you can specify \&.metalink files without
  733. \fB\-M\fR\&.
  734. .RE
  735. .PP
  736. \fB\-C\fR, \fB\-\-metalink\-servers\fR=NUM_SERVERS
  737. .RS 4
  738. 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
  739. \fB\-s\fR
  740. and
  741. \fB\-j\fR
  742. options\&. Default:
  743. \fI5\fR
  744. .RE
  745. .PP
  746. \fB\-\-metalink\-language\fR=LANGUAGE
  747. .RS 4
  748. The language of the file to download\&.
  749. .RE
  750. .PP
  751. \fB\-\-metalink\-location\fR=LOCATION[,\&...]
  752. .RS 4
  753. The location of the preferred server\&. A comma\-delimited list of locations is acceptable, for example,
  754. \fIJP,US\fR\&.
  755. .RE
  756. .PP
  757. \fB\-\-metalink\-os\fR=OS
  758. .RS 4
  759. The operating system of the file to download\&.
  760. .RE
  761. .PP
  762. \fB\-\-metalink\-version\fR=VERSION
  763. .RS 4
  764. The version of the file to download\&.
  765. .RE
  766. .PP
  767. \fB\-\-metalink\-preferred\-protocol\fR=PROTO
  768. .RS 4
  769. Specify preferred protocol\&. The possible values are
  770. \fIhttp\fR,
  771. \fIhttps\fR,
  772. \fIftp\fR
  773. and
  774. \fInone\fR\&. Specify
  775. \fInone\fR
  776. to disable this feature\&. Default:
  777. \fInone\fR
  778. .RE
  779. .PP
  780. \fB\-\-metalink\-enable\-unique\-protocol\fR=\fItrue\fR|\fIfalse\fR
  781. .RS 4
  782. If
  783. \fItrue\fR
  784. is given and several protocols are available for a mirror in a metalink file, aria2 uses one of them\&. Use
  785. \fB\-\-metalink\-preferred\-protocol\fR
  786. option to specify the preference of protocol\&. Default:
  787. \fItrue\fR
  788. .RE
  789. .SS "XML\-RPC Options"
  790. .PP
  791. \fB\-\-enable\-xml\-rpc\fR[=\fItrue\fR|\fIfalse\fR]
  792. .RS 4
  793. Enable XML\-RPC server\&. It is strongly recommended to set username and password using
  794. \fB\-\-xml\-rpc\-user\fR
  795. and
  796. \fB\-\-xml\-rpc\-passwd\fR
  797. option\&. See also
  798. \fB\-\-xml\-rpc\-listen\-port\fR
  799. option\&. Default:
  800. \fIfalse\fR
  801. .RE
  802. .PP
  803. \fB\-\-xml\-rpc\-listen\-all\fR[=\fItrue\fR|\fIfalse\fR]
  804. .RS 4
  805. Listen incoming XML\-RPC requests on all network interfaces\&. If false is given, listen only on local loopback interface\&. Default:
  806. \fIfalse\fR
  807. .RE
  808. .PP
  809. \fB\-\-xml\-rpc\-listen\-port\fR=PORT
  810. .RS 4
  811. Specify a port number for XML\-RPC server to listen to\&. Possible Values:
  812. \fI1024\fR\-\fI65535\fR
  813. Default:
  814. \fI6800\fR
  815. .RE
  816. .PP
  817. \fB\-\-xml\-rpc\-max\-request\-size\fR=SIZE
  818. .RS 4
  819. Set max size of XML\-RPC request\&. If aria2 detects the request is more than SIZE bytes, it drops connection\&. Default:
  820. \fI2M\fR
  821. .RE
  822. .PP
  823. \fB\-\-xml\-rpc\-passwd\fR=PASSWD
  824. .RS 4
  825. Set XML\-RPC password\&.
  826. .RE
  827. .PP
  828. \fB\-\-xml\-rpc\-user\fR=USER
  829. .RS 4
  830. Set XML\-RPC user\&.
  831. .RE
  832. .SS "Advanced Options"
  833. .PP
  834. \fB\-\-allow\-overwrite\fR=\fItrue\fR|\fIfalse\fR
  835. .RS 4
  836. If
  837. \fIfalse\fR
  838. is given, and a file already exists but the corresponding control file (filename\&.aria2) doesn\(cqt exist, then aria2 will not re\-download the file\&. See also
  839. \fB\-\-auto\-file\-renaming\fR
  840. option\&. Default:
  841. \fIfalse\fR
  842. .RE
  843. .PP
  844. \fB\-\-allow\-piece\-length\-change\fR=\fItrue\fR|\fIfalse\fR
  845. .RS 4
  846. 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:
  847. \fIfalse\fR
  848. .RE
  849. .PP
  850. \fB\-\-async\-dns\fR[=\fItrue\fR|\fIfalse\fR]
  851. .RS 4
  852. Enable asynchronous DNS\&. Default:
  853. \fItrue\fR
  854. .RE
  855. .PP
  856. \fB\-\-auto\-file\-renaming\fR[=\fItrue\fR|\fIfalse\fR]
  857. .RS 4
  858. 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:
  859. \fItrue\fR
  860. .RE
  861. .PP
  862. \fB\-\-auto\-save\-interval\fR=SEC
  863. .RS 4
  864. Save a control file(*\&.aria2) every SEC seconds\&. If
  865. \fI0\fR
  866. 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
  867. \fI0\fR
  868. to
  869. \fI600\fR\&. Default:
  870. \fI60\fR
  871. .RE
  872. .PP
  873. \fB\-\-conf\-path\fR=PATH
  874. .RS 4
  875. Change the configuration file path to PATH\&. Default:
  876. \fI$HOME/\&.aria2/aria2\&.conf\fR
  877. .RE
  878. .PP
  879. \fB\-D\fR, \fB\-\-daemon\fR
  880. .RS 4
  881. Run as daemon\&. The current working directory will be changed to
  882. \fI/\fR
  883. and standard input, standard output and standard error will be redirected to
  884. \fI/dev/null\fR\&. Default:
  885. \fIfalse\fR
  886. .RE
  887. .PP
  888. \fB\-\-disable\-ipv6\fR[=\fItrue\fR|\fIfalse\fR]
  889. .RS 4
  890. Disable IPv6\&. This is useful if you have to use broken DNS and want to avoid terribly slow AAAA record lookup\&. Default:
  891. \fIfalse\fR
  892. .RE
  893. .PP
  894. \fB\-\-enable\-direct\-io\fR[=\fItrue\fR|\fIfalse\fR]
  895. .RS 4
  896. Enable directI/O, which lowers cpu usage while allocating/checking files\&. Turn off if you encounter any error\&. Default:
  897. \fItrue\fR
  898. .RE
  899. .PP
  900. \fB\-\-event\-poll\fR=POLL
  901. .RS 4
  902. Specify the method for polling events\&. The possible Values are
  903. \fIepoll\fR
  904. and
  905. \fIselect\fR\&. If you use recent Linux that has epoll, then the default value is
  906. \fIepoll\fR\&. Otherwise, the default value is
  907. \fIselect\fR\&.
  908. .RE
  909. .PP
  910. \fB\-\-file\-allocation\fR=METHOD
  911. .RS 4
  912. Specify file allocation method\&.
  913. \fInone\fR
  914. doesn\(cqt pre\-allocate file space\&.
  915. \fIprealloc\fR
  916. 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,
  917. \fIfalloc\fR
  918. is your best choice\&. It allocates large(few GiB) files almost instantly\&. Don\(cqt use
  919. \fIfalloc\fR
  920. with legacy file systems such as ext3 because it takes almost same time as
  921. \fIprealloc\fR
  922. and it blocks aria2 entirely until allocation finishes\&.
  923. \fIfalloc\fR
  924. may not be available if your system doesn\(cqt have
  925. \fBposix_fallocate\fR() function\&. Possible Values:
  926. \fInone\fR,
  927. \fIprealloc\fR,
  928. \fIfalloc\fR
  929. Default:
  930. \fIprealloc\fR
  931. .RE
  932. .PP
  933. \fB\-\-interface\fR=INTERFACE
  934. .RS 4
  935. Bind sockets to given interface\&. You can specify interface name, IP address and hostname\&. Possible Values: interface, IP address, hostname
  936. .RE
  937. .if n \{\
  938. .sp
  939. .\}
  940. .RS 4
  941. .it 1 an-trap
  942. .nr an-no-space-flag 1
  943. .nr an-break-flag 1
  944. .br
  945. .ps +1
  946. \fBNote\fR
  947. .ps -1
  948. .br
  949. .sp
  950. 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\&.
  951. .sp .5v
  952. .RE
  953. .PP
  954. \fB\-\-log\-level\fR=LEVEL
  955. .RS 4
  956. Set log level to output\&. LEVEL is either
  957. \fIdebug\fR,
  958. \fIinfo\fR,
  959. \fInotice\fR,
  960. \fIwarn\fR
  961. or
  962. \fIerror\fR\&. Default:
  963. \fIdebug\fR
  964. .RE
  965. .PP
  966. \fB\-\-on\-download\-complete\fR=COMMAND
  967. .RS 4
  968. Set the command to be executed when download completes\&. See
  969. \fB\-\-on\-download\-start\fR
  970. option for the requirement of COMMAND\&. See also
  971. \fB\-\-on\-download\-stop\fR
  972. option\&. Possible Values:
  973. \fI/path/to/command\fR
  974. .RE
  975. .PP
  976. \fB\-\-on\-download\-error\fR=COMMAND
  977. .RS 4
  978. Set the command to be executed when download aborts due to error\&. See
  979. \fB\-\-on\-download\-start\fR
  980. option for the requirement of COMMAND\&. See also
  981. \fB\-\-on\-download\-stop\fR
  982. option\&. Possible Values:
  983. \fI/path/to/command\fR
  984. .RE
  985. .PP
  986. \fB\-\-on\-download\-start\fR=COMMAND
  987. .RS 4
  988. 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:
  989. \fI/path/to/command\fR
  990. .RE
  991. .PP
  992. \fB\-\-on\-download\-stop\fR=COMMAND
  993. .RS 4
  994. Set the command to be executed when download stops\&. You can override the command to be executed for particular download result using
  995. \fB\-\-on\-download\-complete\fR
  996. and
  997. \fB\-\-on\-download\-error\fR\&. If they are specified, command specified in this option is not executed\&. See
  998. \fB\-\-on\-download\-start\fR
  999. option for the requirement of COMMAND\&. Possible Values:
  1000. \fI/path/to/command\fR
  1001. .RE
  1002. .PP
  1003. \fB\-\-summary\-interval\fR=SEC
  1004. .RS 4
  1005. Set interval in seconds to output download progress summary\&. Setting
  1006. \fI0\fR
  1007. suppresses the output\&. Default:
  1008. \fI60\fR
  1009. .RE
  1010. .if n \{\
  1011. .sp
  1012. .\}
  1013. .RS 4
  1014. .it 1 an-trap
  1015. .nr an-no-space-flag 1
  1016. .nr an-break-flag 1
  1017. .br
  1018. .ps +1
  1019. \fBNote\fR
  1020. .ps -1
  1021. .br
  1022. .sp
  1023. In multi file torrent downloads, the files adjacent forward to the specified files are also allocated if they share the same piece\&.
  1024. .sp .5v
  1025. .RE
  1026. .PP
  1027. \fB\-Z\fR, \fB\-\-force\-sequential\fR[=\fItrue\fR|\fIfalse\fR]
  1028. .RS 4
  1029. Fetch URIs in the command\-line sequentially and download each URI in a separate session, like the usual command\-line download utilities\&. Default:
  1030. \fIfalse\fR
  1031. .RE
  1032. .PP
  1033. \fB\-\-max\-overall\-download\-limit\fR=SPEED
  1034. .RS 4
  1035. Set max overall download speed in bytes/sec\&.
  1036. \fI0\fR
  1037. means unrestricted\&. You can append
  1038. \fIK\fR
  1039. or
  1040. \fIM\fR(1K = 1024, 1M = 1024K)\&. To limit the download speed per download, use
  1041. \fB\-\-max\-download\-limit\fR
  1042. option\&. Default:
  1043. \fI0\fR
  1044. .RE
  1045. .PP
  1046. \fB\-\-max\-download\-limit\fR=SPEED
  1047. .RS 4
  1048. Set max download speed per each download in bytes/sec\&.
  1049. \fI0\fR
  1050. means unrestricted\&. You can append
  1051. \fIK\fR
  1052. or
  1053. \fIM\fR(1K = 1024, 1M = 1024K)\&. To limit the overall download speed, use
  1054. \fB\-\-max\-overall\-download\-limit\fR
  1055. option\&. Default:
  1056. \fI0\fR
  1057. .RE
  1058. .PP
  1059. \fB\-\-no\-conf\fR
  1060. .RS 4
  1061. Disable loading aria2\&.conf file\&.
  1062. .RE
  1063. .PP
  1064. \fB\-\-no\-file\-allocation\-limit\fR=SIZE
  1065. .RS 4
  1066. No file allocation is made for files whose size is smaller than SIZE\&. You can append
  1067. \fIK\fR
  1068. or
  1069. \fIM\fR(1K = 1024, 1M = 1024K)\&. Default:
  1070. \fI5M\fR
  1071. .RE
  1072. .PP
  1073. \fB\-P\fR, \fB\-\-parameterized\-uri\fR[=\fItrue\fR|\fIfalse\fR]
  1074. .RS 4
  1075. Enable parameterized URI support\&. You can specify set of parts:
  1076. \fIhttp://{sv1,sv2,sv3}/foo\&.iso\fR\&. Also you can specify numeric sequences with step counter:
  1077. \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:
  1078. \fIfalse\fR
  1079. .RE
  1080. .PP
  1081. \fB\-q\fR, \fB\-\-quiet\fR[=\fItrue\fR|\fIfalse\fR]
  1082. .RS 4
  1083. Make aria2 quiet (no console output)\&. Default:
  1084. \fIfalse\fR
  1085. .RE
  1086. .PP
  1087. \fB\-\-realtime\-chunk\-checksum\fR=\fItrue\fR|\fIfalse\fR
  1088. .RS 4
  1089. Validate chunk of data by calculating checksum while downloading a file if chunk checksums are provided\&. Default:
  1090. \fItrue\fR
  1091. .RE
  1092. .PP
  1093. \fB\-\-stop\fR=SEC
  1094. .RS 4
  1095. Stop application after SEC seconds has passed\&. If
  1096. \fI0\fR
  1097. is given, this feature is disabled\&. Default:
  1098. \fI0\fR
  1099. .RE
  1100. .PP
  1101. \fB\-v\fR, \fB\-\-version\fR
  1102. .RS 4
  1103. Print the version number, copyright and the configuration information and exit\&.
  1104. .RE
  1105. .SS "Options That Take An Optional Argument"
  1106. .sp
  1107. 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\&.
  1108. .SS "URI, MAGNET, TORRENT_FILE, METALINK_FILE"
  1109. .sp
  1110. You can specify multiple URLs in command\-line\&. Unless you specify \fB\-Z\fR option, all URLs must point to the same file or downloading will fail\&.
  1111. .sp
  1112. 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" paramters are supported\&. Because BitTorrent Magnet URI is likely to contain "&" character, it is highly recommended to always quote URI with single(\') 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\&.
  1113. .sp
  1114. You can also specify arbitrary number of torrent files and metalink files stored on a local drive\&. Please note that they are always treated as a separate download\&.
  1115. .sp
  1116. You can specify both torrent file with \-T option and URLs\&. 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, URL can be a complete URL pointing to the resource or if URL ends with /, name in torrent file in torrent is added\&. For multi\-file torrents, name and path are added to form a URL for each file\&.
  1117. .if n \{\
  1118. .sp
  1119. .\}
  1120. .RS 4
  1121. .it 1 an-trap
  1122. .nr an-no-space-flag 1
  1123. .nr an-break-flag 1
  1124. .br
  1125. .ps +1
  1126. \fBNote\fR
  1127. .ps -1
  1128. .br
  1129. .sp
  1130. Make sure that URL is quoted with single(\') or double(") quotation if it contains "&" or any characters that have special meaning in shell\&.
  1131. .sp .5v
  1132. .RE
  1133. .SS "Resuming Download"
  1134. .sp
  1135. Usually, you can resume transfer by just issuing same command(aria2c URL) if the previous transfer is made by aria2\&.
  1136. .sp
  1137. 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 URL)\&.
  1138. .SH "EXIT STATUS"
  1139. .sp
  1140. 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\&.
  1141. .PP
  1142. \fB0\fR
  1143. .RS 4
  1144. If all downloads are successful\&.
  1145. .RE
  1146. .PP
  1147. \fB1\fR
  1148. .RS 4
  1149. If an unknown error occurs\&.
  1150. .RE
  1151. .PP
  1152. \fB2\fR
  1153. .RS 4
  1154. If time out occurs\&.
  1155. .RE
  1156. .PP
  1157. \fB3\fR
  1158. .RS 4
  1159. If a resource is not found\&.
  1160. .RE
  1161. .PP
  1162. \fB4\fR
  1163. .RS 4
  1164. If aria2 sees the specfied number of "resource not found" error\&. See
  1165. \fB\-\-max\-file\-not\-found\fR
  1166. option)\&.
  1167. .RE
  1168. .PP
  1169. \fB5\fR
  1170. .RS 4
  1171. If a download aborts because download speed is too slow\&. See
  1172. \fB\-\-lowest\-speed\-limit\fR
  1173. option)
  1174. .RE
  1175. .PP
  1176. \fB6\fR
  1177. .RS 4
  1178. If network problem occurs\&.
  1179. .RE
  1180. .PP
  1181. \fB7\fR
  1182. .RS 4
  1183. 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\&.
  1184. .RE
  1185. .if n \{\
  1186. .sp
  1187. .\}
  1188. .RS 4
  1189. .it 1 an-trap
  1190. .nr an-no-space-flag 1
  1191. .nr an-break-flag 1
  1192. .br
  1193. .ps +1
  1194. \fBNote\fR
  1195. .ps -1
  1196. .br
  1197. .sp
  1198. An error occurred in a finished download will not be reported as exit status\&.
  1199. .sp .5v
  1200. .RE
  1201. .SH "ENVIRONMENT"
  1202. .sp
  1203. aria2 recognizes the following environment variables\&.
  1204. .PP
  1205. http_proxy [http://][USER:PASSWORD@]HOST[:PORT]
  1206. .RS 4
  1207. Specify proxy server for use in HTTP\&. Overrides http\-proxy value in configuration file\&. The command\-line option
  1208. \fB\-\-http\-proxy\fR
  1209. overrides this value\&.
  1210. .RE
  1211. .PP
  1212. https_proxy [http://][USER:PASSWORD@]HOST[:PORT]
  1213. .RS 4
  1214. Specify proxy server for use in HTTPS\&. Overrides https\-proxy value in configuration file\&. The command\-line option
  1215. \fB\-\-https\-proxy\fR
  1216. overrides this value\&.
  1217. .RE
  1218. .PP
  1219. ftp_proxy [http://][USER:PASSWORD@]HOST[:PORT]
  1220. .RS 4
  1221. Specify proxy server for use in FTP\&. Overrides ftp\-proxy value in configuration file\&. The command\-line option
  1222. \fB\-\-ftp\-proxy\fR
  1223. overrides this value\&.
  1224. .RE
  1225. .PP
  1226. all_proxy [http://][USER:PASSWORD@]HOST[:PORT]
  1227. .RS 4
  1228. Specify proxy server for use if no protocol\-specific proxy is specified\&. Overrides all\-proxy value in configuration file\&. The command\-line option
  1229. \fB\-\-all\-proxy\fR
  1230. overrides this value\&.
  1231. .RE
  1232. .PP
  1233. no_proxy [DOMAIN,\&...]
  1234. .RS 4
  1235. Specify comma\-separated hostname or domains to which proxy should not be used\&. Overrides no\-proxy value in configuration file\&. The command\-line option
  1236. \fB\-\-no\-proxy\fR
  1237. overrides this value\&.
  1238. .RE
  1239. .SH "FILES"
  1240. .SS "aria2\&.conf"
  1241. .sp
  1242. 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\&.
  1243. .sp
  1244. 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\&.
  1245. .sp
  1246. .if n \{\
  1247. .RS 4
  1248. .\}
  1249. .nf
  1250. # sample configuration file for aria2c
  1251. listen\-port=60000
  1252. dht\-listen\-port=60000
  1253. seed\-ratio=1\&.0
  1254. max\-upload\-limit=50K
  1255. ftp\-pasv=true
  1256. .fi
  1257. .if n \{\
  1258. .RE
  1259. .\}
  1260. .SS "dht\&.dat"
  1261. .sp
  1262. By default, the routing table of DHT is saved to the path $HOME/\&.aria2/dht\&.dat\&.
  1263. .SS "Control File"
  1264. .sp
  1265. 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\&.)
  1266. .sp
  1267. 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\&.
  1268. .sp
  1269. 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\&.
  1270. .SS "Input File"
  1271. .sp
  1272. 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\&.
  1273. .sp
  1274. 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\&.
  1275. .sp
  1276. Additionally, the following options can be specified after each line of URIs\&. These optional lines must start with white space(s)\&.
  1277. .sp
  1278. .RS 4
  1279. .ie n \{\
  1280. \h'-04'\(bu\h'+03'\c
  1281. .\}
  1282. .el \{\
  1283. .sp -1
  1284. .IP \(bu 2.3
  1285. .\}
  1286. dir
  1287. .RE
  1288. .sp
  1289. .RS 4
  1290. .ie n \{\
  1291. \h'-04'\(bu\h'+03'\c
  1292. .\}
  1293. .el \{\
  1294. .sp -1
  1295. .IP \(bu 2.3
  1296. .\}
  1297. check\-integrity
  1298. .RE
  1299. .sp
  1300. .RS 4
  1301. .ie n \{\
  1302. \h'-04'\(bu\h'+03'\c
  1303. .\}
  1304. .el \{\
  1305. .sp -1
  1306. .IP \(bu 2.3
  1307. .\}
  1308. continue
  1309. .RE
  1310. .sp
  1311. .RS 4
  1312. .ie n \{\
  1313. \h'-04'\(bu\h'+03'\c
  1314. .\}
  1315. .el \{\
  1316. .sp -1
  1317. .IP \(bu 2.3
  1318. .\}
  1319. all\-proxy
  1320. .RE
  1321. .sp
  1322. .RS 4
  1323. .ie n \{\
  1324. \h'-04'\(bu\h'+03'\c
  1325. .\}
  1326. .el \{\
  1327. .sp -1
  1328. .IP \(bu 2.3
  1329. .\}
  1330. connect\-timeout
  1331. .RE
  1332. .sp
  1333. .RS 4
  1334. .ie n \{\
  1335. \h'-04'\(bu\h'+03'\c
  1336. .\}
  1337. .el \{\
  1338. .sp -1
  1339. .IP \(bu 2.3
  1340. .\}
  1341. dry\-run
  1342. .RE
  1343. .sp
  1344. .RS 4
  1345. .ie n \{\
  1346. \h'-04'\(bu\h'+03'\c
  1347. .\}
  1348. .el \{\
  1349. .sp -1
  1350. .IP \(bu 2.3
  1351. .\}
  1352. lowest\-speed\-limit
  1353. .RE
  1354. .sp
  1355. .RS 4
  1356. .ie n \{\
  1357. \h'-04'\(bu\h'+03'\c
  1358. .\}
  1359. .el \{\
  1360. .sp -1
  1361. .IP \(bu 2.3
  1362. .\}
  1363. max\-file\-not\-found
  1364. .RE
  1365. .sp
  1366. .RS 4
  1367. .ie n \{\
  1368. \h'-04'\(bu\h'+03'\c
  1369. .\}
  1370. .el \{\
  1371. .sp -1
  1372. .IP \(bu 2.3
  1373. .\}
  1374. max\-tries
  1375. .RE
  1376. .sp
  1377. .RS 4
  1378. .ie n \{\
  1379. \h'-04'\(bu\h'+03'\c
  1380. .\}
  1381. .el \{\
  1382. .sp -1
  1383. .IP \(bu 2.3
  1384. .\}
  1385. no\-proxy
  1386. .RE
  1387. .sp
  1388. .RS 4
  1389. .ie n \{\
  1390. \h'-04'\(bu\h'+03'\c
  1391. .\}
  1392. .el \{\
  1393. .sp -1
  1394. .IP \(bu 2.3
  1395. .\}
  1396. out
  1397. .RE
  1398. .sp
  1399. .RS 4
  1400. .ie n \{\
  1401. \h'-04'\(bu\h'+03'\c
  1402. .\}
  1403. .el \{\
  1404. .sp -1
  1405. .IP \(bu 2.3
  1406. .\}
  1407. proxy\-method
  1408. .RE
  1409. .sp
  1410. .RS 4
  1411. .ie n \{\
  1412. \h'-04'\(bu\h'+03'\c
  1413. .\}
  1414. .el \{\
  1415. .sp -1
  1416. .IP \(bu 2.3
  1417. .\}
  1418. remote\-time
  1419. .RE
  1420. .sp
  1421. .RS 4
  1422. .ie n \{\
  1423. \h'-04'\(bu\h'+03'\c
  1424. .\}
  1425. .el \{\
  1426. .sp -1
  1427. .IP \(bu 2.3
  1428. .\}
  1429. split
  1430. .RE
  1431. .sp
  1432. .RS 4
  1433. .ie n \{\
  1434. \h'-04'\(bu\h'+03'\c
  1435. .\}
  1436. .el \{\
  1437. .sp -1
  1438. .IP \(bu 2.3
  1439. .\}
  1440. timeout
  1441. .RE
  1442. .sp
  1443. .RS 4
  1444. .ie n \{\
  1445. \h'-04'\(bu\h'+03'\c
  1446. .\}
  1447. .el \{\
  1448. .sp -1
  1449. .IP \(bu 2.3
  1450. .\}
  1451. http\-auth\-challenge
  1452. .RE
  1453. .sp
  1454. .RS 4
  1455. .ie n \{\
  1456. \h'-04'\(bu\h'+03'\c
  1457. .\}
  1458. .el \{\
  1459. .sp -1
  1460. .IP \(bu 2.3
  1461. .\}
  1462. http\-user
  1463. .RE
  1464. .sp
  1465. .RS 4
  1466. .ie n \{\
  1467. \h'-04'\(bu\h'+03'\c
  1468. .\}
  1469. .el \{\
  1470. .sp -1
  1471. .IP \(bu 2.3
  1472. .\}
  1473. http\-passwd
  1474. .RE
  1475. .sp
  1476. .RS 4
  1477. .ie n \{\
  1478. \h'-04'\(bu\h'+03'\c
  1479. .\}
  1480. .el \{\
  1481. .sp -1
  1482. .IP \(bu 2.3
  1483. .\}
  1484. http\-proxy
  1485. .RE
  1486. .sp
  1487. .RS 4
  1488. .ie n \{\
  1489. \h'-04'\(bu\h'+03'\c
  1490. .\}
  1491. .el \{\
  1492. .sp -1
  1493. .IP \(bu 2.3
  1494. .\}
  1495. https\-proxy
  1496. .RE
  1497. .sp
  1498. .RS 4
  1499. .ie n \{\
  1500. \h'-04'\(bu\h'+03'\c
  1501. .\}
  1502. .el \{\
  1503. .sp -1
  1504. .IP \(bu 2.3
  1505. .\}
  1506. referer
  1507. .RE
  1508. .sp
  1509. .RS 4
  1510. .ie n \{\
  1511. \h'-04'\(bu\h'+03'\c
  1512. .\}
  1513. .el \{\
  1514. .sp -1
  1515. .IP \(bu 2.3
  1516. .\}
  1517. enable\-http\-keep\-alive
  1518. .RE
  1519. .sp
  1520. .RS 4
  1521. .ie n \{\
  1522. \h'-04'\(bu\h'+03'\c
  1523. .\}
  1524. .el \{\
  1525. .sp -1
  1526. .IP \(bu 2.3
  1527. .\}
  1528. enable\-http\-pipelining
  1529. .RE
  1530. .sp
  1531. .RS 4
  1532. .ie n \{\
  1533. \h'-04'\(bu\h'+03'\c
  1534. .\}
  1535. .el \{\
  1536. .sp -1
  1537. .IP \(bu 2.3
  1538. .\}
  1539. header
  1540. .RE
  1541. .sp
  1542. .RS 4
  1543. .ie n \{\
  1544. \h'-04'\(bu\h'+03'\c
  1545. .\}
  1546. .el \{\
  1547. .sp -1
  1548. .IP \(bu 2.3
  1549. .\}
  1550. use\-head
  1551. .RE
  1552. .sp
  1553. .RS 4
  1554. .ie n \{\
  1555. \h'-04'\(bu\h'+03'\c
  1556. .\}
  1557. .el \{\
  1558. .sp -1
  1559. .IP \(bu 2.3
  1560. .\}
  1561. user\-agent
  1562. .RE
  1563. .sp
  1564. .RS 4
  1565. .ie n \{\
  1566. \h'-04'\(bu\h'+03'\c
  1567. .\}
  1568. .el \{\
  1569. .sp -1
  1570. .IP \(bu 2.3
  1571. .\}
  1572. ftp\-user
  1573. .RE
  1574. .sp
  1575. .RS 4
  1576. .ie n \{\
  1577. \h'-04'\(bu\h'+03'\c
  1578. .\}
  1579. .el \{\
  1580. .sp -1
  1581. .IP \(bu 2.3
  1582. .\}
  1583. ftp\-passwd
  1584. .RE
  1585. .sp
  1586. .RS 4
  1587. .ie n \{\
  1588. \h'-04'\(bu\h'+03'\c
  1589. .\}
  1590. .el \{\
  1591. .sp -1
  1592. .IP \(bu 2.3
  1593. .\}
  1594. ftp\-pasv
  1595. .RE
  1596. .sp
  1597. .RS 4
  1598. .ie n \{\
  1599. \h'-04'\(bu\h'+03'\c
  1600. .\}
  1601. .el \{\
  1602. .sp -1
  1603. .IP \(bu 2.3
  1604. .\}
  1605. ftp\-proxy
  1606. .RE
  1607. .sp
  1608. .RS 4
  1609. .ie n \{\
  1610. \h'-04'\(bu\h'+03'\c
  1611. .\}
  1612. .el \{\
  1613. .sp -1
  1614. .IP \(bu 2.3
  1615. .\}
  1616. ftp\-type
  1617. .RE
  1618. .sp
  1619. .RS 4
  1620. .ie n \{\
  1621. \h'-04'\(bu\h'+03'\c
  1622. .\}
  1623. .el \{\
  1624. .sp -1
  1625. .IP \(bu 2.3
  1626. .\}
  1627. ftp\-reuse\-connection
  1628. .RE
  1629. .sp
  1630. .RS 4
  1631. .ie n \{\
  1632. \h'-04'\(bu\h'+03'\c
  1633. .\}
  1634. .el \{\
  1635. .sp -1
  1636. .IP \(bu 2.3
  1637. .\}
  1638. no\-netrc
  1639. .RE
  1640. .sp
  1641. .RS 4
  1642. .ie n \{\
  1643. \h'-04'\(bu\h'+03'\c
  1644. .\}
  1645. .el \{\
  1646. .sp -1
  1647. .IP \(bu 2.3
  1648. .\}
  1649. select\-file
  1650. .RE
  1651. .sp
  1652. .RS 4
  1653. .ie n \{\
  1654. \h'-04'\(bu\h'+03'\c
  1655. .\}
  1656. .el \{\
  1657. .sp -1
  1658. .IP \(bu 2.3
  1659. .\}
  1660. bt\-external\-ip
  1661. .RE
  1662. .sp
  1663. .RS 4
  1664. .ie n \{\
  1665. \h'-04'\(bu\h'+03'\c
  1666. .\}
  1667. .el \{\
  1668. .sp -1
  1669. .IP \(bu 2.3
  1670. .\}
  1671. bt\-hash\-check\-seed
  1672. .RE
  1673. .sp
  1674. .RS 4
  1675. .ie n \{\
  1676. \h'-04'\(bu\h'+03'\c
  1677. .\}
  1678. .el \{\
  1679. .sp -1
  1680. .IP \(bu 2.3
  1681. .\}
  1682. bt\-max\-open\-files
  1683. .RE
  1684. .sp
  1685. .RS 4
  1686. .ie n \{\
  1687. \h'-04'\(bu\h'+03'\c
  1688. .\}
  1689. .el \{\
  1690. .sp -1
  1691. .IP \(bu 2.3
  1692. .\}
  1693. bt\-max\-peers
  1694. .RE
  1695. .sp
  1696. .RS 4
  1697. .ie n \{\
  1698. \h'-04'\(bu\h'+03'\c
  1699. .\}
  1700. .el \{\
  1701. .sp -1
  1702. .IP \(bu 2.3
  1703. .\}
  1704. bt\-min\-crypto\-level
  1705. .RE
  1706. .sp
  1707. .RS 4
  1708. .ie n \{\
  1709. \h'-04'\(bu\h'+03'\c
  1710. .\}
  1711. .el \{\
  1712. .sp -1
  1713. .IP \(bu 2.3
  1714. .\}
  1715. bt\-prioritize\-piece
  1716. .RE
  1717. .sp
  1718. .RS 4
  1719. .ie n \{\
  1720. \h'-04'\(bu\h'+03'\c
  1721. .\}
  1722. .el \{\
  1723. .sp -1
  1724. .IP \(bu 2.3
  1725. .\}
  1726. bt\-require\-crypto
  1727. .RE
  1728. .sp
  1729. .RS 4
  1730. .ie n \{\
  1731. \h'-04'\(bu\h'+03'\c
  1732. .\}
  1733. .el \{\
  1734. .sp -1
  1735. .IP \(bu 2.3
  1736. .\}
  1737. bt\-request\-peer\-speed\-limit
  1738. .RE
  1739. .sp
  1740. .RS 4
  1741. .ie n \{\
  1742. \h'-04'\(bu\h'+03'\c
  1743. .\}
  1744. .el \{\
  1745. .sp -1
  1746. .IP \(bu 2.3
  1747. .\}
  1748. bt\-seed\-unverified
  1749. .RE
  1750. .sp
  1751. .RS 4
  1752. .ie n \{\
  1753. \h'-04'\(bu\h'+03'\c
  1754. .\}
  1755. .el \{\
  1756. .sp -1
  1757. .IP \(bu 2.3
  1758. .\}
  1759. bt\-stop\-timeout
  1760. .RE
  1761. .sp
  1762. .RS 4
  1763. .ie n \{\
  1764. \h'-04'\(bu\h'+03'\c
  1765. .\}
  1766. .el \{\
  1767. .sp -1
  1768. .IP \(bu 2.3
  1769. .\}
  1770. bt\-tracker\-interval
  1771. .RE
  1772. .sp
  1773. .RS 4
  1774. .ie n \{\
  1775. \h'-04'\(bu\h'+03'\c
  1776. .\}
  1777. .el \{\
  1778. .sp -1
  1779. .IP \(bu 2.3
  1780. .\}
  1781. enable\-peer\-exchange
  1782. .RE
  1783. .sp
  1784. .RS 4
  1785. .ie n \{\
  1786. \h'-04'\(bu\h'+03'\c
  1787. .\}
  1788. .el \{\
  1789. .sp -1
  1790. .IP \(bu 2.3
  1791. .\}
  1792. follow\-torrent
  1793. .RE
  1794. .sp
  1795. .RS 4
  1796. .ie n \{\
  1797. \h'-04'\(bu\h'+03'\c
  1798. .\}
  1799. .el \{\
  1800. .sp -1
  1801. .IP \(bu 2.3
  1802. .\}
  1803. index\-out
  1804. .RE
  1805. .sp
  1806. .RS 4
  1807. .ie n \{\
  1808. \h'-04'\(bu\h'+03'\c
  1809. .\}
  1810. .el \{\
  1811. .sp -1
  1812. .IP \(bu 2.3
  1813. .\}
  1814. max\-upload\-limit
  1815. .RE
  1816. .sp
  1817. .RS 4
  1818. .ie n \{\
  1819. \h'-04'\(bu\h'+03'\c
  1820. .\}
  1821. .el \{\
  1822. .sp -1
  1823. .IP \(bu 2.3
  1824. .\}
  1825. seed\-ratio
  1826. .RE
  1827. .sp
  1828. .RS 4
  1829. .ie n \{\
  1830. \h'-04'\(bu\h'+03'\c
  1831. .\}
  1832. .el \{\
  1833. .sp -1
  1834. .IP \(bu 2.3
  1835. .\}
  1836. seed\-time
  1837. .RE
  1838. .sp
  1839. .RS 4
  1840. .ie n \{\
  1841. \h'-04'\(bu\h'+03'\c
  1842. .\}
  1843. .el \{\
  1844. .sp -1
  1845. .IP \(bu 2.3
  1846. .\}
  1847. follow\-metalink
  1848. .RE
  1849. .sp
  1850. .RS 4
  1851. .ie n \{\
  1852. \h'-04'\(bu\h'+03'\c
  1853. .\}
  1854. .el \{\
  1855. .sp -1
  1856. .IP \(bu 2.3
  1857. .\}
  1858. metalink\-servers
  1859. .RE
  1860. .sp
  1861. .RS 4
  1862. .ie n \{\
  1863. \h'-04'\(bu\h'+03'\c
  1864. .\}
  1865. .el \{\
  1866. .sp -1
  1867. .IP \(bu 2.3
  1868. .\}
  1869. metalink\-language
  1870. .RE
  1871. .sp
  1872. .RS 4
  1873. .ie n \{\
  1874. \h'-04'\(bu\h'+03'\c
  1875. .\}
  1876. .el \{\
  1877. .sp -1
  1878. .IP \(bu 2.3
  1879. .\}
  1880. metalink\-location
  1881. .RE
  1882. .sp
  1883. .RS 4
  1884. .ie n \{\
  1885. \h'-04'\(bu\h'+03'\c
  1886. .\}
  1887. .el \{\
  1888. .sp -1
  1889. .IP \(bu 2.3
  1890. .\}
  1891. metalink\-os
  1892. .RE
  1893. .sp
  1894. .RS 4
  1895. .ie n \{\
  1896. \h'-04'\(bu\h'+03'\c
  1897. .\}
  1898. .el \{\
  1899. .sp -1
  1900. .IP \(bu 2.3
  1901. .\}
  1902. metalink\-version
  1903. .RE
  1904. .sp
  1905. .RS 4
  1906. .ie n \{\
  1907. \h'-04'\(bu\h'+03'\c
  1908. .\}
  1909. .el \{\
  1910. .sp -1
  1911. .IP \(bu 2.3
  1912. .\}
  1913. metalink\-preferred\-protocol
  1914. .RE
  1915. .sp
  1916. .RS 4
  1917. .ie n \{\
  1918. \h'-04'\(bu\h'+03'\c
  1919. .\}
  1920. .el \{\
  1921. .sp -1
  1922. .IP \(bu 2.3
  1923. .\}
  1924. metalink\-enable\-unique\-protocol
  1925. .RE
  1926. .sp
  1927. .RS 4
  1928. .ie n \{\
  1929. \h'-04'\(bu\h'+03'\c
  1930. .\}
  1931. .el \{\
  1932. .sp -1
  1933. .IP \(bu 2.3
  1934. .\}
  1935. allow\-overwrite
  1936. .RE
  1937. .sp
  1938. .RS 4
  1939. .ie n \{\
  1940. \h'-04'\(bu\h'+03'\c
  1941. .\}
  1942. .el \{\
  1943. .sp -1
  1944. .IP \(bu 2.3
  1945. .\}
  1946. allow\-piece\-length\-change
  1947. .RE
  1948. .sp
  1949. .RS 4
  1950. .ie n \{\
  1951. \h'-04'\(bu\h'+03'\c
  1952. .\}
  1953. .el \{\
  1954. .sp -1
  1955. .IP \(bu 2.3
  1956. .\}
  1957. async\-dns
  1958. .RE
  1959. .sp
  1960. .RS 4
  1961. .ie n \{\
  1962. \h'-04'\(bu\h'+03'\c
  1963. .\}
  1964. .el \{\
  1965. .sp -1
  1966. .IP \(bu 2.3
  1967. .\}
  1968. auto\-file\-renaming
  1969. .RE
  1970. .sp
  1971. .RS 4
  1972. .ie n \{\
  1973. \h'-04'\(bu\h'+03'\c
  1974. .\}
  1975. .el \{\
  1976. .sp -1
  1977. .IP \(bu 2.3
  1978. .\}
  1979. file\-allocation
  1980. .RE
  1981. .sp
  1982. .RS 4
  1983. .ie n \{\
  1984. \h'-04'\(bu\h'+03'\c
  1985. .\}
  1986. .el \{\
  1987. .sp -1
  1988. .IP \(bu 2.3
  1989. .\}
  1990. max\-download\-limit
  1991. .RE
  1992. .sp
  1993. .RS 4
  1994. .ie n \{\
  1995. \h'-04'\(bu\h'+03'\c
  1996. .\}
  1997. .el \{\
  1998. .sp -1
  1999. .IP \(bu 2.3
  2000. .\}
  2001. no\-file\-allocation\-limit
  2002. .RE
  2003. .sp
  2004. .RS 4
  2005. .ie n \{\
  2006. \h'-04'\(bu\h'+03'\c
  2007. .\}
  2008. .el \{\
  2009. .sp -1
  2010. .IP \(bu 2.3
  2011. .\}
  2012. parameterized\-uri
  2013. .RE
  2014. .sp
  2015. .RS 4
  2016. .ie n \{\
  2017. \h'-04'\(bu\h'+03'\c
  2018. .\}
  2019. .el \{\
  2020. .sp -1
  2021. .IP \(bu 2.3
  2022. .\}
  2023. realtime\-chunk\-checksum
  2024. .RE
  2025. .sp
  2026. These options have exactly same meaning of the ones in the command\-line options, but it just applies to the URIs it belongs to\&.
  2027. .sp
  2028. For example, the content of uri\&.txt is
  2029. .sp
  2030. .if n \{\
  2031. .RS 4
  2032. .\}
  2033. .nf
  2034. http://server/file\&.iso http://mirror/file\&.iso
  2035. dir=/iso_images
  2036. out=file\&.img
  2037. http://foo/bar
  2038. .fi
  2039. .if n \{\
  2040. .RE
  2041. .\}
  2042. .sp
  2043. 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\&.
  2044. .sp
  2045. In some cases, \fBout\fR parameter has no effect\&. See note of \fB\-\-out\fR option for the restrictions\&.
  2046. .SS "Server Performance Profile"
  2047. .sp
  2048. 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:
  2049. .PP
  2050. host
  2051. .RS 4
  2052. Hostname of the server\&. Required\&.
  2053. .RE
  2054. .PP
  2055. protocol
  2056. .RS 4
  2057. Protocol for this profile, such as ftp, http\&. Required\&.
  2058. .RE
  2059. .PP
  2060. dl_speed
  2061. .RS 4
  2062. The average download speed observed in the previous download in bytes per sec\&. Required\&.
  2063. .RE
  2064. .PP
  2065. sc_avg_speed
  2066. .RS 4
  2067. 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\&.
  2068. .RE
  2069. .PP
  2070. mc_avg_speed
  2071. .RS 4
  2072. 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\&.
  2073. .RE
  2074. .PP
  2075. counter
  2076. .RS 4
  2077. How many times the server is used\&. Currently this value is only used by AdaptiveURISelector\&. Optional\&.
  2078. .RE
  2079. .PP
  2080. last_updated
  2081. .RS 4
  2082. Last contact time in GMT with this server, specified in the seconds from the Epoch\&. Required\&.
  2083. .RE
  2084. .PP
  2085. status
  2086. .RS 4
  2087. ERROR is set when server cannot be reached or out\-of\-service or timeout occurred\&. Otherwise, OK is set\&.
  2088. .RE
  2089. .sp
  2090. 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\&.
  2091. .sp
  2092. An example follows:
  2093. .sp
  2094. .if n \{\
  2095. .RS 4
  2096. .\}
  2097. .nf
  2098. host=localhost, protocol=http, dl_speed=32000, last_updated=1222491640, status=OK
  2099. host=localhost, protocol=ftp, dl_speed=0, last_updated=1222491632, status=ERROR
  2100. .fi
  2101. .if n \{\
  2102. .RE
  2103. .\}
  2104. .SH "XML-RPC INTERFACE"
  2105. .SS "Terminology"
  2106. .PP
  2107. GID
  2108. .RS 4
  2109. 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\&.
  2110. .RE
  2111. .SS "Methods"
  2112. .sp
  2113. \fBaria2\&.addUri\fR \fIuris[, options[, position]]\fR
  2114. .sp
  2115. 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\&.
  2116. .sp
  2117. \fBaria2\&.addTorrent\fR \fItorrent[, uris[, options[, position]]]\fR
  2118. .sp
  2119. This method adds BitTorrent download by uploading \&.torrent file\&. \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\&.
  2120. .sp
  2121. \fBaria2\&.addMetalink\fR \fImetalink[, options[, position]]\fR
  2122. .sp
  2123. 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\&.
  2124. .sp
  2125. \fBaria2\&.remove\fR \fIgid\fR
  2126. .sp
  2127. 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\&.
  2128. .sp
  2129. \fBaria2\&.tellStatus\fR \fIgid\fR
  2130. .sp
  2131. 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\&.
  2132. .PP
  2133. gid
  2134. .RS 4
  2135. GID of this download\&.
  2136. .RE
  2137. .PP
  2138. status
  2139. .RS 4
  2140. "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\&.
  2141. .RE
  2142. .PP
  2143. totalLength
  2144. .RS 4
  2145. Total length of this download in bytes\&.
  2146. .RE
  2147. .PP
  2148. completedLength
  2149. .RS 4
  2150. Completed length of this download in bytes\&.
  2151. .RE
  2152. .PP
  2153. uploadLength
  2154. .RS 4
  2155. Uploaded length of this download in bytes\&.
  2156. .RE
  2157. .PP
  2158. bitfield
  2159. .RS 4
  2160. 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\&.
  2161. .RE
  2162. .PP
  2163. downloadSpeed
  2164. .RS 4
  2165. Download speed of this download measured in bytes/sec\&.
  2166. .RE
  2167. .PP
  2168. uploadSpeed
  2169. .RS 4
  2170. Upload speed of this download measured in bytes/sec\&.
  2171. .RE
  2172. .PP
  2173. infoHash
  2174. .RS 4
  2175. InfoHash\&. BitTorrent only\&.
  2176. .RE
  2177. .PP
  2178. numSeeders
  2179. .RS 4
  2180. The number of seeders the client has connected to\&. BitTorrent only\&.
  2181. .RE
  2182. .PP
  2183. pieceLength
  2184. .RS 4
  2185. Piece length in bytes\&.
  2186. .RE
  2187. .PP
  2188. numPieces
  2189. .RS 4
  2190. The number of pieces\&.
  2191. .RE
  2192. .PP
  2193. connections
  2194. .RS 4
  2195. The number of peers/servers the client has connected to\&.
  2196. .RE
  2197. .PP
  2198. errorCode
  2199. .RS 4
  2200. 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\&.
  2201. .RE
  2202. .sp
  2203. \fBaria2\&.getUris\fR \fIgid\fR
  2204. .sp
  2205. 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\&.
  2206. .PP
  2207. uri
  2208. .RS 4
  2209. URI
  2210. .RE
  2211. .sp
  2212. \fBaria2\&.getFiles\fR \fIgid\fR
  2213. .sp
  2214. 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\&.
  2215. .PP
  2216. index
  2217. .RS 4
  2218. Index of file\&. Starting with 1\&. This is the same order with the files in multi\-file torrent\&.
  2219. .RE
  2220. .PP
  2221. path
  2222. .RS 4
  2223. File path\&.
  2224. .RE
  2225. .PP
  2226. length
  2227. .RS 4
  2228. File size in bytes\&.
  2229. .RE
  2230. .PP
  2231. selected
  2232. .RS 4
  2233. "true" if this file is selected by
  2234. \fB\-\-select\-file\fR
  2235. option\&. If
  2236. \fB\-\-select\-file\fR
  2237. is not specified or this is single torrent or no torrent download, this value is always "true"\&. Otherwise "false"\&.
  2238. .RE
  2239. .sp
  2240. \fBaria2\&.getPeers\fR \fIgid\fR
  2241. .sp
  2242. 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\&.
  2243. .PP
  2244. peerId
  2245. .RS 4
  2246. Percent\-encoded peer ID\&.
  2247. .RE
  2248. .PP
  2249. ip
  2250. .RS 4
  2251. IP address of the peer\&.
  2252. .RE
  2253. .PP
  2254. port
  2255. .RS 4
  2256. Port number of the peer\&.
  2257. .RE
  2258. .PP
  2259. bitfield
  2260. .RS 4
  2261. 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\&.
  2262. .RE
  2263. .PP
  2264. amChoking
  2265. .RS 4
  2266. "true" if this client is choking the peer\&. Otherwise "false"\&.
  2267. .RE
  2268. .PP
  2269. peerChoking
  2270. .RS 4
  2271. "true" if the peer is choking this client\&. Otherwise "false"\&.
  2272. .RE
  2273. .PP
  2274. downloadSpeed
  2275. .RS 4
  2276. Download speed (byte/sec) that this client obtains from the peer\&.
  2277. .RE
  2278. .PP
  2279. uploadSpeed
  2280. .RS 4
  2281. Upload speed(byte/sec) that this client uploads to the peer\&.
  2282. .RE
  2283. .PP
  2284. seeder
  2285. .RS 4
  2286. "true" is this client is a seeder\&. Otherwise "false"\&.
  2287. .RE
  2288. .sp
  2289. \fBaria2\&.tellActive\fR
  2290. .sp
  2291. This method returns the list of active downloads\&. The respose is of type array and its element is the same struct returned by \fBaria2\&.tellStatus\fR method\&.
  2292. .sp
  2293. \fBaria2\&.tellWaiting\fR \fIoffset, num\fR
  2294. .sp
  2295. This method returns the list of waiting download in the range of [\fIoffset\fR, \fIoffset\fR+\fInum\fR)\&. \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\&. 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" and "C"\&. The respose is of type array and its element is the same struct returned by \fBaria2\&.tellStatus\fR method\&.
  2296. .sp
  2297. \fBaria2\&.changeOption\fR \fIgid, options\fR
  2298. .sp
  2299. 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\&.
  2300. .sp
  2301. \fBaria2\&.changeGlobalOption\fR \fIoptions\fR
  2302. .sp
  2303. 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\&.
  2304. .sp
  2305. \fBaria2\&.purgeDownloadResult\fR
  2306. .sp
  2307. This method purges completed/error/removed downloads to free memory\&. This method returns "OK"\&.
  2308. .sp
  2309. \fBaria2\&.getVersion\fR
  2310. .sp
  2311. This method returns version of the program and the list of enabled features\&. The response is of type struct and contains following keys\&.
  2312. .PP
  2313. version
  2314. .RS 4
  2315. Version number of the program in string\&.
  2316. .RE
  2317. .PP
  2318. enabledFeatures
  2319. .RS 4
  2320. List of enabled features\&. Each feature name is of type string\&.
  2321. .RE
  2322. .SS "Error Handling"
  2323. .sp
  2324. In case of error, aria2 returns faultCode=1 and the error message in faultString\&.
  2325. .SS "Options"
  2326. .sp
  2327. Same options for \fB\-i\fR list are available\&. See \fBInput File\fR subsection for complete list of options\&.
  2328. .sp
  2329. In the option struct, name element is option name(without preceeding "\-\-") and value element is argument as string\&.
  2330. .sp
  2331. .if n \{\
  2332. .RS 4
  2333. .\}
  2334. .nf
  2335. <struct>
  2336. <member>
  2337. <name>split</name>
  2338. <value><string>1</string></value>
  2339. </member>
  2340. <member>
  2341. <name>http\-proxy</name>
  2342. <value><string>http://proxy/</string></value>
  2343. </member>
  2344. </struct>
  2345. .fi
  2346. .if n \{\
  2347. .RE
  2348. .\}
  2349. .sp
  2350. \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\&.
  2351. .sp
  2352. .if n \{\
  2353. .RS 4
  2354. .\}
  2355. .nf
  2356. <struct>
  2357. <member>
  2358. <name>header</name>
  2359. <value>
  2360. <array>
  2361. <data>
  2362. <value><string>Accept\-Language: ja</string></value>
  2363. <value><string>Accept\-Charset: utf\-8</string></value>
  2364. </data>
  2365. </array>
  2366. </value>
  2367. </member>
  2368. </struct>
  2369. .fi
  2370. .if n \{\
  2371. .RE
  2372. .\}
  2373. .SS "Sample XML\-RPC Client Code"
  2374. .sp
  2375. 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\&.
  2376. .sp
  2377. .if n \{\
  2378. .RS 4
  2379. .\}
  2380. .nf
  2381. #!/usr/bin/env ruby
  2382. require \'xmlrpc/client\'
  2383. require \'pp\'
  2384. client=XMLRPC::Client\&.new2("http://localhost:6800/rpc")
  2385. options={ "dir" => "/downloads" }
  2386. result=client\&.call("aria2\&.addUri", [ "http://localhost/aria2\&.tar\&.bz2" ], options)
  2387. pp result
  2388. .fi
  2389. .if n \{\
  2390. .RE
  2391. .\}
  2392. .SH "EXAMPLE"
  2393. .SS "HTTP/FTP Segmented Download"
  2394. .sp
  2395. .it 1 an-trap
  2396. .nr an-no-space-flag 1
  2397. .nr an-break-flag 1
  2398. .br
  2399. .ps +1
  2400. \fBDownload a file\fR
  2401. .RS 4
  2402. .sp
  2403. .if n \{\
  2404. .RS 4
  2405. .\}
  2406. .nf
  2407. aria2c "http://host/file\&.zip"
  2408. .fi
  2409. .if n \{\
  2410. .RE
  2411. .\}
  2412. .if n \{\
  2413. .sp
  2414. .\}
  2415. .RS 4
  2416. .it 1 an-trap
  2417. .nr an-no-space-flag 1
  2418. .nr an-break-flag 1
  2419. .br
  2420. .ps +1
  2421. \fBNote\fR
  2422. .ps -1
  2423. .br
  2424. .sp
  2425. aria2 uses 5 connections to download 1 file by default\&.
  2426. .sp .5v
  2427. .RE
  2428. .RE
  2429. .sp
  2430. .it 1 an-trap
  2431. .nr an-no-space-flag 1
  2432. .nr an-break-flag 1
  2433. .br
  2434. .ps +1
  2435. \fBDownload a file using 1 connection\fR
  2436. .RS 4
  2437. .sp
  2438. .if n \{\
  2439. .RS 4
  2440. .\}
  2441. .nf
  2442. aria2c \-s1 "http://host/file\&.zip"
  2443. .fi
  2444. .if n \{\
  2445. .RE
  2446. .\}
  2447. .if n \{\
  2448. .sp
  2449. .\}
  2450. .RS 4
  2451. .it 1 an-trap
  2452. .nr an-no-space-flag 1
  2453. .nr an-break-flag 1
  2454. .br
  2455. .ps +1
  2456. \fBNote\fR
  2457. .ps -1
  2458. .br
  2459. .sp
  2460. aria2 uses 5 connections to download 1 file by default\&. \-s1 limits the number of connections to just 1\&.
  2461. .sp .5v
  2462. .RE
  2463. .if n \{\
  2464. .sp
  2465. .\}
  2466. .RS 4
  2467. .it 1 an-trap
  2468. .nr an-no-space-flag 1
  2469. .nr an-break-flag 1
  2470. .br
  2471. .ps +1
  2472. \fBNote\fR
  2473. .ps -1
  2474. .br
  2475. .sp
  2476. To pause a download, press Ctrl\-C\&. You can resume the transfer by running aria2c with the same argument in the same directory\&. You can change URLs as long as they are pointing to the same file\&.
  2477. .sp .5v
  2478. .RE
  2479. .RE
  2480. .sp
  2481. .it 1 an-trap
  2482. .nr an-no-space-flag 1
  2483. .nr an-break-flag 1
  2484. .br
  2485. .ps +1
  2486. \fBDownload a file from 2 different HTTP servers\fR
  2487. .RS 4
  2488. .sp
  2489. .if n \{\
  2490. .RS 4
  2491. .\}
  2492. .nf
  2493. aria2c "http://host/file\&.zip" "http://mirror/file\&.zip"
  2494. .fi
  2495. .if n \{\
  2496. .RE
  2497. .\}
  2498. .RE
  2499. .sp
  2500. .it 1 an-trap
  2501. .nr an-no-space-flag 1
  2502. .nr an-break-flag 1
  2503. .br
  2504. .ps +1
  2505. \fBDownload a file from HTTP and FTP servers\fR
  2506. .RS 4
  2507. .sp
  2508. .if n \{\
  2509. .RS 4
  2510. .\}
  2511. .nf
  2512. aria2c "http://host1/file\&.zip" "ftp://host2/file\&.zip"
  2513. .fi
  2514. .if n \{\
  2515. .RE
  2516. .\}
  2517. .RE
  2518. .sp
  2519. .it 1 an-trap
  2520. .nr an-no-space-flag 1
  2521. .nr an-break-flag 1
  2522. .br
  2523. .ps +1
  2524. \fBDownload files listed in a text file concurrently\fR
  2525. .RS 4
  2526. .sp
  2527. .if n \{\
  2528. .RS 4
  2529. .\}
  2530. .nf
  2531. aria2c \-ifiles\&.txt \-j2
  2532. .fi
  2533. .if n \{\
  2534. .RE
  2535. .\}
  2536. .if n \{\
  2537. .sp
  2538. .\}
  2539. .RS 4
  2540. .it 1 an-trap
  2541. .nr an-no-space-flag 1
  2542. .nr an-break-flag 1
  2543. .br
  2544. .ps +1
  2545. \fBNote\fR
  2546. .ps -1
  2547. .br
  2548. .sp
  2549. \-j option specifies the number of parallel downloads\&.
  2550. .sp .5v
  2551. .RE
  2552. .RE
  2553. .sp
  2554. .it 1 an-trap
  2555. .nr an-no-space-flag 1
  2556. .nr an-break-flag 1
  2557. .br
  2558. .ps +1
  2559. \fBUsing proxy\fR
  2560. .RS 4
  2561. .sp
  2562. For HTTP:
  2563. .sp
  2564. .if n \{\
  2565. .RS 4
  2566. .\}
  2567. .nf
  2568. aria2c \-\-http\-proxy="http://proxy:8080" "http://host/file"
  2569. .fi
  2570. .if n \{\
  2571. .RE
  2572. .\}
  2573. .sp
  2574. For FTP:
  2575. .sp
  2576. .if n \{\
  2577. .RS 4
  2578. .\}
  2579. .nf
  2580. aria2c \-\-ftp\-proxy="http://proxy:8080" "ftp://host/file"
  2581. .fi
  2582. .if n \{\
  2583. .RE
  2584. .\}
  2585. .if n \{\
  2586. .sp
  2587. .\}
  2588. .RS 4
  2589. .it 1 an-trap
  2590. .nr an-no-space-flag 1
  2591. .nr an-break-flag 1
  2592. .br
  2593. .ps +1
  2594. \fBNote\fR
  2595. .ps -1
  2596. .br
  2597. .sp
  2598. See \fB\-\-http\-proxy\fR, \fB\-\-https\-proxy\fR, \fB\-\-ftp\-proxy\fR and \fB\-\-all\-proxy\fR for details\&. You can specify proxy in the environment variables\&. See \fBENVIRONMENT\fR section\&.
  2599. .sp .5v
  2600. .RE
  2601. .RE
  2602. .sp
  2603. .it 1 an-trap
  2604. .nr an-no-space-flag 1
  2605. .nr an-break-flag 1
  2606. .br
  2607. .ps +1
  2608. \fBProxy with authorization\fR
  2609. .RS 4
  2610. .sp
  2611. .if n \{\
  2612. .RS 4
  2613. .\}
  2614. .nf
  2615. aria2c \-\-http\-proxy="http://username:password@proxy:8080" "http://host/file"
  2616. .fi
  2617. .if n \{\
  2618. .RE
  2619. .\}
  2620. .RE
  2621. .SS "Metalink Download"
  2622. .sp
  2623. .it 1 an-trap
  2624. .nr an-no-space-flag 1
  2625. .nr an-break-flag 1
  2626. .br
  2627. .ps +1
  2628. \fBDownload files with remote Metalink\fR
  2629. .RS 4
  2630. .sp
  2631. .if n \{\
  2632. .RS 4
  2633. .\}
  2634. .nf
  2635. aria2c \-\-follow\-metalink=mem "http://host/file\&.metalink"
  2636. .fi
  2637. .if n \{\
  2638. .RE
  2639. .\}
  2640. .RE
  2641. .sp
  2642. .it 1 an-trap
  2643. .nr an-no-space-flag 1
  2644. .nr an-break-flag 1
  2645. .br
  2646. .ps +1
  2647. \fBDownload using a local metalink file\fR
  2648. .RS 4
  2649. .sp
  2650. .if n \{\
  2651. .RS 4
  2652. .\}
  2653. .nf
  2654. aria2c \-p \-\-lowest\-speed\-limit=4000 file\&.metalink
  2655. .fi
  2656. .if n \{\
  2657. .RE
  2658. .\}
  2659. .if n \{\
  2660. .sp
  2661. .\}
  2662. .RS 4
  2663. .it 1 an-trap
  2664. .nr an-no-space-flag 1
  2665. .nr an-break-flag 1
  2666. .br
  2667. .ps +1
  2668. \fBNote\fR
  2669. .ps -1
  2670. .br
  2671. .sp
  2672. To pause a download, press Ctrl\-C\&. You can resume the transfer by running aria2c with the same argument in the same directory\&.
  2673. .sp .5v
  2674. .RE
  2675. .RE
  2676. .sp
  2677. .it 1 an-trap
  2678. .nr an-no-space-flag 1
  2679. .nr an-break-flag 1
  2680. .br
  2681. .ps +1
  2682. \fBDownload several local metalink files\fR
  2683. .RS 4
  2684. .sp
  2685. .if n \{\
  2686. .RS 4
  2687. .\}
  2688. .nf
  2689. aria2c \-j2 file1\&.metalink file2\&.metalink
  2690. .fi
  2691. .if n \{\
  2692. .RE
  2693. .\}
  2694. .RE
  2695. .sp
  2696. .it 1 an-trap
  2697. .nr an-no-space-flag 1
  2698. .nr an-break-flag 1
  2699. .br
  2700. .ps +1
  2701. \fBDownload only selected files using index\fR
  2702. .RS 4
  2703. .sp
  2704. .if n \{\
  2705. .RS 4
  2706. .\}
  2707. .nf
  2708. aria2c \-\-select\-file=1\-4,8 file\&.metalink
  2709. .fi
  2710. .if n \{\
  2711. .RE
  2712. .\}
  2713. .if n \{\
  2714. .sp
  2715. .\}
  2716. .RS 4
  2717. .it 1 an-trap
  2718. .nr an-no-space-flag 1
  2719. .nr an-break-flag 1
  2720. .br
  2721. .ps +1
  2722. \fBNote\fR
  2723. .ps -1
  2724. .br
  2725. .sp
  2726. The index is printed to the console using \-S option\&.
  2727. .sp .5v
  2728. .RE
  2729. .RE
  2730. .sp
  2731. .it 1 an-trap
  2732. .nr an-no-space-flag 1
  2733. .nr an-break-flag 1
  2734. .br
  2735. .ps +1
  2736. \fBDownload a file using a local .metalink file with user preference\fR
  2737. .RS 4
  2738. .sp
  2739. .if n \{\
  2740. .RS 4
  2741. .\}
  2742. .nf
  2743. aria2c \-\-metalink\-location=JP,US \-\-metalink\-version=1\&.1 \-\-metalink\-language=en\-US file\&.metalink
  2744. .fi
  2745. .if n \{\
  2746. .RE
  2747. .\}
  2748. .RE
  2749. .SS "BitTorrent Download"
  2750. .sp
  2751. .it 1 an-trap
  2752. .nr an-no-space-flag 1
  2753. .nr an-break-flag 1
  2754. .br
  2755. .ps +1
  2756. \fBDownload files from remote BitTorrent file\fR
  2757. .RS 4
  2758. .sp
  2759. .if n \{\
  2760. .RS 4
  2761. .\}
  2762. .nf
  2763. aria2c \-\-follow\-torrent=mem "http://host/file\&.torrent"
  2764. .fi
  2765. .if n \{\
  2766. .RE
  2767. .\}
  2768. .RE
  2769. .sp
  2770. .it 1 an-trap
  2771. .nr an-no-space-flag 1
  2772. .nr an-break-flag 1
  2773. .br
  2774. .ps +1
  2775. \fBDownload using a local torrent file\fR
  2776. .RS 4
  2777. .sp
  2778. .if n \{\
  2779. .RS 4
  2780. .\}
  2781. .nf
  2782. aria2c \-\-max\-upload\-limit=40K file\&.torrent
  2783. .fi
  2784. .if n \{\
  2785. .RE
  2786. .\}
  2787. .if n \{\
  2788. .sp
  2789. .\}
  2790. .RS 4
  2791. .it 1 an-trap
  2792. .nr an-no-space-flag 1
  2793. .nr an-break-flag 1
  2794. .br
  2795. .ps +1
  2796. \fBNote\fR
  2797. .ps -1
  2798. .br
  2799. .sp
  2800. \-\-max\-upload\-limit specifies the max of upload rate\&.
  2801. .sp .5v
  2802. .RE
  2803. .if n \{\
  2804. .sp
  2805. .\}
  2806. .RS 4
  2807. .it 1 an-trap
  2808. .nr an-no-space-flag 1
  2809. .nr an-break-flag 1
  2810. .br
  2811. .ps +1
  2812. \fBNote\fR
  2813. .ps -1
  2814. .br
  2815. .sp
  2816. To pause a download, press Ctrl\-C\&. You can resume the transfer by running aria2c with the same argument in the same directory\&.
  2817. .sp .5v
  2818. .RE
  2819. .RE
  2820. .sp
  2821. .it 1 an-trap
  2822. .nr an-no-space-flag 1
  2823. .nr an-break-flag 1
  2824. .br
  2825. .ps +1
  2826. \fBDownload using BitTorrent Magnet URI\fR
  2827. .RS 4
  2828. .sp
  2829. .if n \{\
  2830. .RS 4
  2831. .\}
  2832. .nf
  2833. aria2c "magnet:?xt=urn:btih:248d0a1cd08284299de78d5c1ed359bb46717d8c&dn=aria2"
  2834. .fi
  2835. .if n \{\
  2836. .RE
  2837. .\}
  2838. .if n \{\
  2839. .sp
  2840. .\}
  2841. .RS 4
  2842. .it 1 an-trap
  2843. .nr an-no-space-flag 1
  2844. .nr an-break-flag 1
  2845. .br
  2846. .ps +1
  2847. \fBNote\fR
  2848. .ps -1
  2849. .br
  2850. .sp
  2851. Don\(cqt forget to quote BitTorrent Magnet URI which includes "&" character with single(\') or double(") quotation\&.
  2852. .sp .5v
  2853. .RE
  2854. .RE
  2855. .sp
  2856. .it 1 an-trap
  2857. .nr an-no-space-flag 1
  2858. .nr an-break-flag 1
  2859. .br
  2860. .ps +1
  2861. \fBDownload 2 torrents\fR
  2862. .RS 4
  2863. .sp
  2864. .if n \{\
  2865. .RS 4
  2866. .\}
  2867. .nf
  2868. aria2c \-j2 file1\&.torrent file2\&.torrent
  2869. .fi
  2870. .if n \{\
  2871. .RE
  2872. .\}
  2873. .RE
  2874. .sp
  2875. .it 1 an-trap
  2876. .nr an-no-space-flag 1
  2877. .nr an-break-flag 1
  2878. .br
  2879. .ps +1
  2880. \fBDownload a file using torrent and HTTP/FTP server\fR
  2881. .RS 4
  2882. .sp
  2883. .if n \{\
  2884. .RS 4
  2885. .\}
  2886. .nf
  2887. aria2c \-Ttest\&.torrent "http://host1/file" "ftp://host2/file"
  2888. .fi
  2889. .if n \{\
  2890. .RE
  2891. .\}
  2892. .if n \{\
  2893. .sp
  2894. .\}
  2895. .RS 4
  2896. .it 1 an-trap
  2897. .nr an-no-space-flag 1
  2898. .nr an-break-flag 1
  2899. .br
  2900. .ps +1
  2901. \fBNote\fR
  2902. .ps -1
  2903. .br
  2904. .sp
  2905. Downloading multi file torrent with HTTP/FTP is not supported\&.
  2906. .sp .5v
  2907. .RE
  2908. .RE
  2909. .sp
  2910. .it 1 an-trap
  2911. .nr an-no-space-flag 1
  2912. .nr an-break-flag 1
  2913. .br
  2914. .ps +1
  2915. \fBDownload only selected files using index(usually called "selectable download")\fR
  2916. .RS 4
  2917. .sp
  2918. .if n \{\
  2919. .RS 4
  2920. .\}
  2921. .nf
  2922. aria2c \-\-select\-file=1\-4,8 file\&.torrent
  2923. .fi
  2924. .if n \{\
  2925. .RE
  2926. .\}
  2927. .if n \{\
  2928. .sp
  2929. .\}
  2930. .RS 4
  2931. .it 1 an-trap
  2932. .nr an-no-space-flag 1
  2933. .nr an-break-flag 1
  2934. .br
  2935. .ps +1
  2936. \fBNote\fR
  2937. .ps -1
  2938. .br
  2939. .sp
  2940. The index is printed to the console using \-S option\&.
  2941. .sp .5v
  2942. .RE
  2943. .RE
  2944. .sp
  2945. .it 1 an-trap
  2946. .nr an-no-space-flag 1
  2947. .nr an-break-flag 1
  2948. .br
  2949. .ps +1
  2950. \fBSpecify output filename\fR
  2951. .RS 4
  2952. .sp
  2953. 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:
  2954. .sp
  2955. .if n \{\
  2956. .RS 4
  2957. .\}
  2958. .nf
  2959. idx|path/length
  2960. ===+======================
  2961. 1|dist/base\-2\&.6\&.18\&.iso
  2962. |99\&.9MiB
  2963. \-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
  2964. 2|dist/driver\-2\&.6\&.18\&.iso
  2965. |169\&.0MiB
  2966. \-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
  2967. .fi
  2968. .if n \{\
  2969. .RE
  2970. .\}
  2971. .sp
  2972. 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:
  2973. .sp
  2974. .if n \{\
  2975. .RS 4
  2976. .\}
  2977. .nf
  2978. aria2c \-\-dir=/tmp \-\-index\-out=1=mydir/base\&.iso \-\-index\-out=2=dir/driver\&.iso file\&.torrent
  2979. .fi
  2980. .if n \{\
  2981. .RE
  2982. .\}
  2983. .RE
  2984. .sp
  2985. .it 1 an-trap
  2986. .nr an-no-space-flag 1
  2987. .nr an-break-flag 1
  2988. .br
  2989. .ps +1
  2990. \fBChange the listening port for incoming peer\fR
  2991. .RS 4
  2992. .sp
  2993. .if n \{\
  2994. .RS 4
  2995. .\}
  2996. .nf
  2997. aria2c \-\-listen\-port=7000\-7001,8000 file\&.torrent
  2998. .fi
  2999. .if n \{\
  3000. .RE
  3001. .\}
  3002. .if n \{\
  3003. .sp
  3004. .\}
  3005. .RS 4
  3006. .it 1 an-trap
  3007. .nr an-no-space-flag 1
  3008. .nr an-break-flag 1
  3009. .br
  3010. .ps +1
  3011. \fBNote\fR
  3012. .ps -1
  3013. .br
  3014. .sp
  3015. Since aria2 doesn\(cqt configure firewall or router for port forwarding, it\(cqs up to you to do it manually\&.
  3016. .sp .5v
  3017. .RE
  3018. .RE
  3019. .sp
  3020. .it 1 an-trap
  3021. .nr an-no-space-flag 1
  3022. .nr an-break-flag 1
  3023. .br
  3024. .ps +1
  3025. \fBSpecify the condition to stop program after torrent download finished\fR
  3026. .RS 4
  3027. .sp
  3028. .if n \{\
  3029. .RS 4
  3030. .\}
  3031. .nf
  3032. aria2c \-\-seed\-time=120 \-\-seed\-ratio=1\&.0 file\&.torrent
  3033. .fi
  3034. .if n \{\
  3035. .RE
  3036. .\}
  3037. .if n \{\
  3038. .sp
  3039. .\}
  3040. .RS 4
  3041. .it 1 an-trap
  3042. .nr an-no-space-flag 1
  3043. .nr an-break-flag 1
  3044. .br
  3045. .ps +1
  3046. \fBNote\fR
  3047. .ps -1
  3048. .br
  3049. .sp
  3050. In the above example, the program exits when the 120 minutes has elapsed since download completed or seed ratio reaches 1\&.0\&.
  3051. .sp .5v
  3052. .RE
  3053. .RE
  3054. .sp
  3055. .it 1 an-trap
  3056. .nr an-no-space-flag 1
  3057. .nr an-break-flag 1
  3058. .br
  3059. .ps +1
  3060. \fBThrottle upload speed\fR
  3061. .RS 4
  3062. .sp
  3063. .if n \{\
  3064. .RS 4
  3065. .\}
  3066. .nf
  3067. aria2c \-\-max\-upload\-limit=100K file\&.torrent
  3068. .fi
  3069. .if n \{\
  3070. .RE
  3071. .\}
  3072. .RE
  3073. .sp
  3074. .it 1 an-trap
  3075. .nr an-no-space-flag 1
  3076. .nr an-break-flag 1
  3077. .br
  3078. .ps +1
  3079. \fBEnable DHT\fR
  3080. .RS 4
  3081. .sp
  3082. .if n \{\
  3083. .RS 4
  3084. .\}
  3085. .nf
  3086. aria2c \-\-enable\-dht \-\-dht\-listen\-port=6881 file\&.torrent
  3087. .fi
  3088. .if n \{\
  3089. .RE
  3090. .\}
  3091. .if n \{\
  3092. .sp
  3093. .\}
  3094. .RS 4
  3095. .it 1 an-trap
  3096. .nr an-no-space-flag 1
  3097. .nr an-break-flag 1
  3098. .br
  3099. .ps +1
  3100. \fBNote\fR
  3101. .ps -1
  3102. .br
  3103. .sp
  3104. DHT uses udp port\&. Since aria2 doesn\(cqt configure firewall or router for port forwarding, it\(cqs up to you to do it manually\&.
  3105. .sp .5v
  3106. .RE
  3107. .RE
  3108. .SS "More advanced HTTP features"
  3109. .sp
  3110. .it 1 an-trap
  3111. .nr an-no-space-flag 1
  3112. .nr an-break-flag 1
  3113. .br
  3114. .ps +1
  3115. \fBLoad cookies\fR
  3116. .RS 4
  3117. .sp
  3118. .if n \{\
  3119. .RS 4
  3120. .\}
  3121. .nf
  3122. aria2c \-\-load\-cookies=cookies\&.txt "http://host/file\&.zip"
  3123. .fi
  3124. .if n \{\
  3125. .RE
  3126. .\}
  3127. .if n \{\
  3128. .sp
  3129. .\}
  3130. .RS 4
  3131. .it 1 an-trap
  3132. .nr an-no-space-flag 1
  3133. .nr an-break-flag 1
  3134. .br
  3135. .ps +1
  3136. \fBNote\fR
  3137. .ps -1
  3138. .br
  3139. .sp
  3140. You can use Firefox/Mozilla\(cqs cookie file without modification\&.
  3141. .sp .5v
  3142. .RE
  3143. .RE
  3144. .sp
  3145. .it 1 an-trap
  3146. .nr an-no-space-flag 1
  3147. .nr an-break-flag 1
  3148. .br
  3149. .ps +1
  3150. \fBResume download started by web browsers or another programs\fR
  3151. .RS 4
  3152. .sp
  3153. .if n \{\
  3154. .RS 4
  3155. .\}
  3156. .nf
  3157. aria2c \-c \-s2 "http://host/partiallydownloadedfile\&.zip"
  3158. .fi
  3159. .if n \{\
  3160. .RE
  3161. .\}
  3162. .RE
  3163. .sp
  3164. .it 1 an-trap
  3165. .nr an-no-space-flag 1
  3166. .nr an-break-flag 1
  3167. .br
  3168. .ps +1
  3169. \fBClient certificate authorization for SSL/TLS\fR
  3170. .RS 4
  3171. .sp
  3172. .if n \{\
  3173. .RS 4
  3174. .\}
  3175. .nf
  3176. aria2c \-\-certificate=/path/to/mycert\&.pem \-\-private\-key=/path/to/mykey\&.pem https://host/file
  3177. .fi
  3178. .if n \{\
  3179. .RE
  3180. .\}
  3181. .if n \{\
  3182. .sp
  3183. .\}
  3184. .RS 4
  3185. .it 1 an-trap
  3186. .nr an-no-space-flag 1
  3187. .nr an-break-flag 1
  3188. .br
  3189. .ps +1
  3190. \fBNote\fR
  3191. .ps -1
  3192. .br
  3193. .sp
  3194. The file specified in \fB\-\-private\-key\fR must be decrypted\&. The behavior when encrypted one is given is undefined\&.
  3195. .sp .5v
  3196. .RE
  3197. .RE
  3198. .sp
  3199. .it 1 an-trap
  3200. .nr an-no-space-flag 1
  3201. .nr an-break-flag 1
  3202. .br
  3203. .ps +1
  3204. \fBVerify peer in SSL/TLS using given CA certificates\fR
  3205. .RS 4
  3206. .sp
  3207. .if n \{\
  3208. .RS 4
  3209. .\}
  3210. .nf
  3211. aria2c \-\-ca\-certificate=/path/to/ca\-certificates\&.crt \-\-check\-certificate https://host/file
  3212. .fi
  3213. .if n \{\
  3214. .RE
  3215. .\}
  3216. .RE
  3217. .SS "And more advanced features"
  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. \fBThrottle download speed\fR
  3225. .RS 4
  3226. .sp
  3227. .if n \{\
  3228. .RS 4
  3229. .\}
  3230. .nf
  3231. aria2c \-\-max\-download\-limit=100K 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. \fBRepair a damaged download\fR
  3244. .RS 4
  3245. .sp
  3246. .if n \{\
  3247. .RS 4
  3248. .\}
  3249. .nf
  3250. aria2c \-V 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. This option is only available used with BitTorrent or metalink with chunk checksums\&.
  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. \fBDrop connection if download speed is lower than specified value\fR
  3279. .RS 4
  3280. .sp
  3281. .if n \{\
  3282. .RS 4
  3283. .\}
  3284. .nf
  3285. aria2c \-\-lowest\-speed\-limit=10K file\&.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. \fBParameterized URI support\fR
  3298. .RS 4
  3299. .sp
  3300. You can specify set of parts:
  3301. .sp
  3302. .if n \{\
  3303. .RS 4
  3304. .\}
  3305. .nf
  3306. aria2c \-P "http://{host1,host2,host3}/file\&.iso"
  3307. .fi
  3308. .if n \{\
  3309. .RE
  3310. .\}
  3311. .sp
  3312. You can specify numeric sequence:
  3313. .sp
  3314. .if n \{\
  3315. .RS 4
  3316. .\}
  3317. .nf
  3318. aria2c \-Z \-P "http://host/image[000\-100]\&.png"
  3319. .fi
  3320. .if n \{\
  3321. .RE
  3322. .\}
  3323. .sp
  3324. .if n \{\
  3325. .sp
  3326. .\}
  3327. .RS 4
  3328. .it 1 an-trap
  3329. .nr an-no-space-flag 1
  3330. .nr an-break-flag 1
  3331. .br
  3332. .ps +1
  3333. \fBNote\fR
  3334. .ps -1
  3335. .br
  3336. .sp
  3337. \-Z option is required if the all URIs don\(cqt point to the same file, such as the above example\&.
  3338. .sp .5v
  3339. .RE
  3340. .sp
  3341. You can specify step counter:
  3342. .sp
  3343. .if n \{\
  3344. .RS 4
  3345. .\}
  3346. .nf
  3347. aria2c \-Z \-P "http://host/image[A\-Z:2]\&.png"
  3348. .fi
  3349. .if n \{\
  3350. .RE
  3351. .\}
  3352. .RE
  3353. .sp
  3354. .it 1 an-trap
  3355. .nr an-no-space-flag 1
  3356. .nr an-break-flag 1
  3357. .br
  3358. .ps +1
  3359. \fBParallel downloads of arbitrary number of URL,metalink,torrent\fR
  3360. .RS 4
  3361. .sp
  3362. .if n \{\
  3363. .RS 4
  3364. .\}
  3365. .nf
  3366. aria2c \-j3 \-Z "http://host/file1" file2\&.torrent file3\&.metalink
  3367. .fi
  3368. .if n \{\
  3369. .RE
  3370. .\}
  3371. .RE
  3372. .sp
  3373. .it 1 an-trap
  3374. .nr an-no-space-flag 1
  3375. .nr an-break-flag 1
  3376. .br
  3377. .ps +1
  3378. \fBBitTorrent Encryption\fR
  3379. .RS 4
  3380. .sp
  3381. Encrypt whole payload using ARC4:
  3382. .sp
  3383. .if n \{\
  3384. .RS 4
  3385. .\}
  3386. .nf
  3387. aria2c \-\-bt\-min\-crypto\-level=arc4 \-\-bt\-require\-crypto=true file\&.torrent
  3388. .fi
  3389. .if n \{\
  3390. .RE
  3391. .\}
  3392. .RE
  3393. .SH "SEE ALSO"
  3394. .sp
  3395. Project Web Site: http://aria2\&.sourceforge\&.net/
  3396. .sp
  3397. aria2 Wiki: http://sourceforge\&.net/apps/trac/aria2/wiki
  3398. .sp
  3399. Metalink Homepage: http://www\&.metalinker\&.org/
  3400. .SH "COPYRIGHT"
  3401. .sp
  3402. Copyright \(co 2006, 2009 Tatsuhiro Tsujikawa
  3403. .sp
  3404. 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\&.
  3405. .sp
  3406. 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\&.
  3407. .sp
  3408. 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
  3409. .sp
  3410. 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\&.