README.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  2. "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  6. <meta name="generator" content="AsciiDoc 8.2.2" />
  7. <style type="text/css">
  8. /* Debug borders */
  9. p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
  10. /*
  11. border: 1px solid red;
  12. */
  13. }
  14. body {
  15. margin: 1em 5% 1em 5%;
  16. }
  17. a {
  18. color: blue;
  19. text-decoration: underline;
  20. }
  21. a:visited {
  22. color: fuchsia;
  23. }
  24. em {
  25. font-style: italic;
  26. }
  27. strong {
  28. font-weight: bold;
  29. }
  30. tt {
  31. color: navy;
  32. }
  33. h1, h2, h3, h4, h5, h6 {
  34. color: #527bbd;
  35. font-family: sans-serif;
  36. margin-top: 1.2em;
  37. margin-bottom: 0.5em;
  38. line-height: 1.3;
  39. }
  40. h1 {
  41. border-bottom: 2px solid silver;
  42. }
  43. h2 {
  44. border-bottom: 2px solid silver;
  45. padding-top: 0.5em;
  46. }
  47. div.sectionbody {
  48. font-family: serif;
  49. margin-left: 0;
  50. }
  51. hr {
  52. border: 1px solid silver;
  53. }
  54. p {
  55. margin-top: 0.5em;
  56. margin-bottom: 0.5em;
  57. }
  58. pre {
  59. padding: 0;
  60. margin: 0;
  61. }
  62. span#author {
  63. color: #527bbd;
  64. font-family: sans-serif;
  65. font-weight: bold;
  66. font-size: 1.1em;
  67. }
  68. span#email {
  69. }
  70. span#revision {
  71. font-family: sans-serif;
  72. }
  73. div#footer {
  74. font-family: sans-serif;
  75. font-size: small;
  76. border-top: 2px solid silver;
  77. padding-top: 0.5em;
  78. margin-top: 4.0em;
  79. }
  80. div#footer-text {
  81. float: left;
  82. padding-bottom: 0.5em;
  83. }
  84. div#footer-badges {
  85. float: right;
  86. padding-bottom: 0.5em;
  87. }
  88. div#preamble,
  89. div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
  90. div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
  91. div.admonitionblock {
  92. margin-right: 10%;
  93. margin-top: 1.5em;
  94. margin-bottom: 1.5em;
  95. }
  96. div.admonitionblock {
  97. margin-top: 2.5em;
  98. margin-bottom: 2.5em;
  99. }
  100. div.content { /* Block element content. */
  101. padding: 0;
  102. }
  103. /* Block element titles. */
  104. div.title, caption.title {
  105. font-family: sans-serif;
  106. font-weight: bold;
  107. text-align: left;
  108. margin-top: 1.0em;
  109. margin-bottom: 0.5em;
  110. }
  111. div.title + * {
  112. margin-top: 0;
  113. }
  114. td div.title:first-child {
  115. margin-top: 0.0em;
  116. }
  117. div.content div.title:first-child {
  118. margin-top: 0.0em;
  119. }
  120. div.content + div.title {
  121. margin-top: 0.0em;
  122. }
  123. div.sidebarblock > div.content {
  124. background: #ffffee;
  125. border: 1px solid silver;
  126. padding: 0.5em;
  127. }
  128. div.listingblock {
  129. margin-right: 0%;
  130. }
  131. div.listingblock > div.content {
  132. border: 1px solid silver;
  133. background: #f4f4f4;
  134. padding: 0.5em;
  135. }
  136. div.quoteblock > div.content {
  137. padding-left: 2.0em;
  138. }
  139. div.attribution {
  140. text-align: right;
  141. }
  142. div.verseblock + div.attribution {
  143. text-align: left;
  144. }
  145. div.admonitionblock .icon {
  146. vertical-align: top;
  147. font-size: 1.1em;
  148. font-weight: bold;
  149. text-decoration: underline;
  150. color: #527bbd;
  151. padding-right: 0.5em;
  152. }
  153. div.admonitionblock td.content {
  154. padding-left: 0.5em;
  155. border-left: 2px solid silver;
  156. }
  157. div.exampleblock > div.content {
  158. border-left: 2px solid silver;
  159. padding: 0.5em;
  160. }
  161. div.verseblock div.content {
  162. white-space: pre;
  163. }
  164. div.imageblock div.content { padding-left: 0; }
  165. div.imageblock img { border: 1px solid silver; }
  166. span.image img { border-style: none; }
  167. dl {
  168. margin-top: 0.8em;
  169. margin-bottom: 0.8em;
  170. }
  171. dt {
  172. margin-top: 0.5em;
  173. margin-bottom: 0;
  174. font-style: italic;
  175. }
  176. dd > *:first-child {
  177. margin-top: 0;
  178. }
  179. ul, ol {
  180. list-style-position: outside;
  181. }
  182. ol.olist2 {
  183. list-style-type: lower-alpha;
  184. }
  185. div.tableblock > table {
  186. border: 3px solid #527bbd;
  187. }
  188. thead {
  189. font-family: sans-serif;
  190. font-weight: bold;
  191. }
  192. tfoot {
  193. font-weight: bold;
  194. }
  195. div.hlist {
  196. margin-top: 0.8em;
  197. margin-bottom: 0.8em;
  198. }
  199. div.hlist td {
  200. padding-bottom: 5px;
  201. }
  202. td.hlist1 {
  203. vertical-align: top;
  204. font-style: italic;
  205. padding-right: 0.8em;
  206. }
  207. td.hlist2 {
  208. vertical-align: top;
  209. }
  210. @media print {
  211. div#footer-badges { display: none; }
  212. }
  213. div#toctitle {
  214. color: #527bbd;
  215. font-family: sans-serif;
  216. font-size: 1.1em;
  217. font-weight: bold;
  218. margin-top: 1.0em;
  219. margin-bottom: 0.1em;
  220. }
  221. div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
  222. margin-top: 0;
  223. margin-bottom: 0;
  224. }
  225. div.toclevel2 {
  226. margin-left: 2em;
  227. font-size: 0.9em;
  228. }
  229. div.toclevel3 {
  230. margin-left: 4em;
  231. font-size: 0.9em;
  232. }
  233. div.toclevel4 {
  234. margin-left: 6em;
  235. font-size: 0.9em;
  236. }
  237. /* Workarounds for IE6's broken and incomplete CSS2. */
  238. div.sidebar-content {
  239. background: #ffffee;
  240. border: 1px solid silver;
  241. padding: 0.5em;
  242. }
  243. div.sidebar-title, div.image-title {
  244. font-family: sans-serif;
  245. font-weight: bold;
  246. margin-top: 0.0em;
  247. margin-bottom: 0.5em;
  248. }
  249. div.listingblock div.content {
  250. border: 1px solid silver;
  251. background: #f4f4f4;
  252. padding: 0.5em;
  253. }
  254. div.quoteblock-content {
  255. padding-left: 2.0em;
  256. }
  257. div.exampleblock-content {
  258. border-left: 2px solid silver;
  259. padding-left: 0.5em;
  260. }
  261. /* IE6 sets dynamically generated links as visited. */
  262. div#toc a:visited { color: blue; }
  263. </style>
  264. <title>aria2 - The ultra fast download utility</title>
  265. </head>
  266. <body>
  267. <div id="header">
  268. <h1>aria2 - The ultra fast download utility</h1>
  269. <span id="author">Tatsuhiro Tsujikawa</span><br />
  270. <span id="email"><tt>&lt;<a href="mailto:tujikawa_at_users_dot_sourceforge_dot_net">tujikawa_at_users_dot_sourceforge_dot_net</a>&gt;</tt></span><br />
  271. </div>
  272. <h2>1. Disclaimer</h2>
  273. <div class="sectionbody">
  274. <p>This program comes with no warranty.
  275. You must use this program at your own risk.</p>
  276. </div>
  277. <h2>2. Introduction</h2>
  278. <div class="sectionbody">
  279. <p>aria2 is a utility for downloading files. The supported protocols are HTTP(S), FTP, BitTorrent, and Metalink. It has a powerful segmented downloading ability, downloading a file from multiple sources and multiple protocols and utilizing your download bandwidth to the maximum. 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's chunk checksums, aria2 automatically validates chunks of data while downloading a file like BitTorrent.</p>
  280. <p>Here is a list of features.</p>
  281. <ul>
  282. <li>
  283. <p>
  284. HTTP Proxy support
  285. </p>
  286. </li>
  287. <li>
  288. <p>
  289. HTTP BASIC authentication support
  290. </p>
  291. </li>
  292. <li>
  293. <p>
  294. HTTP Proxy authentication support
  295. </p>
  296. </li>
  297. <li>
  298. <p>
  299. FTP support(active, passive mode)
  300. </p>
  301. </li>
  302. <li>
  303. <p>
  304. FTP through HTTP proxy(GET command or tunneling)
  305. </p>
  306. </li>
  307. <li>
  308. <p>
  309. Multi-source/segmented downloading ability
  310. </p>
  311. </li>
  312. <li>
  313. <p>
  314. Cookie support
  315. </p>
  316. </li>
  317. <li>
  318. <p>
  319. It can load cookies from file whose format is used by Netscape and Mozilla.
  320. </p>
  321. </li>
  322. <li>
  323. <p>
  324. It can run as a daemon process.
  325. </p>
  326. </li>
  327. <li>
  328. <p>
  329. BitTorrent protocol support with fast extension, DHT, encryption, PEX enabled.
  330. </p>
  331. </li>
  332. <li>
  333. <p>
  334. Selective download in multi-file torrent/metalink.
  335. </p>
  336. </li>
  337. <li>
  338. <p>
  339. Metalink version 3.0 support(HTTP/FTP/BitTorrent).
  340. </p>
  341. </li>
  342. <li>
  343. <p>
  344. Limits download/upload speed.
  345. </p>
  346. </li>
  347. <li>
  348. <p>
  349. Chunk checksum validation in Metalink.
  350. </p>
  351. </li>
  352. <li>
  353. <p>
  354. netrc support.
  355. </p>
  356. </li>
  357. <li>
  358. <p>
  359. Configuration file support.
  360. </p>
  361. </li>
  362. <li>
  363. <p>
  364. Downloads URIs found in a text file or stdin.
  365. </p>
  366. </li>
  367. <li>
  368. <p>
  369. Integrates HTTP/FTP/BitTorrent downloads; downloading a file from several
  370. different sources.
  371. </p>
  372. </li>
  373. </ul>
  374. </div>
  375. <h2>3. Dependency</h2>
  376. <div class="sectionbody">
  377. <div class="tableblock">
  378. <table rules="all"
  379. frame="border"
  380. cellspacing="0" cellpadding="4">
  381. <caption class="title">Table: External Library Dependency</caption>
  382. <col width="114" />
  383. <col width="320" />
  384. <thead>
  385. <tr>
  386. <th align="left">
  387. features
  388. </th>
  389. <th align="left">
  390. dependency
  391. </th>
  392. </tr>
  393. </thead>
  394. <tbody valign="top">
  395. <tr>
  396. <td align="left">
  397. HTTPS
  398. </td>
  399. <td align="left">
  400. GnuTLS or OpenSSL
  401. </td>
  402. </tr>
  403. <tr>
  404. <td align="left">
  405. BitTorrent
  406. </td>
  407. <td align="left">
  408. GnuTLS+Libgcrypt or OpenSSL
  409. </td>
  410. </tr>
  411. <tr>
  412. <td align="left">
  413. Metalink
  414. </td>
  415. <td align="left">
  416. libxml2 or Expat.
  417. </td>
  418. </tr>
  419. <tr>
  420. <td align="left">
  421. Checksum
  422. </td>
  423. <td align="left">
  424. GnuTLS+Libgcrypt or OpenSSL
  425. </td>
  426. </tr>
  427. </tbody>
  428. </table>
  429. </div>
  430. <dl>
  431. <dt>
  432. Note
  433. </dt>
  434. <dd>
  435. <p>
  436. GNU TLS has precedence over OpenSSL if both libraries are installed.
  437. If you prefer OpenSSL, run configure with "&#8212;without-gnutls".
  438. </p>
  439. </dd>
  440. <dt>
  441. Note
  442. </dt>
  443. <dd>
  444. <p>
  445. libxml2 has precedence over Expat if both libraries are installed.
  446. If you prefer Expat, run configure with "&#8212;without-libxml2".
  447. </p>
  448. </dd>
  449. </dl>
  450. <p>You can disable BitTorrent, Metalink support by providing &#8212;disable-bittorrent,
  451. &#8212;disable-metalink respectively to configure script.</p>
  452. <p>In order to enable async DNS support, you need c-ares or ares.</p>
  453. <ul>
  454. <li>
  455. <p>
  456. c-ares: http://daniel.haxx.se/projects/c-ares/
  457. </p>
  458. </li>
  459. <li>
  460. <p>
  461. ares: ftp://athena-dist.mit.edu/pub/ATHENA/ares
  462. </p>
  463. </li>
  464. </ul>
  465. </div>
  466. <h2>4. How to build</h2>
  467. <div class="sectionbody">
  468. <p>In order to build aria2 from the source package, you need following development
  469. packages(package name may vary depending on the distribution you use):</p>
  470. <ul>
  471. <li>
  472. <p>
  473. libgnutls-dev (Required for HTTPS, BitTorrent, Checksum support)
  474. </p>
  475. </li>
  476. <li>
  477. <p>
  478. libgpg-error-dev (Required for BitTorrent, Checksum support)
  479. </p>
  480. </li>
  481. <li>
  482. <p>
  483. libgcrypt-dev (Required for BitTorrent, Checksum support)
  484. </p>
  485. </li>
  486. <li>
  487. <p>
  488. libares-dev (Required for async DNS support)
  489. </p>
  490. </li>
  491. <li>
  492. <p>
  493. libxml2-dev (Required for Metalink support)
  494. </p>
  495. </li>
  496. </ul>
  497. <p>You can use libssl-dev instead of libgnutls-dev,libgpg-error-dev,libgcrypt-dev:</p>
  498. <ul>
  499. <li>
  500. <p>
  501. libssl-dev (Required for HTTPS, BitTorrent, Checksum support)
  502. </p>
  503. </li>
  504. </ul>
  505. <p>You can use libexpat1-dev instead of libxml2-dev:</p>
  506. <ul>
  507. <li>
  508. <p>
  509. libexpat1-dev (Required for Metalink support)
  510. </p>
  511. </li>
  512. </ul>
  513. <p>The build process is fairly standard way for *nix programs:</p>
  514. <div class="listingblock">
  515. <div class="content">
  516. <pre><tt>$ ./configure
  517. $ make</tt></pre>
  518. </div></div>
  519. <p>The executable is aria2c in src directory.</p>
  520. </div>
  521. <h2>5. BitTorrrent</h2>
  522. <div class="sectionbody">
  523. <h3>5.1. About filename</h3>
  524. <p>The filename of the downloaded file is determined as follows:</p>
  525. <dl>
  526. <dt>
  527. single-file mode
  528. </dt>
  529. <dd>
  530. <p>
  531. If "name" key is present in .torrent file, filename is the value of "name"
  532. key. Otherwise, filename is the basename of .torrent file appended by
  533. ".file". For example, .torrent file is "test.torrrent", then filename is
  534. "test.torrent.file".
  535. The directory to store the downloaded file can be specified by -d option.
  536. </p>
  537. </dd>
  538. <dt>
  539. multi-file mode
  540. </dt>
  541. <dd>
  542. <p>
  543. The complete directory/file structure mentioned in .torrent file is
  544. created.
  545. The directory to store the top directory of downloaded files can be
  546. specified by -d option.
  547. </p>
  548. </dd>
  549. </dl>
  550. <p>In the default behavior, before download starts, complete directory structure
  551. is created if needed. Then aria2 opens all files mentioned in .torrent file,
  552. directly writes to and reads from these files.
  553. NOTE: Even in selective download, all files are opened.</p>
  554. <p>If "&#8212;direct-file-mapping" option set to be false, aria2 creates temporary
  555. file in the store directory. The length of this file is the sum of length of
  556. the files in .torrent file, so at least 2 times more disk space than the file
  557. size itself is required. Writing and reading is done against this file.
  558. After download completes, aria2 creates complete directory structure if needed,
  559. and copies whole file or a part of it to the destination.</p>
  560. <h3>5.2. DHT</h3>
  561. <p>As of release 0.13.0, aria2 supports DHT. The routing table is saved to $HOME/.aria2/dht.dat.</p>
  562. <dl>
  563. <dt>
  564. Note
  565. </dt>
  566. <dd>
  567. <ul>
  568. <li>
  569. <p>
  570. -o option is used to change the filename of .torrent file itself, not a filename of a file in .torrent file.
  571. </p>
  572. </li>
  573. <li>
  574. <p>
  575. The port numbers that aria2 uses by default are 6881-6999 for TCP and UDP.
  576. </p>
  577. </li>
  578. <li>
  579. <p>
  580. aria2 doesn't configure port-forwarding automatically. Please configure your router or firewall manually.
  581. </p>
  582. </li>
  583. <li>
  584. <p>
  585. The maximum number of peers is 55. This limit may be exceeded when download
  586. rate is low.
  587. </p>
  588. </li>
  589. <li>
  590. <p>
  591. As of release 0.10.0, aria2 stops sending request message after selective
  592. download completes,
  593. </p>
  594. </li>
  595. </ul>
  596. </dd>
  597. </dl>
  598. </div>
  599. <h2>6. Metalink</h2>
  600. <div class="sectionbody">
  601. <p>The current implementation supports HTTP/FTP/BitTorrent.
  602. The other P2P protocols are ignored.</p>
  603. <p>For checksum checking, MD5, SHA1, SHA256 are supported. If multiple hash
  604. algorithms are provided, aria2 uses SHA1. If checksum checking is failed, aria2
  605. doesn't retry the download and just exits with non-zero return code.</p>
  606. <p>The supported user preferences are version, language, location, protocol and
  607. os.</p>
  608. <p>If chunk checksums are provided in Metalink file, aria2 automatically validate
  609. a chunk of file while downloading it. This behavior can be turned off by
  610. a command-line option.</p>
  611. </div>
  612. <h2>7. netrc</h2>
  613. <div class="sectionbody">
  614. <p>netrc support is enabled by default in ftp.
  615. To disable netrc support, specify -n command-line option.
  616. Your .netrc file should have correct permissions(600).</p>
  617. </div>
  618. <h2>8. Configuration file</h2>
  619. <div class="sectionbody">
  620. <p>Configuration file must be placed under $HOME/.aria2 and must be named as aria2.conf.
  621. In each line, there is 1 parameter whose syntax is name=value pair,
  622. where name is the long command-line option name without <em>&#8212;</em> prefix.
  623. The lines beginning <em>#</em> are treated as comments.</p>
  624. <p>Example:</p>
  625. <div class="listingblock">
  626. <div class="content">
  627. <pre><tt># sample configuration file for aria2c
  628. file-allocation=prealloc
  629. listen-port=60000
  630. seed-ratio=1.0
  631. max-upload-limit=40K
  632. ftp-pasv=true</tt></pre>
  633. </div></div>
  634. </div>
  635. <div id="footer">
  636. <div id="footer-text">
  637. Last updated 26-Feb-2008 21:34:01 JST
  638. </div>
  639. </div>
  640. </body>
  641. </html>