1ARIA2C(1)                        Aria2 Manual                        ARIA2C(1)
2
3
4

NAME

6       aria2c - The ultra fast download utility
7

SYNOPSIS

9       aria2c [OPTIONS] [URI | MAGNET | TORRENT_FILE | METALINK_FILE]...
10

DESCRIPTION

12       aria2 is a utility for downloading files. The supported protocols are
13       HTTP(S), FTP, BitTorrent, and Metalink. aria2 can download a file from
14       multiple sources/protocols and tries to utilize your maximum download
15       bandwidth. It supports downloading a file from HTTP(S)/FTP and
16       BitTorrent at the same time, while the data downloaded from HTTP(S)/FTP
17       is uploaded to the BitTorrent swarm. Using Metalink’s chunk checksums,
18       aria2 automatically validates chunks of data while downloading a file
19       like BitTorrent.
20

OPTIONS

22   Basic Options
23       -d, --dir=DIR
24           The directory to store the downloaded file.
25
26       -i, --input-file=FILE
27           Downloads URIs found in FILE. You can specify multiple URIs for a
28           single entity: separate URIs on a single line using the TAB
29           character. Reads input from stdin when - is specified. The
30           additional out and dir options can be specified after each line of
31           URIs. This optional line must start with white space(s). See Input
32           File subsection for details.
33
34       -l, --log=LOG
35           The file name of the log file. If - is specified, log is written to
36           stdout.
37
38       -j, --max-concurrent-downloads=N
39           Set maximum number of parallel downloads for every static
40           (HTTP/FTP) URI, torrent and metalink. See also -s and -C option.
41           Default: 5
42
43       -V, --check-integrity[=true|false]
44           Check file integrity by validating piece hashes. This option has
45           effect only in BitTorrent and Metalink downloads with chunk
46           checksums. Use this option to re-download a damaged portion of a
47           file. Default: false
48
49       -c, --continue
50           Continue downloading a partially downloaded file. Use this option
51           to resume a download started by a web browser or another program
52           which downloads files sequentially from the beginning. Currently
53           this option is only applicable to HTTP(S)/FTP downloads.
54
55       -h, --help[=TAG|KEYWORD]
56           The help messages are classified with tags. A tag starts with "#".
57           For example, type "--help=#http" to get the usage for the options
58           tagged with "#http". If non-tag word is given, print the usage for
59           the options whose name includes that word. Available Values:
60           #basic, #advanced, #http, #https, #ftp, #metalink, #bittorrent,
61           #cookie, #hook, #file, #xml-rpc, #experimental, #all Default:
62           #basic
63
64   HTTP/FTP Options
65       --all-proxy=PROXY
66           Use this proxy server for all protocols. To erase previously
67           defined proxy, use "". You can override this setting and specify a
68           proxy server for a particular protocol using --http-proxy,
69           --https-proxy and --ftp-proxy options. This affects all URIs. The
70           format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]
71
72           Note
73           If user and password are embedded in proxy URI and they are also
74           specified by --{http,https,ftp,all}-proxy-{user,passwd} options,
75           those appeared later have precedence. For example, you have
76           http-proxy-user="myname", http-proxy-passwd="mypass" in aria2.conf
77           and you specify --http-proxy="http://proxy" in command-line, then
78           you get HTTP proxy "http://proxy" with user "myname" and password
79           "mypass". Another example: if you specified in command-line
80           --http-proxy="http://user:pass@proxy" --http-proxy-user="myname"
81           --http-proxy-passwd="mypass", then you will get HTTP proxy
82           "http://proxy" with user "myname" and password "mypass". One more
83           example: if you specified in command-line
84           --http-proxy-user="myname" --http-proxy-passwd="mypass"
85           --http-proxy="http://user:pass@proxy", then you get HTTP proxy
86           "http://proxy" with user "user" and password "pass".
87
88       --all-proxy-passwd=PASSWD
89           Set password for --all-proxy option.
90
91       --all-proxy-user=USER
92           Set user for --all-proxy option.
93
94       --connect-timeout=SEC
95           Set the connect timeout in seconds to establish connection to
96           HTTP/FTP/proxy server. After the connection is established, this
97           option makes no effect and --timeout option is used instead.
98           Default: 60
99
100       --dry-run[=true|false]
101           If true is given, aria2 just checks whether the remote file is
102           available and doesn’t download data. This option has effect on
103           HTTP/FTP download. BitTorrent downloads are canceled if true is
104           specified. Default: false
105
106       --lowest-speed-limit=SPEED
107           Close connection if download speed is lower than or equal to this
108           value(bytes per sec).  0 means aria2 does not have a lowest speed
109           limit. You can append K or M(1K = 1024, 1M = 1024K). This option
110           does not affect BitTorrent downloads. Default: 0
111
112       --max-file-not-found=NUM
113           If aria2 receives ‘file not found’ status from the remote HTTP/FTP
114           servers NUM times without getting a single byte, then force the
115           download to fail. Specify 0 to disable this option. This options is
116           effective only when using HTTP/FTP servers. Default: 0
117
118       -m, --max-tries=N
119           Set number of tries.  0 means unlimited. Default: 5
120
121       -n, --no-netrc
122           Disables netrc support. netrc support is enabled by default.
123
124       --no-proxy=DOMAINS
125           Specify comma separated hostnames, domains and network address with
126           or without CIDR block where proxy should not be used.
127
128           Note
129           For network address with CIDR block, only IPv4 address works.
130           Current implementation does not resolve hostname in URI to compare
131           network address specified in --no-proxy. So it is only effecive if
132           URI has numeric IP addresses.
133
134       -o, --out=FILE
135           The file name of the downloaded file. When -Z option is used, this
136           option is ignored.
137
138           Note
139           In Metalink or BitTorrent download you cannot specify file name.
140           The file name specified here is only used when the URIs fed to
141           aria2 are done by command line without -i, -Z option. For example:
142           aria2c -o myfile.zip "http://mirror1/file.zip"
143           "http://mirror2/file.zip"
144
145       --proxy-method=METHOD
146           Set the method to use in proxy request.  METHOD is either get or
147           tunnel. HTTPS downloads always use tunnel regardless of this
148           option. Default: get
149
150       -R, --remote-time[=true|false]
151           Retrieve timestamp of the remote file from the remote HTTP/FTP
152           server and if it is available, apply it to the local file. Default:
153           false
154
155       *--reuse-uri[=true|false]
156           Reuse already used URIs if no unused URIs are left. Default: true
157
158       --server-stat-of=FILE
159           Specify the filename to which performance profile of the servers is
160           saved. You can load saved data using --server-stat-if option. See
161           Server Performance Profile subsection below for file format.
162
163       --server-stat-if=FILE
164           Specify the filename to load performance profile of the servers.
165           The loaded data will be used in some URI selector such as feedback.
166           See also --uri-selector option. See Server Performance Profile
167           subsection below for file format.
168
169       --server-stat-timeout=SEC
170           Specifies timeout in seconds to invalidate performance profile of
171           the servers since the last contact to them. Default: 86400
172           (24hours)
173
174       -s, --split=N
175           Download a file using N connections. If more than N URIs are given,
176           first N URIs are used and remaining URIs are used for backup. If
177           less than N URIs are given, those URIs are used more than once so
178           that N connections total are made simultaneously. Please see -j
179           option too. Please note that in Metalink download, this option has
180           no effect and use -C option instead. Default: 5
181
182       -t, --timeout=SEC
183           Set timeout in seconds. Default: 60
184
185       --uri-selector=SELECTOR
186           Specify URI selection algorithm. The possible values are inorder,
187           feedback and adaptive. If inorder is given, URI is tried in the
188           order appeared in the URI list. If feedback is given, aria2 uses
189           download speed observed in the previous downloads and choose
190           fastest server in the URI list. This also effectively skips dead
191           mirrors. The observed download speed is a part of performance
192           profile of servers mentioned in --server-stat-of and
193           --server-stat-if options. If adaptive is given, selects one of the
194           best mirrors for the first and reserved connections. For
195           supplementary ones, it returns mirrors which has not been tested
196           yet, and if each of them has already been tested, returns mirrors
197           which has to be tested again. Otherwise, it doesn’t select anymore
198           mirrors. Like feedback, it uses a performance profile of servers.
199           Default: feedback
200
201   HTTP Specific Options
202       --ca-certificate=FILE
203           Use the certificate authorities in FILE to verify the peers. The
204           certificate file must be in PEM format and can contain multiple CA
205           certificates. Use --check-certificate option to enable
206           verification.
207
208       --certificate=FILE
209           Use the client certificate in FILE. The certificate must be in PEM
210           format. You may use --private-key option to specify the private
211           key.
212
213       --check-certificate[=true|false]
214           Verify the peer using certificates specified in --ca-certificate
215           option. Default: true
216
217       --http-accept-gzip[=true|false]
218           Send "Accept: deflate, gzip" request header and inflate response if
219           remote server responds with "Content-Encoding: gzip" or
220           "Content-Encoding: deflate". Default: false
221
222           Note
223           Some server responds with "Content-Encoding: gzip" for files which
224           itself is gzipped file. aria2 inflates them anyway because of the
225           response header.
226
227       --http-auth-challenge[=true|false]
228           Send HTTP authorization header only when it is requested by the
229           server. If false is set, then authorization header is always sent
230           to the server. There is an exception: if username and password are
231           embedded in URI, authorization header is always sent to the server
232           regardless of this option. Default: false
233
234       --http-no-cache[=true|false]
235           Send Cache-Control: no-cache and Pragma: no-cache header to avoid
236           cached content. If false is given, these headers are not sent and
237           you can add Cache-Control header with a directive you like using
238           --header option. Default: true
239
240       --http-user=USER
241           Set HTTP user. This affects all URIs.
242
243       --http-passwd=PASSWD
244           Set HTTP password. This affects all URIs.
245
246       --http-proxy=PROXY
247           Use this proxy server for HTTP. To erase previously defined proxy,
248           use "". See also --all-proxy option. This affects all URIs. The
249           format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]
250
251       --http-proxy-passwd=PASSWD
252           Set password for --http-proxy option.
253
254       --http-proxy-user=USER:
255
256           Set user for *--http-proxy* option.
257
258       --https-proxy=PROXY
259           Use this proxy server for HTTPS. To erase previously defined proxy,
260           use "". See also --all-proxy option. This affects all URIs. The
261           format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]
262
263       --https-proxy-passwd=PASSWD
264           Set password for --https-proxy option.
265
266       --https-proxy-user=USER
267           Set user for --https-proxy option.
268
269       --private-key=FILE
270           Use the private key in FILE. The private key must be decrypted and
271           in PEM format. The behavior when encrypted one is given is
272           undefined. See also --certificate option.
273
274       --referer=REFERER
275           Set Referer. This affects all URIs.
276
277       --enable-http-keep-alive[=true|false]
278           Enable HTTP/1.1 persistent connection. Default: true
279
280       --enable-http-pipelining[=true|false]
281           Enable HTTP/1.1 pipelining. Default: false
282
283       --header=HEADER
284           Append HEADER to HTTP request header. You can use this option
285           repeatedly to specify more than one header: aria2c --header="X-A:
286           b78" --header="X-B: 9J1" "http://host/file"
287
288       --load-cookies=FILE
289           Load Cookies from FILE using the Firefox3 format (SQLite3) and the
290           Mozilla/Firefox(1.x/2.x)/Netscape format.
291
292           Note
293           If aria2 is built without libsqlite3, then it doesn’t support
294           Firefox3 cookie format.
295
296       --save-cookies=FILE
297           Save Cookies to FILE in Mozilla/Firefox(1.x/2.x)/ Netscape format.
298           If FILE already exists, it is overwritten. Session Cookies are also
299           saved and their expiry values are treated as 0. Possible Values:
300           /path/to/file
301
302       --use-head[=true|false]
303           Use HEAD method for the first request to the HTTP server. Default:
304           false
305
306       -U, --user-agent=USER_AGENT
307           Set user agent for HTTP(S) downloads. Default: aria2/$VERSION,
308           $VERSION is replaced by package version.
309
310   FTP Specific Options
311       --ftp-user=USER
312           Set FTP user. This affects all URIs. Default: anonymous
313
314       --ftp-passwd=PASSWD
315           Set FTP password. This affects all URIs. If user name is embedded
316           but password is missing in URI, aria2 tries to resolve password
317           using .netrc. If password is found in .netrc, then use it as
318           password. If not, use the password specified in this option.
319           Default: ARIA2USER@
320
321       -p, --ftp-pasv[=true|false]
322           Use the passive mode in FTP. If false is given, the active mode
323           will be used. Default: true
324
325       --ftp-proxy=PROXY
326           Use this proxy server for FTP. To erase previously defined proxy,
327           use "". See also --all-proxy option. This affects all URIs. The
328           format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]
329
330       --ftp-proxy-passwd=PASSWD
331           Set password for --ftp-proxy option.
332
333       --ftp-proxy-user=USER
334           Set user for --ftp-proxy option.
335
336       --ftp-type=TYPE
337           Set FTP transfer type. TYPE is either binary or ascii. Default:
338           binary
339
340       --ftp-reuse-connection[=true|false]
341           Reuse connection in FTP. Default: true
342
343   BitTorrent/Metalink Options
344       --select-file=INDEX...
345           Set file to download by specifying its index. You can find the file
346           index using the --show-files option. Multiple indexes can be
347           specified by using ",", for example: 3,6. You can also use "-" to
348           specify a range: 1-5. "," and "-" can be used together: 1-5,8,9.
349           When used with the -M option, index may vary depending on the query
350           (see --metalink-* options).
351
352           Note
353           In multi file torrent, the adjacent files specified by this option
354           may also be downloaded. This is by design, not a bug. A single
355           piece may include several files or part of files, and aria2 writes
356           the piece to the appropriate files.
357
358       -S, --show-files
359           Print file listing of .torrent or .metalink file and exit. In case
360           of .torrent file, additional information (infohash, piece length,
361           etc) is also printed.
362
363   BitTorrent Specific Options
364       --bt-enable-lpd[=true|false]
365           Enable Local Peer Discovery. If a private flag is set in a torrent,
366           aria2 doesn’t use this feature for that download even if true is
367           given. Default: false
368
369       --bt-external-ip=IPADDRESS
370           Specify the external IP address to report to a BitTorrent tracker.
371           Although this function is named "external", it can accept any kind
372           of IP addresses. IPADDRESS must be a numeric IP address.
373
374       --bt-hash-check-seed[=true|false]
375           If true is given, after hash check using --check-integrity option
376           and file is complete, continue to seed file. If you want to check
377           file and download it only when it is damaged or incomplete, set
378           this option to false. This option has effect only on BitTorrent
379           download. Default: true
380
381       --bt-lpd-interface=INTERFACE
382           Use given interface for Local Peer Discovery. If this option is not
383           specified, the default interface is chosen. You can specify
384           interface name and IP address. Possible Values: interface, IP
385           addres
386
387       --bt-max-open-files=NUM
388           Specify maximum number of files to open in each BitTorrent
389           download. Default: 100
390
391       --bt-max-peers=NUM
392           Specify the maximum number of peers per torrent.  0 means
393           unlimited. See also --bt-request-peer-speed-limit option. Default:
394           55
395
396       --bt-metadata-only[=true|false]
397           Download metadata only. The file(s) described in metadata will not
398           be downloaded. This option has effect only when BitTorrent Magnet
399           URI is used. See also --bt-save-metadata option. Default: false
400
401       --bt-min-crypto-level=plain|arc4
402           Set minimum level of encryption method. If several encryption
403           methods are provided by a peer, aria2 chooses the lowest one which
404           satisfies the given level. Default: plain
405
406       --bt-prioritize-piece=head[=SIZE],tail[=SIZE]
407           Try to download first and last pieces of each file first. This is
408           useful for previewing files. The argument can contain 2 keywords:
409           head and tail. To include both keywords, they must be separated by
410           comma. These keywords can take one parameter, SIZE. For example, if
411           head=SIZE is specified, pieces in the range of first SIZE bytes of
412           each file get higher priority.  tail=SIZE means the range of last
413           SIZE bytes of each file. SIZE can include K or M(1K = 1024, 1M =
414           1024K). If SIZE is omitted, SIZE=1M is used.
415
416       --bt-require-crypto=true|false
417           If true is given, aria2 doesn’t accept and establish connection
418           with legacy BitTorrent handshake(\19BitTorrent protocol). Thus
419           aria2 always uses Obfuscation handshake. Default: false
420
421       --bt-request-peer-speed-limit=SPEED
422           If the whole download speed of every torrent is lower than SPEED,
423           aria2 temporarily increases the number of peers to try for more
424           download speed. Configuring this option with your preferred
425           download speed can increase your download speed in some cases. You
426           can append K or M(1K = 1024, 1M = 1024K). Default: 50K
427
428       --bt-save-metadata[=true|false]
429           Save metadata as .torrent file. This option has effect only when
430           BitTorrent Magnet URI is used. The filename is hex encoded info
431           hash with suffix .torrent. The directory to be saved is the same
432           directory where download file is saved. If the same file already
433           exists, metadata is not saved. See also --bt-metadata-only option.
434           Default: false
435
436       --bt-seed-unverified[=true|false]
437           Seed previously downloaded files without verifying piece hashes.
438           Default: false
439
440       --bt-stop-timeout=SEC
441           Stop BitTorrent download if download speed is 0 in consecutive SEC
442           seconds. If 0 is given, this feature is disabled. Default: 0
443
444       --bt-tracker-connect-timeout=SEC
445           Set the connect timeout in seconds to establish connection to
446           tracker. After the connection is established, this option makes no
447           effect and --bt-tracker-timeout option is used instead. Default: 60
448
449       --bt-tracker-interval=SEC
450           Set the interval in seconds between tracker requests. This
451           completely overrides interval value and aria2 just uses this value
452           and ignores the min interval and interval value in the response of
453           tracker. If 0 is set, aria2 determines interval based on the
454           response of tracker and the download progress. Default: 0
455
456       --bt-tracker-timeout=SEC
457           Set timeout in seconds. Default: 60
458
459       --dht-entry-point=HOST:PORT
460           Set host and port as an entry point to DHT network.
461
462       --dht-file-path=PATH
463           Change the DHT routing table file to PATH. Default:
464           $HOME/.aria2/dht.dat
465
466       --dht-listen-port=PORT...
467           Set UDP listening port for DHT. Multiple ports can be specified by
468           using ",", for example: 6881,6885. You can also use "-" to specify
469           a range: 6881-6999. "," and "-" can be used together. Default:
470           6881-6999
471
472           Note
473           Make sure that the specified ports are open for incoming UDP
474           traffic.
475
476       --dht-message-timeout=SEC
477           Set timeout in seconds. Default: 10
478
479       --enable-dht[=true|false]
480           Enable DHT functionality. If a private flag is set in a torrent,
481           aria2 doesn’t use DHT for that download even if true is given.
482           Default: true
483
484       --enable-peer-exchange[=true|false]
485           Enable Peer Exchange extension. If a private flag is set in a
486           torrent, this feature is disabled for that download even if true is
487           given. Default: true
488
489       --follow-torrent=true|false|mem
490           If true or mem is specified, when a file whose suffix is ".torrent"
491           or content type is "application/x-bittorrent" is downloaded, aria2
492           parses it as a torrent file and downloads files mentioned in it. If
493           mem is specified, a torrent file is not written to the disk, but is
494           just kept in memory. If false is specified, the action mentioned
495           above is not taken. Default: true
496
497       -O, --index-out=INDEX=PATH
498           Set file path for file with index=INDEX. You can find the file
499           index using the --show-files option. PATH is a relative path to the
500           path specified in --dir option. You can use this option multiple
501           times. Using this option, you can specify the output filenames of
502           BitTorrent downloads.
503
504       --listen-port=PORT...
505           Set TCP port number for BitTorrent downloads. Multiple ports can be
506           specified by using ",", for example: 6881,6885. You can also use
507           "-" to specify a range: 6881-6999. "," and "-" can be used
508           together: 6881-6889,6999. Default: 6881-6999
509
510           Note
511           Make sure that the specified ports are open for incoming TCP
512           traffic.
513
514       --max-overall-upload-limit=SPEED
515           Set max overall upload speed in bytes/sec.  0 means unrestricted.
516           You can append K or M(1K = 1024, 1M = 1024K). To limit the upload
517           speed per torrent, use --max-upload-limit option. Default: 0
518
519       -u, --max-upload-limit=SPEED
520           Set max upload speed per each torrent in bytes/sec.  0 means
521           unrestricted. You can append K or M(1K = 1024, 1M = 1024K). To
522           limit the overall upload speed, use --max-overall-upload-limit
523           option. Default: 0
524
525       --peer-id-prefix=PEER_ID_PREFIX
526           Specify the prefix of peer ID. The peer ID in BitTorrent is 20 byte
527           length. If more than 20 bytes are specified, only first 20 bytes
528           are used. If less than 20 bytes are specified, random byte data are
529           added to make its length 20 bytes. Default: aria2/$VERSION-,
530           $VERSION is replaced by package version.
531
532       --seed-ratio=RATIO
533           Specify share ratio. Seed completed torrents until share ratio
534           reaches RATIO. You are strongly encouraged to specify equals or
535           more than 1.0 here. Specify 0.0 if you intend to do seeding
536           regardless of share ratio. If --seed-time option is specified along
537           with this option, seeding ends when at least one of the conditions
538           is satisfied. Default: 1.0
539
540       --seed-time=MINUTES
541           Specify seeding time in minutes. Also see the --seed-ratio option.
542
543           Note
544           Specifying --seed-time=0 disables seeding after download completed.
545
546       -T, --torrent-file=TORRENT_FILE
547           The path to the .torrent file. You are not required to use this
548           option because you can specify .torrent files without -T.
549
550   Metalink Specific Options
551       --follow-metalink=true|false|mem
552           If true or mem is specified, when a file whose suffix is
553           ".metalink" or content type of "application/metalink+xml" is
554           downloaded, aria2 parses it as a metalink file and downloads files
555           mentioned in it. If mem is specified, a metalink file is not
556           written to the disk, but is just kept in memory. If false is
557           specified, the action mentioned above is not taken. Default: true
558
559       -M, --metalink-file=METALINK_FILE
560           The file path to .metalink file. Reads input from stdin when - is
561           specified. You are not required to use this option because you can
562           specify .metalink files without -M.
563
564       -C, --metalink-servers=NUM_SERVERS
565           The number of servers to connect to simultaneously. Some Metalinks
566           regulate the number of servers to connect. aria2 strictly respects
567           them. This means that if Metalink defines the maxconnections
568           attribute lower than NUM_SERVERS, then aria2 uses the value of
569           maxconnections attribute instead of NUM_SERVERS. See also -s and -j
570           options. Default: 5
571
572       --metalink-language=LANGUAGE
573           The language of the file to download.
574
575       --metalink-location=LOCATION[,...]
576           The location of the preferred server. A comma-delimited list of
577           locations is acceptable, for example, jp,us.
578
579       --metalink-os=OS
580           The operating system of the file to download.
581
582       --metalink-version=VERSION
583           The version of the file to download.
584
585       --metalink-preferred-protocol=PROTO
586           Specify preferred protocol. The possible values are http, https,
587           ftp and none. Specify none to disable this feature. Default: none
588
589       --metalink-enable-unique-protocol=true|false
590           If true is given and several protocols are available for a mirror
591           in a metalink file, aria2 uses one of them. Use
592           --metalink-preferred-protocol option to specify the preference of
593           protocol. Default: true
594
595   XML-RPC Options
596       --enable-xml-rpc[=true|false]
597           Enable XML-RPC server. It is strongly recommended to set username
598           and password using --xml-rpc-user and --xml-rpc-passwd option. See
599           also --xml-rpc-listen-port option. Default: false
600
601       --xml-rpc-listen-all[=true|false]
602           Listen incoming XML-RPC requests on all network interfaces. If
603           false is given, listen only on local loopback interface. Default:
604           false
605
606       --xml-rpc-listen-port=PORT
607           Specify a port number for XML-RPC server to listen to. Possible
608           Values: 1024-65535 Default: 6800
609
610       --xml-rpc-max-request-size=SIZE
611           Set max size of XML-RPC request. If aria2 detects the request is
612           more than SIZE bytes, it drops connection. Default: 2M
613
614       --xml-rpc-passwd=PASSWD
615           Set XML-RPC password.
616
617       --xml-rpc-user=USER
618           Set XML-RPC user.
619
620   Advanced Options
621       --allow-overwrite=true|false
622           Restart download from scratch if the corresponding control file
623           doesn’t exist. See also --auto-file-renaming option. Default: false
624
625       --allow-piece-length-change=true|false
626           If false is given, aria2 aborts download when a piece length is
627           different from one in a control file. If true is given, you can
628           proceed but some download progress will be lost. Default: false
629
630       --always-resume[=true|false]
631           Always resume download. If true is given, aria2 always tries to
632           resume download and if resume is not possible, aborts download. If
633           false is given, when all given URIs do not support resume or aria2
634           encounters N URIs which does not support resume (N is the value
635           specified using --max-resume-failure-tries option), aria2 downloads
636           file from scratch. See --max-resume-failure-tries option. Default:
637           true
638
639       --async-dns[=true|false]
640           Enable asynchronous DNS. Default: true
641
642       --auto-file-renaming[=true|false]
643           Rename file name if the same file already exists. This option works
644           only in HTTP(S)/FTP download. The new file name has a dot and a
645           number(1..9999) appended. Default: true
646
647       --auto-save-interval=SEC
648           Save a control file(*.aria2) every SEC seconds. If 0 is given, a
649           control file is not saved during download. aria2 saves a control
650           file when it stops regardless of the value. The possible values are
651           between 0 to 600. Default: 60
652
653       --conf-path=PATH
654           Change the configuration file path to PATH. Default:
655           $HOME/.aria2/aria2.conf
656
657       -D, --daemon
658           Run as daemon. The current working directory will be changed to /
659           and standard input, standard output and standard error will be
660           redirected to /dev/null. Default: false
661
662       --disable-ipv6[=true|false]
663           Disable IPv6. This is useful if you have to use broken DNS and want
664           to avoid terribly slow AAAA record lookup. Default: false
665
666       --enable-direct-io[=true|false]
667           Enable directI/O, which lowers cpu usage while allocating/checking
668           files. Turn off if you encounter any error. Default: true
669
670       --event-poll=POLL
671           Specify the method for polling events. The possible values are
672           epoll, kqueue, port, poll and select. For each epoll, kqueue, port
673           and poll, it is available if system supports it.  epoll is
674           available on recent Linux.  kqueue is available on various *BSD
675           systems including Mac OS X.  port is available on Open Solaris. The
676           default value may vary depending on the system you use.
677
678       --file-allocation=METHOD
679           Specify file allocation method.  none doesn’t pre-allocate file
680           space.  prealloc pre-allocates file space before download begins.
681           This may take some time depending on the size of the file. If you
682           are using newer file systems such as ext4 (with extents support),
683           btrfs or xfs, falloc is your best choice. It allocates large(few
684           GiB) files almost instantly. Don’t use falloc with legacy file
685           systems such as ext3 because it takes almost same time as prealloc
686           and it blocks aria2 entirely until allocation finishes.  falloc may
687           not be available if your system doesn’t have posix_fallocate()
688           function. Possible Values: none, prealloc, falloc Default: prealloc
689
690       --human-readable[=true|false]
691           Print sizes and speed in human readable format (e.g., 1.2Ki, 3.4Mi)
692           in the console readout. Default: true
693
694       --interface=INTERFACE
695           Bind sockets to given interface. You can specify interface name, IP
696           address and hostname. Possible Values: interface, IP address,
697           hostname
698
699           Note
700           If an interface has multiple addresses, it is highly recommended to
701           specify IP address explicitly. See also --disable-ipv6. If your
702           system doesn’t have getifaddrs(), this option doesn’t accept
703           interface name.
704
705       --max-resume-failure-tries=N
706           When used with --always-resume=false, aria2 downloads file from
707           scratch when aria2 detects N number of URIs that does not support
708           resume. If N is 0, aria2 downloads file from scratch when all given
709           URIs do not support resume. See --always-resume option. Default: 0
710
711       --log-level=LEVEL
712           Set log level to output. LEVEL is either debug, info, notice, warn
713           or error. Default: debug
714
715       --on-download-complete=COMMAND
716           Set the command to be executed when download completes. See
717           --on-download-start option for the requirement of COMMAND. See also
718           --on-download-stop option. Possible Values: /path/to/command
719
720       --on-download-error=COMMAND
721           Set the command to be executed when download aborts due to error.
722           See --on-download-start option for the requirement of COMMAND. See
723           also --on-download-stop option. Possible Values: /path/to/command
724
725       --on-download-pause=COMMAND
726           Set the command to be executed when download is paused. See
727           --on-download-start option for the requirement of COMMAND. Possible
728           Values: /path/to/command
729
730       --on-download-start=COMMAND
731           Set the command to be executed when download starts up. COMMAND
732           must take just one argument and GID is passed to COMMAND as a first
733           argument. Possible Values: /path/to/command
734
735       --on-download-stop=COMMAND
736           Set the command to be executed when download stops. You can
737           override the command to be executed for particular download result
738           using --on-download-complete and --on-download-error. If they are
739           specified, command specified in this option is not executed. See
740           --on-download-start option for the requirement of COMMAND. Possible
741           Values: /path/to/command
742
743       --summary-interval=SEC
744           Set interval in seconds to output download progress summary.
745           Setting 0 suppresses the output. Default: 60
746
747           Note
748           In multi file torrent downloads, the files adjacent forward to the
749           specified files are also allocated if they share the same piece.
750
751       -Z, --force-sequential[=true|false]
752           Fetch URIs in the command-line sequentially and download each URI
753           in a separate session, like the usual command-line download
754           utilities. Default: false
755
756       --max-overall-download-limit=SPEED
757           Set max overall download speed in bytes/sec.  0 means unrestricted.
758           You can append K or M(1K = 1024, 1M = 1024K). To limit the download
759           speed per download, use --max-download-limit option. Default: 0
760
761       --max-download-limit=SPEED
762           Set max download speed per each download in bytes/sec.  0 means
763           unrestricted. You can append K or M(1K = 1024, 1M = 1024K). To
764           limit the overall download speed, use --max-overall-download-limit
765           option. Default: 0
766
767       --no-conf
768           Disable loading aria2.conf file.
769
770       --no-file-allocation-limit=SIZE
771           No file allocation is made for files whose size is smaller than
772           SIZE. You can append K or M(1K = 1024, 1M = 1024K). Default: 5M
773
774       -P, --parameterized-uri[=true|false]
775           Enable parameterized URI support. You can specify set of parts:
776           http://{sv1,sv2,sv3}/foo.iso. Also you can specify numeric
777           sequences with step counter: http://host/image[000-100:2].img. A
778           step counter can be omitted. If all URIs do not point to the same
779           file, such as the second example above, -Z option is required.
780           Default: false
781
782       -q, --quiet[=true|false]
783           Make aria2 quiet (no console output). Default: false
784
785       --realtime-chunk-checksum=true|false
786           Validate chunk of data by calculating checksum while downloading a
787           file if chunk checksums are provided. Default: true
788
789       --remove-control-file[=true|false]
790           Remove control file before download. Using with
791           --allow-overwrite=true, download always starts from scratch. This
792           will be useful for users behind proxy server which disables resume.
793
794           Note
795           For Metalink downloads, -C1 is recommended for proxy server which
796           disables resume, in order to avoid establishing unnecessary
797           connections.
798
799       --save-session=FILE
800           Save error/unfinished downloads to FILE on exit. You can pass this
801           output file to aria2c with -i option on restart. Please note that
802           downloads added by aria2.addTorrent and aria2.addMetalink XML-RPC
803           method are not saved.
804
805       --stop=SEC
806           Stop application after SEC seconds has passed. If 0 is given, this
807           feature is disabled. Default: 0
808
809       -v, --version
810           Print the version number, copyright and the configuration
811           information and exit.
812
813   Options That Take An Optional Argument
814       The options that have its argument surrounded by square brackets([])
815       take an optional argument. Usually omiting the argument is evaluated to
816       true. If you use short form of these options(such as -V) and give an
817       argument, then the option name and its argument should be
818       concatenated(e.g. -Vfalse). If any spaces are inserted between the
819       option name and the argument, the argument will be treated as URI and
820       usually this is not what you expect.
821
822   URI, MAGNET, TORRENT_FILE, METALINK_FILE
823       You can specify multiple URIs in command-line. Unless you specify -Z
824       option, all URIs must point to the same file or downloading will fail.
825
826       You can specify arbitrary number of BitTorrent Magnet URI. Please note
827       that they are always treated as a separate download. Both hex encoded
828       40 characters Info Hash and Base32 encoded 32 characters Info Hash are
829       supported. The multiple "tr" parameters are supported. Because
830       BitTorrent Magnet URI is likely to contain "&" character, it is highly
831       recommended to always quote URI with single(') or double(") quotation.
832       It is strongly recommended to enable DHT especially when "tr" parameter
833       is missing. See http://www.bittorrent.org/beps/bep_0009.html for more
834       details about BitTorrent Magnet URI.
835
836       You can also specify arbitrary number of torrent files and Metalink
837       documents stored on a local drive. Please note that they are always
838       treated as a separate download. Both Metalink4 and Metalink version 3.0
839       are supported.
840
841       You can specify both torrent file with -T option and URIs. By doing
842       this, you can download a file from both torrent swarm and HTTP(S)/FTP
843       server at the same time, while the data from HTTP(S)/FTP are uploaded
844       to the torrent swarm. For single file torrents, URI can be a complete
845       URI pointing to the resource or if URI ends with /, name in torrent
846       file in torrent is added. For multi-file torrents, name and path are
847       added to form a URI for each file.
848
849           Note
850           Make sure that URI is quoted with single(') or double(") quotation
851           if it contains "&" or any characters that have special meaning in
852           shell.
853
854   Resuming Download
855       Usually, you can resume transfer by just issuing same command(aria2c
856       URI) if the previous transfer is made by aria2.
857
858       If the previous transfer is made by a browser or wget like sequential
859       download manager, then use -c option to continue the transfer(aria2c -c
860       URI).
861

EXIT STATUS

863       Because aria2 can handle multiple downloads at once, it encounters lots
864       of errors in a session. aria2 returns the following exit status based
865       on the last error encountered.
866
867       0
868           If all downloads are successful.
869
870       1
871           If an unknown error occurs.
872
873       2
874           If time out occurs.
875
876       3
877           If a resource is not found.
878
879       4
880           If aria2 sees the specfied number of "resource not found" error.
881           See --max-file-not-found option).
882
883       5
884           If a download aborts because download speed is too slow. See
885           --lowest-speed-limit option)
886
887       6
888           If network problem occurs.
889
890       7
891           If there are unfinished downloads. This error is only reported if
892           all finished downloads are successful and there are unfinished
893           downloads in a queue when aria2 exits by pressing Ctrl-C by an user
894           or sending TERM or INT signal.
895
896       8
897           If server does not support resume when resume is required to
898           complete download.
899
900           Note
901           An error occurred in a finished download will not be reported as
902           exit status.
903

