README.html 16 KB

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