ENVIRONMENT

905       aria2 recognizes the following environment variables.
906
907       http_proxy [http://][USER:PASSWORD@]HOST[:PORT]
908           Specify proxy server for use in HTTP. Overrides http-proxy value in
909           configuration file. The command-line option --http-proxy overrides
910           this value.
911
912       https_proxy [http://][USER:PASSWORD@]HOST[:PORT]
913           Specify proxy server for use in HTTPS. Overrides https-proxy value
914           in configuration file. The command-line option --https-proxy
915           overrides this value.
916
917       ftp_proxy [http://][USER:PASSWORD@]HOST[:PORT]
918           Specify proxy server for use in FTP. Overrides ftp-proxy value in
919           configuration file. The command-line option --ftp-proxy overrides
920           this value.
921
922       all_proxy [http://][USER:PASSWORD@]HOST[:PORT]
923           Specify proxy server for use if no protocol-specific proxy is
924           specified. Overrides all-proxy value in configuration file. The
925           command-line option --all-proxy overrides this value.
926
927       no_proxy [DOMAIN,...]
928           Specify comma-separated hostname, domains and network address with
929           or without CIDR block to which proxy should not be used. Overrides
930           no-proxy value in configuration file. The command-line option
931           --no-proxy overrides this value.
932

FILES

934   aria2.conf
935       By default, aria2 parses $HOME/.aria2/aria2.conf as a configuraiton
936       file. You can specify the path to configuration file using --conf-path
937       option. If you don’t want to use the configuraitonf file, use --no-conf
938       option.
939
940       The configuration file is a text file and has 1 option per each line.
941       In each line, you can specify name-value pair in the format:
942       NAME=VALUE, where name is the long command-line option name without
943       "--" prefix. You can use same syntax for the command-line option. The
944       lines beginning "#" are treated as comments.
945
946           # sample configuration file for aria2c
947           listen-port=60000
948           dht-listen-port=60000
949           seed-ratio=1.0
950           max-upload-limit=50K
951           ftp-pasv=true
952
953   dht.dat
954       By default, the routing table of DHT is saved to the path
955       $HOME/.aria2/dht.dat.
956
957   Control File
958       aria2 uses a control file to track the progress of a download. A
959       control file is placed in the same directory as the downloading file
960       and its filename is the filename of downloading file with ".aria2"
961       appended. For example, if you are downloading file.zip, then the
962       control file should be file.zip.aria2. (There is a exception for this
963       naming convention. If you are downloading a multi torrent, its control
964       file is the "top directory" name of the torrent with ".aria2" appended.
965       The "top directory" name is a value of "name" key in "info" directory
966       in a torrent file.)
967
968       Usually a control file is deleted once download completed. If aria2
969       decides that download cannot be resumed(for example, when downloading a
970       file from a HTTP server which doesn’t support resume), a control file
971       is not created.
972
973       Normally if you lose a control file, you cannot resume download. But if
974       you have a torrent or metalink with chunk checksums for the file, you
975       can resume the download without a control file by giving -V option to
976       aria2c in command-line.
977
978   Input File
979       The input file can contain a list of URIs for aria2 to download. You
980       can specify multiple URIs for a single entity: separate URIs on a
981       single line using the TAB character.
982
983       Each line is treated as if it is provided in command-line argument.
984       Therefore they are affected by -Z and -P options.
985
986       Lines starting with "#" are treated as comments and skipped.
987
988       Additionally, the following options can be specified after each line of
989       URIs. These optional lines must start with white space(s).
990
991       ·   dir
992
993       ·   check-integrity
994
995       ·   continue
996
997       ·   all-proxy
998
999       ·   all-proxy-user
1000
1001       ·   all-proxy-passwd
1002
1003       ·   connect-timeout
1004
1005       ·   dry-run
1006
1007       ·   lowest-speed-limit
1008
1009       ·   max-file-not-found
1010
1011       ·   max-tries
1012
1013       ·   no-proxy
1014
1015       ·   out
1016
1017       ·   proxy-method
1018
1019       ·   remote-time
1020
1021       ·   split
1022
1023       ·   timeout
1024
1025       ·   http-auth-challenge
1026
1027       ·   http-no-cache
1028
1029       ·   http-user
1030
1031       ·   http-passwd
1032
1033       ·   http-proxy
1034
1035       ·   http-proxy-user
1036
1037       ·   http-proxy-passwd
1038
1039       ·   https-proxy
1040
1041       ·   https-proxy-user
1042
1043       ·   https-proxy-passwd
1044
1045       ·   referer
1046
1047       ·   enable-http-keep-alive
1048
1049       ·   enable-http-pipelining
1050
1051       ·   header
1052
1053       ·   use-head
1054
1055       ·   user-agent
1056
1057       ·   ftp-user
1058
1059       ·   ftp-passwd
1060
1061       ·   ftp-pasv
1062
1063       ·   ftp-proxy
1064
1065       ·   ftp-proxy-user
1066
1067       ·   ftp-proxy-passwd
1068
1069       ·   ftp-type
1070
1071       ·   ftp-reuse-connection
1072
1073       ·   no-netrc
1074
1075       ·   reuse-uri
1076
1077       ·   select-file
1078
1079       ·   bt-enable-lpd
1080
1081       ·   bt-external-ip
1082
1083       ·   bt-hash-check-seed
1084
1085       ·   bt-max-open-files
1086
1087       ·   bt-max-peers
1088
1089       ·   bt-metadata-only
1090
1091       ·   bt-min-crypto-level
1092
1093       ·   bt-prioritize-piece
1094
1095       ·   bt-require-crypto
1096
1097       ·   bt-request-peer-speed-limit
1098
1099       ·   bt-save-metadata
1100
1101       ·   bt-seed-unverified
1102
1103       ·   bt-stop-timeout
1104
1105       ·   bt-tracker-interval
1106
1107       ·   bt-tracker-timeout
1108
1109       ·   bt-tracker-connect-timeout
1110
1111       ·   enable-peer-exchange
1112
1113       ·   follow-torrent
1114
1115       ·   index-out
1116
1117       ·   max-upload-limit
1118
1119       ·   seed-ratio
1120
1121       ·   seed-time
1122
1123       ·   follow-metalink
1124
1125       ·   metalink-servers
1126
1127       ·   metalink-language
1128
1129       ·   metalink-location
1130
1131       ·   metalink-os
1132
1133       ·   metalink-version
1134
1135       ·   metalink-preferred-protocol
1136
1137       ·   metalink-enable-unique-protocol
1138
1139       ·   allow-overwrite
1140
1141       ·   allow-piece-length-change
1142
1143       ·   async-dns
1144
1145       ·   auto-file-renaming
1146
1147       ·   file-allocation
1148
1149       ·   max-download-limit
1150
1151       ·   no-file-allocation-limit
1152
1153       ·   parameterized-uri
1154
1155       ·   realtime-chunk-checksum
1156
1157       ·   remove-control-file
1158
1159       ·   always-resume
1160
1161       ·   max-resume-failure-tries
1162
1163       ·   http-accept-gzip
1164
1165       These options have exactly same meaning of the ones in the command-line
1166       options, but it just applies to the URIs it belongs to.
1167
1168       For example, the content of uri.txt is
1169
1170           http://server/file.iso http://mirror/file.iso
1171             dir=/iso_images
1172             out=file.img
1173           http://foo/bar
1174
1175       If aria2 is executed with -i uri.txt -d /tmp options, then file.iso is
1176       saved as /iso_images/file.img and it is downloaded from
1177       http://server/file.iso and http://mirror/file.iso. The file bar is
1178       downloaded from http://foo/bar and saved as /tmp/bar.
1179
1180       In some cases, out parameter has no effect. See note of --out option
1181       for the restrictions.
1182
1183   Server Performance Profile
1184       This section describes the format of server performance profile. The
1185       file is plain text and each line has several NAME=VALUE pair, delimited
1186       by comma. Currently following NAMEs are recognized:
1187
1188       host
1189           Hostname of the server. Required.
1190
1191       protocol
1192           Protocol for this profile, such as ftp, http. Required.
1193
1194       dl_speed
1195           The average download speed observed in the previous download in
1196           bytes per sec. Required.
1197
1198       sc_avg_speed
1199           The average download speed observed in the previous download in
1200           bytes per sec. This value is only updated if the download is done
1201           in single connection environment and only used by
1202           AdaptiveURISelector. Optional.
1203
1204       mc_avg_speed
1205           The average download speed observed in the previous download in
1206           bytes per sec. This value is only updated if the download is done
1207           in multi connection environment and only used by
1208           AdaptiveURISelector. Optional.
1209
1210       counter
1211           How many times the server is used. Currently this value is only
1212           used by AdaptiveURISelector. Optional.
1213
1214       last_updated
1215           Last contact time in GMT with this server, specified in the seconds
1216           since the Epoch(00:00:00 on January 1, 1970, UTC). Required.
1217
1218       status
1219           ERROR is set when server cannot be reached or out-of-service or
1220           timeout occurred. Otherwise, OK is set.
1221
1222       Those fields must exist in one line. The order of the fields is not
1223       significant. You can put pairs other than the above; they are simply
1224       ignored.
1225
1226       An example follows:
1227
1228           host=localhost, protocol=http, dl_speed=32000, last_updated=1222491640, status=OK
1229           host=localhost, protocol=ftp, dl_speed=0, last_updated=1222491632, status=ERROR
1230

XML-RPC INTERFACE

1232   Terminology
1233       GID
1234           GID(or gid) is the key to manage each download. Each download has
1235           an unique GID. Currently GID looks like an integer, but don’t treat
1236           it as integer because it may be changed to another type in the
1237           future release. Please note that GID is session local and not
1238           persisted when aria2 exits.
1239
1240   Methods
1241       aria2.addUri uris[, options[, position]]
1242
1243       This method adds new HTTP(S)/FTP/BitTorrent Magnet URI. uris is of type
1244       array and its element is URI which is of type string. For BitTorrent
1245       Magnet URI, uris must have only one element and it should be BitTorrent
1246       Magnet URI. options is of type struct and its members are a pair of
1247       option name and value. See Options below for more details. If position
1248       is given as an integer starting from 0, the new download is inserted at
1249       position in the waiting queue. If position is not given or position is
1250       larger than the size of the queue, it is appended at the end of the
1251       queue. This method returns GID of registered download.
1252
1253       aria2.addTorrent torrent[, uris[, options[, position]]]
1254
1255       This method adds BitTorrent download by uploading .torrent file. If you
1256       want to add BitTorrent Magnet URI, use aria2.addUri method instead.
1257       torrent is of type base64 which contains Base64-encoded .torrent file.
1258       uris is of type array and its element is URI which is of type string.
1259       uris is used for Web-seeding. For single file torrents, URI can be a
1260       complete URI pointing to the resource or if URI ends with /, name in
1261       torrent file is added. For multi-file torrents, name and path in
1262       torrent are added to form a URI for each file. options is of type
1263       struct and its members are a pair of option name and value. See Options
1264       below for more details. If position is given as an integer starting
1265       from 0, the new download is inserted at position in the waiting queue.
1266       If position is not given or position is larger than the size of the
1267       queue, it is appended at the end of the queue. This method returns GID
1268       of registered download. Please note that the downloads added by this
1269       method are not saved by --save-session.
1270
1271       aria2.addMetalink metalink[, options[, position]]
1272
1273       This method adds Metalink download by uploading .metalink file.
1274       metalink is of type base64 which contains Base64-encoded .metalink
1275       file. options is of type struct and its members are a pair of option
1276       name and value. See Options below for more details. If position is
1277       given as an integer starting from 0, the new download is inserted at
1278       position in the waiting queue. If position is not given or position is
1279       larger than the size of the queue, it is appended at the end of the
1280       queue. This method returns array of GID of registered download. Please
1281       note that the downloads added by this method are not saved by
1282       --save-session.
1283
1284       aria2.remove gid
1285
1286       This method removes the download denoted by gid. gid is of type string.
1287       If specified download is in progress, it is stopped at first. The
1288       status of removed download becomes "removed". This method returns GID
1289       of removed download.
1290
1291       aria2.forceRemove gid
1292
1293       This method removes the download denoted by gid. This method behaves
1294       just like aria2.remove except that this method removes download without
1295       any action which takes time such as contacting BitTorrent tracker.
1296
1297       aria2.pause gid
1298
1299       This method pauses the download denoted by gid. gid is of type string.
1300       The status of paused download becomes "paused". If the download is
1301       active, the download is placed on the first position of waiting queue.
1302       As long as the status is "paused", the download is not started. To
1303       change status to "waiting", use aria2.unpause method. This method
1304       returns GID of paused download.
1305
1306       aria2.pauseAll
1307
1308       This method is equal to calling aria2.pause for every active/waiting
1309       download. This methods returns "OK" for success.
1310
1311       aria2.forcePause pid
1312
1313       This method pauses the download denoted by gid. This method behaves
1314       just like aria2.pause except that this method pauses download without
1315       any action which takes time such as contacting BitTorrent tracker.
1316
1317       aria2.forcePauseAll
1318
1319       This method is equal to calling aria2.forcePause for every
1320       active/waiting download. This methods returns "OK" for success.
1321
1322       aria2.unpause gid
1323
1324       This method changes the status of the download denoted by gid from
1325       "paused" to "waiting". This makes the download eligible to restart. gid
1326       is of type string. This method returns GID of unpaused download.
1327
1328       aria2.unpauseAll
1329
1330       This method is equal to calling aria2.unpause for every active/waiting
1331       download. This methods returns "OK" for success.
1332
1333       aria2.tellStatus gid
1334
1335       This method returns download progress of the download denoted by gid.
1336       gid is of type string. The response is of type struct and it contains
1337       following keys. The value type is string.
1338
1339       gid
1340           GID of this download.
1341
1342       status
1343           "active" for currently downloading/seeding entry. "waiting" for the
1344           entry in the queue; download is not started. "paused" for the
1345           paused entry. "error" for the stopped download because of error.
1346           "complete" for the stopped and completed download. "removed" for
1347           the download removed by user.
1348
1349       totalLength
1350           Total length of this download in bytes.
1351
1352       completedLength
1353           Completed length of this download in bytes.
1354
1355       uploadLength
1356           Uploaded length of this download in bytes.
1357
1358       bitfield
1359           Hexadecimal representation of the download progress. The highest
1360           bit corresponds to piece index 0. The set bits indicate the piece
1361           is available and unset bits indicate the piece is missing. The
1362           spare bits at the end are set to zero. When download has not
1363           started yet, this key will not be included in the response.
1364
1365       downloadSpeed
1366           Download speed of this download measured in bytes/sec.
1367
1368       uploadSpeed
1369           Upload speed of this download measured in bytes/sec.
1370
1371       infoHash
1372           InfoHash. BitTorrent only.
1373
1374       numSeeders
1375           The number of seeders the client has connected to. BitTorrent only.
1376
1377       pieceLength
1378           Piece length in bytes.
1379
1380       numPieces
1381           The number of pieces.
1382
1383       connections
1384           The number of peers/servers the client has connected to.
1385
1386       errorCode
1387           The last error code occurred in this download. The value is of type
1388           string. The error codes are defined in EXIT STATUS section. This
1389           value is only available for stopped/completed downloads.
1390
1391       followedBy
1392           List of GIDs which are generated by the consequence of this
1393           download. For example, when aria2 downloaded Metalink file, it
1394           generates downloads described in it(see --follow-metalink option).
1395           This value is useful to track these auto generated downloads. If
1396           there is no such downloads, this key will not be included in the
1397           response.
1398
1399       belongsTo
1400           GID of a parent download. Some downloads are a part of another
1401           download. For example, if a file in Metalink has BitTorrent
1402           resource, the download of .torrent is a part of that file. If this
1403           download has no parent, this key will not be included in the
1404           response.
1405
1406       dir
1407           Directory to save files. This key is not available for stopped
1408           downloads.
1409
1410       files
1411           Returns the list of files. The element of list is the same struct
1412           used in aria2.getFiles method.
1413
1414       bittorrent
1415           Struct which contains information retrieved from .torrent file.
1416           BitTorrent only. It contains following keys.
1417
1418           announceList
1419               List of lists of announce URI. If .torrent file contains
1420               announce and no announce-list, announce is converted to
1421               announce-list format.
1422
1423           comment
1424               The comment for the torrent. comment.utf-8 is used if
1425               available.
1426
1427           creationDate
1428               The creation time of the torrent. The value is an integer since
1429               the Epoch, measured in seconds.
1430
1431           mode
1432               File mode of the torrent. The value is either single or multi.
1433
1434           info
1435               Struct which contains data from Info dictionary. It contains
1436               following keys.
1437
1438               name
1439                   name in info dictionary. name.utf-8 is used if available.
1440
1441       aria2.getUris gid
1442
1443       This method returns URIs used in the download denoted by gid. gid is of
1444       type string. The response is of type array and its element is of type
1445       struct and it contains following keys. The value type is string.
1446
1447       uri
1448           URI
1449
1450       status
1451
1452           used if the URI is already used.  waiting if the URI is waiting in
1453           the queue.
1454
1455       aria2.getFiles gid
1456
1457       This method returns file list of the download denoted by gid. gid is of
1458       type string. The response is of type array and its element is of type
1459       struct and it contains following keys. The value type is string.
1460
1461       index
1462           Index of file. Starting with 1. This is the same order with the
1463           files in multi-file torrent.
1464
1465       path
1466           File path.
1467
1468       length
1469           File size in bytes.
1470
1471       selected
1472           "true" if this file is selected by --select-file option. If
1473           --select-file is not specified or this is single torrent or no
1474           torrent download, this value is always "true". Otherwise "false".
1475
1476       uris
1477           Returns the list of URI for this file. The element of list is the
1478           same struct used in aria2.getUris method.
1479
1480       aria2.getPeers gid
1481
1482       This method returns peer list of the download denoted by gid. gid is of
1483       type string. This method is for BitTorrent only. The response is of
1484       type array and its element is of type struct and it contains following
1485       keys. The value type is string.
1486
1487       peerId
1488           Percent-encoded peer ID.
1489
1490       ip
1491           IP address of the peer.
1492
1493       port
1494           Port number of the peer.
1495
1496       bitfield
1497           Hexadecimal representation of the download progress of the peer.
1498           The highest bit corresponds to piece index 0. The set bits indicate
1499           the piece is available and unset bits indicate the piece is
1500           missing. The spare bits at the end are set to zero.
1501
1502       amChoking
1503           "true" if this client is choking the peer. Otherwise "false".
1504
1505       peerChoking
1506           "true" if the peer is choking this client. Otherwise "false".
1507
1508       downloadSpeed
1509           Download speed (byte/sec) that this client obtains from the peer.
1510
1511       uploadSpeed
1512           Upload speed(byte/sec) that this client uploads to the peer.
1513
1514       seeder
1515           "true" is this client is a seeder. Otherwise "false".
1516
1517       aria2.getServers gid
1518
1519       This method returns currently connected HTTP(S)/FTP servers of the
1520       download denoted by gid. gid is of type string. The response is of type
1521       array and its element is of type struct and it contains following keys.
1522       The value type is string.
1523
1524       index
1525           Index of file. Starting with 1. This is the same order with the
1526           files in multi-file torrent.
1527
1528       servers
1529           The list of struct which contains following keys.
1530
1531           uri
1532               URI originally added.
1533
1534           currentUri
1535               This is the URI currently used for downloading. If redirection
1536               is involved, currentUri and uri may differ.
1537
1538           downloadSpeed
1539               Download speed (byte/sec)
1540
1541       aria2.tellActive
1542
1543       This method returns the list of active downloads. The response is of
1544       type array and its element is the same struct returned by
1545       aria2.tellStatus method.
1546
1547       aria2.tellWaiting offset, num
1548
1549       This method returns the list of waiting download, including paused
1550       downloads. offset is of type integer and specifies the offset from the
1551       download waiting at the front. num is of type integer and specifies the
1552       number of downloads to be returned.
1553
1554       If offset is a positive integer, this method returns downloads in the
1555       range of [offset, offset+num).
1556
1557       offset can be a negative integer. offset == -1 points last download in
1558       the waiting queue and offset == -2 points the download before the last
1559       download, and so on. The downloads in the response are in reversed
1560       order.
1561
1562       For example, imagine that three downloads "A","B" and "C" are waiting
1563       in this order. aria2.tellWaiting(0, 1) returns ["A"].
1564       aria2.tellWaiting(1, 2) returns ["B", "C"]. aria2.tellWaiting(-1, 2)
1565       returns ["C", "B"].
1566
1567       The response is of type array and its element is the same struct
1568       returned by aria2.tellStatus method.
1569
1570       aria2.tellStopped offset, num
1571
1572       This method returns the list of stopped download. offset is of type
1573       integer and specifies the offset from the oldest download. num is of
1574       type integer and specifies the number of downloads to be returned.
1575
1576       offset and num have the same semantics as aria2.tellWaiting method.
1577
1578       The response is of type array and its element is the same struct
1579       returned by aria2.tellStatus method.
1580
1581       aria2.changePosition gid, pos, how
1582
1583       This method changes the position of the download denoted by gid. pos is
1584       of type integer. how is of type string. If how is "POS_SET", it moves
1585       the download to a position relative to the beginning of the queue. If
1586       how is "POS_CUR", it moves the download to a position relative to the
1587       current position. If how is "POS_END", it moves the download to a
1588       position relative to the end of the queue. If the destination position
1589       is less than 0 or beyond the end of the queue, it moves the download to
1590       the beginning or the end of the queue respectively. The response is of
1591       type integer and it is the destination position.
1592
1593       For example, if GID#1 is placed in position 3, aria2.changePosition(1,
1594       -1, POS_CUR) will change its position to 2. Additional
1595       aria2.changePosition(1, 0, POS_SET) will change its position to 0(the
1596       beginning of the queue).
1597
1598       aria2.changeUri gid, fileIndex, delUris, addUris[, position]
1599
1600       This method removes URIs in delUris from and appends URIs in addUris to
1601       download denoted by gid. delUris and addUris are list of string. A
1602       download can contain multiple files and URIs are attached to each file.
1603       fileIndex is used to select which file to remove/attach given URIs.
1604       fileIndex is 1-based. position is used to specify where URIs are
1605       inserted in the existing waiting URI list. position is 0-based. When
1606       position is omitted, URIs are appended to the back of the list. This
1607       method first execute removal and then addition. position is the
1608       position after URIs are removed, not the position when this method is
1609       called. When removing URI, if same URIs exist in download, only one of
1610       them is removed for each URI in delUris. In other words, there are
1611       three URIs "http://example.org/aria2" and you want remove them all, you
1612       have to specify (at least) 3 "http://example.org/aria2" in delUris.
1613       This method returns a list which contains 2 integers. The first integer
1614       is the number of URIs deleted. The second integer is the number of URIs
1615       added.
1616
1617       aria2.getOption gid
1618
1619       This method returns options of the download denoted by gid. The
1620       response is of type struct. Its key is the name of option. The value
1621       type is string.
1622
1623       aria2.changeOption gid, options
1624
1625       This method changes options of the download denoted by gid dynamically.
1626       gid is of type string. options is of type struct and the available
1627       options are: bt-max-peers, bt-request-peer-speed-limit,
1628       max-download-limit and max-upload-limit. This method returns "OK" for
1629       success.
1630
1631       aria2.getGlobalOption
1632
1633       This method returns global options. The response is of type struct. Its
1634       key is the name of option. The value type is string. Because global
1635       options are used as a template for the options of newly added download,
1636       the response contains keys returned by aria2.getOption method.
1637
1638       aria2.changeGlobalOption options
1639
1640       This method changes global options dynamically. options is of type
1641       struct and the available options are max-concurrent-downloads,
1642       max-overall-download-limit and max-overall-upload-limit. This method
1643       returns "OK" for success.
1644
1645       aria2.purgeDownloadResult
1646
1647       This method purges completed/error/removed downloads to free memory.
1648       This method returns "OK".
1649
1650       aria2.getVersion
1651
1652       This method returns version of the program and the list of enabled
1653       features. The response is of type struct and contains following keys.
1654
1655       version
1656           Version number of the program in string.
1657
1658       enabledFeatures
1659           List of enabled features. Each feature name is of type string.
1660
1661       aria2.getSessionInfo
1662
1663       This method returns session information. The response is of type struct
1664       and contains following key.
1665
1666       sessionId
1667           Session ID, which is generated each time when aria2 is invoked.
1668
1669       aria2.shutdown
1670
1671       This method shutdowns aria2. This method returns "OK".
1672
1673       aria2.forceShutdown
1674
1675       This method shutdowns aria2. This method behaves like aria2.shutdown
1676       except that any actions which takes time such as contacting BitTorrent
1677       tracker are skipped. This method returns "OK".
1678
1679       system.multicall methods
1680
1681       This methods encapsulates multiple method calls in a single request.
1682       methods is of type array and its element is struct. The struct contains
1683       two keys: "methodName" and "params". "methodName" is the method name to
1684       call and "params" is array containing parameters to the method. This
1685       method returns array of responses. The element of array will either be
1686       a one-item array containing the return value of each method call or
1687       struct of fault element if an encapsulated method call fails.
1688
1689   Error Handling
1690       In case of error, aria2 returns faultCode=1 and the error message in
1691       faultString.
1692
1693   Options
1694       Same options for -i list are available. See Input File subsection for
1695       complete list of options.
1696
1697       In the option struct, name element is option name(without preceding
1698       "--") and value element is argument as string.
1699
1700           <struct>
1701             <member>
1702               <name>split</name>
1703               <value><string>1</string></value>
1704             </member>
1705             <member>
1706               <name>http-proxy</name>
1707               <value><string>http://proxy/</string></value>
1708             </member>
1709           </struct>
1710
1711       header and index-out option are allowed multiple times in command-line.
1712       Since name should be unique in struct(many XML-RPC library
1713       implementation uses hash or dict for struct), single string is not
1714       enough. To overcome this situation, they can take array as value as
1715       well as string.
1716
1717           <struct>
1718             <member>
1719               <name>header</name>
1720               <value>
1721                 <array>
1722                   <data>
1723                     <value><string>Accept-Language: ja</string></value>
1724                     <value><string>Accept-Charset: utf-8</string></value>
1725                   </data>
1726                 </array>
1727               </value>
1728             </member>
1729           </struct>
1730
1731   Sample XML-RPC Client Code
1732       The following Ruby script adds http://localhost/aria2.tar.bz2 to aria2c
1733       operated on localhost with option --dir=/downloads and prints its
1734       reponse.
1735
1736           #!/usr/bin/env ruby
1737
1738           require 'xmlrpc/client'
1739           require 'pp'
1740
1741           client=XMLRPC::Client.new2("http://localhost:6800/rpc")
1742
1743           options={ "dir" => "/downloads" }
1744           result=client.call("aria2.addUri", [ "http://localhost/aria2.tar.bz2" ], options)
1745
1746           pp result
1747
1748       If you are a Python lover, you can use xmlrpclib(for Python3.x, use
1749       xmlrpc.client instead) to interact with aria2.
1750
1751           import xmlrpclib
1752           from pprint import pprint
1753
1754           s = xmlrpclib.ServerProxy("http://localhost:6800/rpc")
1755           r = s.aria2.addUri(["http://localhost/aria2.tar.bz2"], {"dir":"/downloads"})
1756           pprint(r)
1757

EXAMPLE

1759   HTTP/FTP Segmented Download
1760       Download a file
1761               aria2c "http://host/file.zip"
1762
1763               Note
1764               aria2 uses 5 connections to download 1 file by default.
1765
1766       Download a file using 1 connection
1767               aria2c -s1 "http://host/file.zip"
1768
1769               Note
1770               aria2 uses 5 connections to download 1 file by default. -s1
1771               limits the number of connections to just 1.
1772
1773               Note
1774               To stop a download, press Ctrl-C. You can resume the transfer
1775               by running aria2c with the same argument in the same directory.
1776               You can change URIs as long as they are pointing to the same
1777               file.
1778
1779       Download a file from 2 different HTTP servers
1780               aria2c "http://host/file.zip" "http://mirror/file.zip"
1781
1782       Download a file from HTTP and FTP servers
1783               aria2c "http://host1/file.zip" "ftp://host2/file.zip"
1784
1785       Download files listed in a text file concurrently
1786               aria2c -ifiles.txt -j2
1787
1788               Note
1789               -j option specifies the number of parallel downloads.
1790
1791       Using proxy
1792           For HTTP:
1793
1794               aria2c --http-proxy="http://proxy:8080" "http://host/file"
1795
1796               aria2c --http-proxy="http://proxy:8080" --no-proxy="localhost,127.0.0.1,192.168.0.0/16" "http://host/file"
1797
1798           For FTP:
1799
1800               aria2c --ftp-proxy="http://proxy:8080" "ftp://host/file"
1801
1802               Note
1803               See --http-proxy, --https-proxy, --ftp-proxy, --all-proxy and
1804               --no-proxy for details. You can specify proxy in the
1805               environment variables. See ENVIRONMENT section.
1806
1807       Proxy with authorization
1808               aria2c --http-proxy="http://username:password@proxy:8080" "http://host/file"
1809
1810               aria2c --http-proxy="http://proxy:8080" --http-proxy-user="username" --http-proxy-passwd="password" "http://host/file"
1811
1812   Metalink Download
1813       Download files with remote Metalink
1814               aria2c --follow-metalink=mem "http://host/file.metalink"
1815
1816       Download using a local metalink file
1817               aria2c -p --lowest-speed-limit=4000 file.metalink
1818
1819               Note
1820               To stop a download, press Ctrl-C. You can resume the transfer
1821               by running aria2c with the same argument in the same directory.
1822
1823       Download several local metalink files
1824               aria2c -j2 file1.metalink file2.metalink
1825
1826       Download only selected files using index
1827               aria2c --select-file=1-4,8 file.metalink
1828
1829               Note
1830               The index is printed to the console using -S option.
1831
1832       Download a file using a local .metalink file with user preference
1833               aria2c --metalink-location=jp,us --metalink-version=1.1 --metalink-language=en-US file.metalink
1834
1835   BitTorrent Download
1836       Download files from remote BitTorrent file
1837               aria2c --follow-torrent=mem "http://host/file.torrent"
1838
1839       Download using a local torrent file
1840               aria2c --max-upload-limit=40K file.torrent
1841
1842               Note
1843               --max-upload-limit specifies the max of upload rate.
1844
1845               Note
1846               To stop a download, press Ctrl-C. You can resume the transfer
1847               by running aria2c with the same argument in the same directory.
1848
1849       Download using BitTorrent Magnet URI
1850               aria2c "magnet:?xt=urn:btih:248D0A1CD08284299DE78D5C1ED359BB46717D8C&dn=aria2"
1851
1852               Note
1853               Don’t forget to quote BitTorrent Magnet URI which includes "&"
1854               character with single(') or double(") quotation.
1855
1856       Download 2 torrents
1857               aria2c -j2 file1.torrent file2.torrent
1858
1859       Download a file using torrent and HTTP/FTP server
1860               aria2c -Ttest.torrent "http://host1/file" "ftp://host2/file"
1861
1862               Note
1863               Downloading multi file torrent with HTTP/FTP is not supported.
1864
1865       Download only selected files using index(usually called "selectable
1866       download")
1867               aria2c --select-file=1-4,8 file.torrent
1868
1869               Note
1870               The index is printed to the console using -S option.
1871
1872       Specify output filename
1873           To specify output filename for BitTorrent downloads, you need to
1874           know the index of file in torrent file using -S option. For
1875           example, the output looks like this:
1876
1877               idx|path/length
1878               ===+======================
1879                 1|dist/base-2.6.18.iso
1880                  |99.9MiB
1881               ---+----------------------
1882                 2|dist/driver-2.6.18.iso
1883                  |169.0MiB
1884               ---+----------------------
1885
1886           To save dist/base-2.6.18.iso in /tmp/mydir/base.iso and
1887           dist/driver-2.6.18.iso in /tmp/dir/driver.iso, use the following
1888           command:
1889
1890               aria2c --dir=/tmp --index-out=1=mydir/base.iso --index-out=2=dir/driver.iso file.torrent
1891
1892       Change the listening port for incoming peer
1893               aria2c --listen-port=7000-7001,8000 file.torrent
1894
1895               Note
1896               Since aria2 doesn’t configure firewall or router for port
1897               forwarding, it’s up to you to do it manually.
1898
1899       Specify the condition to stop program after torrent download finished
1900               aria2c --seed-time=120 --seed-ratio=1.0 file.torrent
1901
1902               Note
1903               In the above example, the program exits when the 120 minutes
1904               has elapsed since download completed or seed ratio reaches 1.0.
1905
1906       Throttle upload speed
1907               aria2c --max-upload-limit=100K file.torrent
1908
1909       Enable DHT
1910               aria2c --enable-dht --dht-listen-port=6881 file.torrent
1911
1912               Note
1913               DHT uses udp port. Since aria2 doesn’t configure firewall or
1914               router for port forwarding, it’s up to you to do it manually.
1915
1916   More advanced HTTP features
1917       Load cookies
1918               aria2c --load-cookies=cookies.txt "http://host/file.zip"
1919
1920               Note
1921               You can use Firefox/Mozilla’s cookie file without modification.
1922
1923       Resume download started by web browsers or another programs
1924               aria2c -c -s2 "http://host/partiallydownloadedfile.zip"
1925
1926       Client certificate authorization for SSL/TLS
1927               aria2c --certificate=/path/to/mycert.pem --private-key=/path/to/mykey.pem https://host/file
1928
1929               Note
1930               The file specified in --private-key must be decrypted. The
1931               behavior when encrypted one is given is undefined.
1932
1933       Verify peer in SSL/TLS using given CA certificates
1934               aria2c --ca-certificate=/path/to/ca-certificates.crt --check-certificate https://host/file
1935
1936   And more advanced features
1937       Throttle download speed
1938               aria2c --max-download-limit=100K file.metalink
1939
1940       Repair a damaged download
1941               aria2c -V file.metalink
1942
1943               Note
1944               This option is only available used with BitTorrent or metalink
1945               with chunk checksums.
1946
1947       Drop connection if download speed is lower than specified value
1948               aria2c --lowest-speed-limit=10K file.metalink
1949
1950       Parameterized URI support
1951           You can specify set of parts:
1952
1953               aria2c -P "http://{host1,host2,host3}/file.iso"
1954
1955           You can specify numeric sequence:
1956
1957               aria2c -Z -P "http://host/image[000-100].png"
1958
1959
1960               Note
1961               -Z option is required if the all URIs don’t point to the same
1962               file, such as the above example.
1963
1964           You can specify step counter:
1965
1966               aria2c -Z -P "http://host/image[A-Z:2].png"
1967
1968       Parallel downloads of arbitrary number of URI,metalink,torrent
1969               aria2c -j3 -Z "http://host/file1" file2.torrent file3.metalink
1970
1971       BitTorrent Encryption
1972           Encrypt whole payload using ARC4:
1973
1974               aria2c --bt-min-crypto-level=arc4 --bt-require-crypto=true file.torrent
1975

SEE ALSO

1977       Project Web Site: http://aria2.sourceforge.net/
1978
1979       aria2 Wiki: http://sourceforge.net/apps/trac/aria2/wiki
1980
1981       Metalink Homepage: http://www.metalinker.org/
1982
1983       The Metalink Download Description Format:
1984       http://www.rfc-editor.org/rfc/rfc5854.txt
1985
1987       Copyright © 2006, 2010 Tatsuhiro Tsujikawa
1988
1989       This program is free software; you can redistribute it and/or modify it
1990       under the terms of the GNU General Public License as published by the
1991       Free Software Foundation; either version 2 of the License, or (at your
1992       option) any later version.
1993
1994       This program is distributed in the hope that it will be useful, but
1995       WITHOUT ANY WARRANTY; without even the implied warranty of
1996       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1997       General Public License for more details.
1998
1999       You should have received a copy of the GNU General Public License along
2000       with this program; if not, write to the Free Software Foundation, Inc.,
2001       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2002
2003       In addition, as a special exception, the copyright holders give
2004       permission to link the code of portions of this program with the
2005       OpenSSL library under certain conditions as described in each
2006       individual source file, and distribute linked combinations including
2007       the two. You must obey the GNU General Public License in all respects
2008       for all of the code used other than OpenSSL. If you modify file(s) with
2009       this exception, you may extend this exception to your version of the
2010       file(s), but you are not obligated to do so. If you do not wish to do
2011       so, delete this exception statement from your version. If you delete
2012       this exception statement from all source files in the program, then
2013       also delete it here.
2014
2015
2016
2017Aria2 1.9.4                       06/02/2010                         ARIA2C(1)
Impressum