mirror of https://github.com/aria2/aria2
parent
958faeac06
commit
a3afa89941
|
@ -64,6 +64,10 @@
|
||||||
|
|
||||||
Updated contact info.
|
Updated contact info.
|
||||||
* src/main.cc
|
* src/main.cc
|
||||||
|
|
||||||
|
Applied Ross's patch
|
||||||
|
* src/a2netcompat.h
|
||||||
|
* src/main.cc
|
||||||
|
|
||||||
2007-08-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
2007-08-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
|
|
3
TODO
3
TODO
|
@ -37,3 +37,6 @@
|
||||||
* net related headers and compatible macros and definition -> a2netcompat.h
|
* net related headers and compatible macros and definition -> a2netcompat.h
|
||||||
* time related headers and compatible macros and definition -> a2time.h
|
* time related headers and compatible macros and definition -> a2time.h
|
||||||
* used globally -> common.h
|
* used globally -> common.h
|
||||||
|
|
||||||
|
* replace threw with thrown
|
||||||
|
* fix the bug that causes a remote metalink fails.
|
140
doc/aria2c.1
140
doc/aria2c.1
|
@ -1,11 +1,11 @@
|
||||||
.\" Title: aria2c
|
.\" Title: aria2c
|
||||||
.\" Author:
|
.\" Author:
|
||||||
.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
|
.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
|
||||||
.\" Date: 07/09/2007
|
.\" Date: 08/09/2007
|
||||||
.\" Manual:
|
.\" Manual:
|
||||||
.\" Source:
|
.\" Source:
|
||||||
.\"
|
.\"
|
||||||
.TH "ARIA2C" "1" "07/09/2007" "" ""
|
.TH "ARIA2C" "1" "08/09/2007" "" ""
|
||||||
.\" disable hyphenation
|
.\" disable hyphenation
|
||||||
.nh
|
.nh
|
||||||
.\" disable justification (adjust text to left margin only)
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
@ -30,17 +30,17 @@ Please visit the project web site at http://aria2.sourceforge.net/
|
||||||
.PP
|
.PP
|
||||||
\-d, \-\-dir=DIR
|
\-d, \-\-dir=DIR
|
||||||
.RS 4
|
.RS 4
|
||||||
The directory to store downloaded file.
|
The directory to store the downloaded file.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-o, \-\-out=FILE
|
\-o, \-\-out=FILE
|
||||||
.RS 4
|
.RS 4
|
||||||
The file name for downloaded file.
|
The file name of the downloaded file.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-l, \-\-log=LOG
|
\-l, \-\-log=LOG
|
||||||
.RS 4
|
.RS 4
|
||||||
The file path to store log. If
|
The file name of the log file. If
|
||||||
\fI\-\fR
|
\fI\-\fR
|
||||||
is specified, log is written to stdout.
|
is specified, log is written to stdout.
|
||||||
.RE
|
.RE
|
||||||
|
@ -67,17 +67,12 @@ connections. Default:
|
||||||
.PP
|
.PP
|
||||||
\-\-retry\-wait=SEC
|
\-\-retry\-wait=SEC
|
||||||
.RS 4
|
.RS 4
|
||||||
Set amount of time in second between requests for errors. Specify a value between
|
Set the seconds to wait to retry after an error has occured. Specify a value between 0 and 60. Default: 5
|
||||||
\fI0\fR
|
|
||||||
and
|
|
||||||
\fI60\fR. Default:
|
|
||||||
\fI5\fR
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-t, \-\-timeout=SEC
|
\-t, \-\-timeout=SEC
|
||||||
.RS 4
|
.RS 4
|
||||||
Set timeout in second. Default:
|
Set timeout in seconds. Default: 60
|
||||||
\fI60\fR
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-m, \-\-max\-tries=N
|
\-m, \-\-max\-tries=N
|
||||||
|
@ -90,27 +85,27 @@ means unlimited. Default:
|
||||||
.PP
|
.PP
|
||||||
\-\-http\-proxy=HOST:PORT
|
\-\-http\-proxy=HOST:PORT
|
||||||
.RS 4
|
.RS 4
|
||||||
Use HTTP proxy server. This affects to all URLs.
|
Use HTTP proxy server. This affects all URLs.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-http\-user=USER
|
\-\-http\-user=USER
|
||||||
.RS 4
|
.RS 4
|
||||||
Set HTTP user. This affects to all URLs.
|
Set HTTP user. This affects all URLs.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-http\-passwd=PASSWD
|
\-\-http\-passwd=PASSWD
|
||||||
.RS 4
|
.RS 4
|
||||||
Set HTTP password. This affects to all URLs.
|
Set HTTP password. This affects all URLs.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-http\-proxy\-user=USER
|
\-\-http\-proxy\-user=USER
|
||||||
.RS 4
|
.RS 4
|
||||||
Set HTTP proxy user. This affects to all URLs
|
Set HTTP proxy user. This affects all URLs.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-http\-proxy\-passwd=PASSWD
|
\-\-http\-proxy\-passwd=PASSWD
|
||||||
.RS 4
|
.RS 4
|
||||||
Set HTTP proxy password. This affects to all URLs.
|
Set HTTP proxy password. This affects all URLs.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-http\-proxy\-method=METHOD
|
\-\-http\-proxy\-method=METHOD
|
||||||
|
@ -134,19 +129,17 @@ is the only supported scheme. Default:
|
||||||
.PP
|
.PP
|
||||||
\-\-referer=REFERER
|
\-\-referer=REFERER
|
||||||
.RS 4
|
.RS 4
|
||||||
Set Referer. This affects to all URLs.
|
Set Referer. This affects all URLs.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-ftp\-user=USER
|
\-\-ftp\-user=USER
|
||||||
.RS 4
|
.RS 4
|
||||||
Set FTP user. This affects to all URLs. Default:
|
Set FTP user. This affects all URLs. Default: anonymous
|
||||||
\fIanonymous\fR
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-ftp\-passwd=PASSWD
|
\-\-ftp\-passwd=PASSWD
|
||||||
.RS 4
|
.RS 4
|
||||||
Set FTP password. This affects to all URLs. Default:
|
Set FTP password. This affects all URLs. Default: ARIA2USER@
|
||||||
\fIARIA2USER@\fR
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-ftp\-type=TYPE
|
\-\-ftp\-type=TYPE
|
||||||
|
@ -177,11 +170,7 @@ or
|
||||||
.PP
|
.PP
|
||||||
\-\-lowest\-speed\-limit=SPEED
|
\-\-lowest\-speed\-limit=SPEED
|
||||||
.RS 4
|
.RS 4
|
||||||
Close connection if download speed is lower than or equal to this value(bytes per sec). 0 means aria2 does not care lowest speed limit. You can append
|
Close connection if download speed is lower than or equal to this value(bytes per sec). 0 means aria2 does not have a lowest speed limit. You can append K or M(1K = 1024, 1M = 1024K). This option does not affect BitTorrent downloads. Default: 0
|
||||||
\fIK\fR
|
|
||||||
or
|
|
||||||
\fIM\fR(1K = 1024, 1M = 1024K). This option does not affect BitTorrent download. Default:
|
|
||||||
\fI0\fR
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-max\-download\-limit=SPEED
|
\-\-max\-download\-limit=SPEED
|
||||||
|
@ -197,43 +186,34 @@ or
|
||||||
.PP
|
.PP
|
||||||
\-\-file\-allocation=METHOD
|
\-\-file\-allocation=METHOD
|
||||||
.RS 4
|
.RS 4
|
||||||
Specify file allocation method.
|
Specify file allocation method. METHOD is either
|
||||||
\fIMETHOD\fR
|
|
||||||
is either
|
|
||||||
\fInone\fR
|
\fInone\fR
|
||||||
or
|
or
|
||||||
\fIprealloc\fR.
|
\fIprealloc\fR.
|
||||||
\fInone\fR
|
\fInone\fR
|
||||||
doesn't pre\-allocate file space.
|
doesn't pre\-allocate file space.
|
||||||
\fIprealloc\fR
|
\fIprealloc\fR
|
||||||
pre\-allocates file space before download begins. This may take some time depending on the size of file. Default:
|
pre\-allocates file space before download begins. This may take some time depending on the size of the file. Default: none
|
||||||
\fInone\fR
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-allow\-overwrite=true|false
|
\-\-allow\-overwrite=true|false
|
||||||
.RS 4
|
.RS 4
|
||||||
If this option set to
|
If false, aria2 doesn't download a file which already exists but the corresponding .aria2 file doesn't exist. Default: false
|
||||||
\fIfalse\fR, aria2 doesn't download a file which already exists in the file system but its corresponding .aria2 file doesn't exist. Default:
|
|
||||||
\fIfalse\fR
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-check\-integrity=true|false
|
\-\-check\-integrity=true|false
|
||||||
.RS 4
|
.RS 4
|
||||||
Check file integrity by validating piece hash. This option makes effect in BitTorrent download and Metalink with chunk checksums. Use this option to redownload a damaged portion of file. You may need to specify
|
Check file integrity by validating piece hash. This option only affects in BitTorrent downloads and Metalink downloads with chunk checksums. Use this option to re\-download a damaged portion of a file. You may need to specify \-\-allow\-overwrite=true if the .aria2 file doesn't exist. Default: false
|
||||||
\fI\-\-allow\-overwrite=true\fR
|
|
||||||
option if .aria2 file doesn't exist. Default:
|
|
||||||
\fIfalse\fR
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-realtime\-chunk\-checksum=true|false
|
\-\-realtime\-chunk\-checksum=true|false
|
||||||
.RS 4
|
.RS 4
|
||||||
Validate chunk checksum while downloading a file in Metalink mode. This option makes effect in Metalink with chunk checksums. Default:
|
Validate chunk checksum while downloading a file in Metalink mode. This option on affects Metalink mode with chunk checksums. Default: true
|
||||||
\fItrue\fR
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-c, \-\-continue
|
\-c, \-\-continue
|
||||||
.RS 4
|
.RS 4
|
||||||
Continue downloading a partially downloaded file. Use this option to resume a download started by web browsers or another programs which download files sequentially from the beginning. Currently this option is applicable to http(s)/ ftp downloads.
|
Continue downloading a partially downloaded file. Use this option to resume a download started by a web browser or another program which downloads files sequentially from the beginning. Currently this option is only applicable to http(s)/ftp downloads.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-U, \-\-user\-agent=USER_AGENT
|
\-U, \-\-user\-agent=USER_AGENT
|
||||||
|
@ -248,26 +228,19 @@ Disables netrc support.
|
||||||
.PP
|
.PP
|
||||||
\-i, \-\-input\-file=FILE
|
\-i, \-\-input\-file=FILE
|
||||||
.RS 4
|
.RS 4
|
||||||
Downloads URIs found in
|
Downloads URIs found in FILE. You can specify multiple URIs for a single entity: separate URIs on a single line using the TAB character. Reads input from stdin when
|
||||||
\fIFILE\fR. You can specify multiple URIs for a single entity: deliminate URIs by Tab in a single line. Reads input from stdin when
|
|
||||||
\fI\-\fR
|
\fI\-\fR
|
||||||
is specified.
|
is specified.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-j, \-\-max\-concurrent\-downloads=N
|
\-j, \-\-max\-concurrent\-downloads=N
|
||||||
.RS 4
|
.RS 4
|
||||||
Set maximum number of concurrent downloads. It should be used with
|
Set maximum number of concurrent downloads. It should be used with the \-i option. Default: 5
|
||||||
\fI\-i\fR
|
|
||||||
option. Default:
|
|
||||||
\fI5\fR
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-load\-cookies=FILE
|
\-\-load\-cookies=FILE
|
||||||
.RS 4
|
.RS 4
|
||||||
Load cookies from
|
Load cookies from FILE. The format of FILE is the same used by Netscape and Mozilla.
|
||||||
\fIFILE\fR. The format of
|
|
||||||
\fIFILE\fR
|
|
||||||
is one used by Netscape and Mozilla.
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-S, \-\-show\-files
|
\-S, \-\-show\-files
|
||||||
|
@ -277,32 +250,24 @@ Print file listing of .torrent or .metalink file and exit.
|
||||||
.PP
|
.PP
|
||||||
\-\-select\-file=INDEX\&...
|
\-\-select\-file=INDEX\&...
|
||||||
.RS 4
|
.RS 4
|
||||||
Set file to download by specifing its index. You can know file index through
|
Set file to download by specifing its index. You can find the file index using the \-\-show\-files option. Multiple indexes can be specified by using
|
||||||
\fI\-\-show\-files\fR
|
\fI,\fR, for example: "3,6". You can also use
|
||||||
option. Multiple indexes can be specified by using
|
|
||||||
\fI,\fR
|
|
||||||
like "3,6". You can also use
|
|
||||||
\fI\-\fR
|
\fI\-\fR
|
||||||
to specify rangelike "1\-5".
|
to specify a range: "1\-5".
|
||||||
\fI,\fR
|
\fI,\fR
|
||||||
and
|
and
|
||||||
\fI\-\fR
|
\fI\-\fR
|
||||||
can be used together. When used with \-M option, index may vary depending on the query(see
|
can be used together. When used with the \-M option, index may vary depending on the query(see \-\-metalink\-* options).
|
||||||
\fI\-\-metalink\-*\fR
|
|
||||||
options).
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-T, \-\-torrent\-file=TORRENT_FILE
|
\-T, \-\-torrent\-file=TORRENT_FILE
|
||||||
.RS 4
|
.RS 4
|
||||||
The file path to .torrent file.
|
The path to the .torrent file.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-follow\-torrent=true|false
|
\-\-follow\-torrent=true|false
|
||||||
.RS 4
|
.RS 4
|
||||||
Setting this option to
|
Set to false to prevent aria2 from entering BitTorrent mode even if the filename of the downloaded file ends with .torrent. Default: true
|
||||||
\fIfalse\fR
|
|
||||||
prevents aria2 to enter BitTorrent mode even if the filename of downloaded file ends with .torrent. Default:
|
|
||||||
\fItrue\fR
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-direct\-file\-mapping=true|false
|
\-\-direct\-file\-mapping=true|false
|
||||||
|
@ -313,8 +278,7 @@ Directly read from and write to each file mentioned in .torrent file. Default:
|
||||||
.PP
|
.PP
|
||||||
\-\-listen\-port=PORT
|
\-\-listen\-port=PORT
|
||||||
.RS 4
|
.RS 4
|
||||||
Set port number to listen to for peer connection. Default:
|
Set TCP port number for BitTorrent downloads. Default: 6881\-6999
|
||||||
\fI6881\-6999\fR
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-max\-upload\-limit=SPEED
|
\-\-max\-upload\-limit=SPEED
|
||||||
|
@ -330,19 +294,12 @@ or
|
||||||
.PP
|
.PP
|
||||||
\-\-seed\-time=MINUTES
|
\-\-seed\-time=MINUTES
|
||||||
.RS 4
|
.RS 4
|
||||||
Specify seeding time in minutes. See also
|
Specify seeding time in minutes. Also see the \-\-seed\-ratio option.
|
||||||
\fI\-\-seed\-ratio\fR
|
|
||||||
option.
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-seed\-ratio=RATIO
|
\-\-seed\-ratio=RATIO
|
||||||
.RS 4
|
.RS 4
|
||||||
Specify share ratio. Seed completed torrents until share ratio reaches
|
Specify share ratio. Seed completed torrents until share ratio reaches RATIO. 1.0 is encouraged. If \-\-seed\-time option is specified along with this option, seeding ends when at least one of the conditions is satisfied.
|
||||||
\fIRATIO\fR.
|
|
||||||
\fI1.0\fR
|
|
||||||
is encouraged. If
|
|
||||||
\fI\-\-seed\-time\fR
|
|
||||||
option is specified along with this option, seeding ends when at least one of the conditions is satisfied.
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-M, \-\-metalink\-file=METALINK_FILE
|
\-M, \-\-metalink\-file=METALINK_FILE
|
||||||
|
@ -358,17 +315,17 @@ The number of servers to connect to simultaneously. Default:
|
||||||
.PP
|
.PP
|
||||||
\-\-metalink\-version=VERSION
|
\-\-metalink\-version=VERSION
|
||||||
.RS 4
|
.RS 4
|
||||||
The version of file to download.
|
The version of the file to download.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-metalink\-language=LANGUAGE
|
\-\-metalink\-language=LANGUAGE
|
||||||
.RS 4
|
.RS 4
|
||||||
The language of file to download.
|
The language of the file to download.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-metalink\-os=OS
|
\-\-metalink\-os=OS
|
||||||
.RS 4
|
.RS 4
|
||||||
The operating system the file is targeted.
|
The operating system of the file to download.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-metalink\-location=LOCATION
|
\-\-metalink\-location=LOCATION
|
||||||
|
@ -378,10 +335,7 @@ The location of the prefered server.
|
||||||
.PP
|
.PP
|
||||||
\-\-follow\-metalink=true|false
|
\-\-follow\-metalink=true|false
|
||||||
.RS 4
|
.RS 4
|
||||||
Setting this option to
|
Set to false to prevent aria2 from entering Metalink mode even if the filename of the downloaded file ends with .metalink. Default: true
|
||||||
\fIfalse\fR
|
|
||||||
prevents aria2 to enter Metalink mode even if the filename of downloaded file ends with .metalink. Default:
|
|
||||||
\fItrue\fR
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-v, \-\-version
|
\-v, \-\-version
|
||||||
|
@ -396,30 +350,26 @@ Print this message and exit.
|
||||||
.PP
|
.PP
|
||||||
URL
|
URL
|
||||||
.RS 4
|
.RS 4
|
||||||
You can specify multiple URLs. All URLs must point to the same file or downloading fails.
|
You can specify multiple URLs. All URLs must point to the same file or downloading will fail.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
FILE
|
FILE
|
||||||
.RS 4
|
.RS 4
|
||||||
Specify files in multi\-file torrent to download. Use conjunction with
|
Specify files in multi\-file torrent to download. Use in conjunction with the \-T option. This argument is ignored if you specify the \-\-select\-file option.
|
||||||
\fI\-T\fR
|
|
||||||
option. This arguments are ignored if you specify
|
|
||||||
\fI\-\-select\-file\fR
|
|
||||||
option.
|
|
||||||
.RE
|
.RE
|
||||||
.SH "EXAMPLES"
|
.SH "EXAMPLES"
|
||||||
.PP
|
.PP
|
||||||
Download a file by 1 connection
|
Download a file using 1 connection
|
||||||
.RS 4
|
.RS 4
|
||||||
aria2c http://AAA.BBB.CCC/file.zip
|
aria2c http://AAA.BBB.CCC/file.zip
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
Download a file by 2 connections
|
Download a file using 2 connections
|
||||||
.RS 4
|
.RS 4
|
||||||
aria2c \-s 2 http://AAA.BBB.CCC/file.zip
|
aria2c \-s 2 http://AAA.BBB.CCC/file.zip
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
Download a file by 2 connections, each connects to a different server
|
Download a file using 2 connections, each connects to a different server
|
||||||
.RS 4
|
.RS 4
|
||||||
aria2c http://AAA.BBB.CCC/file.zip http://DDD.EEE.FFF/GGG/file.zip
|
aria2c http://AAA.BBB.CCC/file.zip http://DDD.EEE.FFF/GGG/file.zip
|
||||||
.RE
|
.RE
|
||||||
|
@ -449,7 +399,7 @@ Download a torrent
|
||||||
aria2c \-o test.torrent http://AAA.BBB.CCC/file.torrent
|
aria2c \-o test.torrent http://AAA.BBB.CCC/file.torrent
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
Download a torrent using local .torrent file
|
Download a torrent using a local .torrent file
|
||||||
.RS 4
|
.RS 4
|
||||||
aria2c \-T test.torrent
|
aria2c \-T test.torrent
|
||||||
.RE
|
.RE
|
||||||
|
@ -474,7 +424,7 @@ Metalink downloading
|
||||||
aria2c \-\-lowest\-speed\-limit 10K http://AAA.BBB.CCC/file.metalink
|
aria2c \-\-lowest\-speed\-limit 10K http://AAA.BBB.CCC/file.metalink
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
Download a file using local .metalink file
|
Download a file using a local .metalink file
|
||||||
.RS 4
|
.RS 4
|
||||||
aria2c \-M test.metalink
|
aria2c \-M test.metalink
|
||||||
.RE
|
.RE
|
||||||
|
|
191
doc/aria2c.1.txt
191
doc/aria2c.1.txt
|
@ -30,14 +30,13 @@ Please visit the project web site at http://aria2.sourceforge.net/
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-------
|
-------
|
||||||
-d, --dir=DIR::
|
-d, --dir=DIR::
|
||||||
The directory to store downloaded file.
|
The directory to store the downloaded file.
|
||||||
|
|
||||||
-o, --out=FILE::
|
-o, --out=FILE::
|
||||||
The file name for downloaded file.
|
The file name of the downloaded file.
|
||||||
|
|
||||||
-l, --log=LOG::
|
-l, --log=LOG::
|
||||||
The file path to store log. If '-' is specified, log is written to
|
The file name of the log file. If '-' is specified, log is written to stdout.
|
||||||
stdout.
|
|
||||||
|
|
||||||
-D, --daemon::
|
-D, --daemon::
|
||||||
Run as daemon.
|
Run as daemon.
|
||||||
|
@ -49,32 +48,31 @@ OPTIONS
|
||||||
Default: '1'
|
Default: '1'
|
||||||
|
|
||||||
--retry-wait=SEC::
|
--retry-wait=SEC::
|
||||||
Set amount of time in second between requests for errors. Specify a
|
Set the seconds to wait to retry after an error
|
||||||
value between '0' and '60'.
|
has occured. Specify a value between 0 and 60.
|
||||||
Default: '5'
|
Default: 5
|
||||||
|
|
||||||
-t, --timeout=SEC::
|
-t, --timeout=SEC::
|
||||||
Set timeout in second.
|
Set timeout in seconds. Default: 60
|
||||||
Default: '60'
|
|
||||||
|
|
||||||
-m, --max-tries=N::
|
-m, --max-tries=N::
|
||||||
Set number of tries. '0' means unlimited.
|
Set number of tries. '0' means unlimited.
|
||||||
Default: '5'
|
Default: '5'
|
||||||
|
|
||||||
--http-proxy=HOST:PORT::
|
--http-proxy=HOST:PORT::
|
||||||
Use HTTP proxy server. This affects to all URLs.
|
Use HTTP proxy server. This affects all URLs.
|
||||||
|
|
||||||
--http-user=USER::
|
--http-user=USER::
|
||||||
Set HTTP user. This affects to all URLs.
|
Set HTTP user. This affects all URLs.
|
||||||
|
|
||||||
--http-passwd=PASSWD::
|
--http-passwd=PASSWD::
|
||||||
Set HTTP password. This affects to all URLs.
|
Set HTTP password. This affects all URLs.
|
||||||
|
|
||||||
--http-proxy-user=USER::
|
--http-proxy-user=USER::
|
||||||
Set HTTP proxy user. This affects to all URLs
|
Set HTTP proxy user. This affects all URLs.
|
||||||
|
|
||||||
--http-proxy-passwd=PASSWD::
|
--http-proxy-passwd=PASSWD::
|
||||||
Set HTTP proxy password. This affects to all URLs.
|
Set HTTP proxy password. This affects all URLs.
|
||||||
|
|
||||||
--http-proxy-method=METHOD::
|
--http-proxy-method=METHOD::
|
||||||
Set the method to use in proxy request.
|
Set the method to use in proxy request.
|
||||||
|
@ -87,15 +85,15 @@ OPTIONS
|
||||||
Default: 'basic'
|
Default: 'basic'
|
||||||
|
|
||||||
--referer=REFERER::
|
--referer=REFERER::
|
||||||
Set Referer. This affects to all URLs.
|
Set Referer. This affects all URLs.
|
||||||
|
|
||||||
--ftp-user=USER::
|
--ftp-user=USER::
|
||||||
Set FTP user. This affects to all URLs.
|
Set FTP user. This affects all URLs.
|
||||||
Default: 'anonymous'
|
Default: anonymous
|
||||||
|
|
||||||
--ftp-passwd=PASSWD::
|
--ftp-passwd=PASSWD::
|
||||||
Set FTP password. This affects to all URLs.
|
Set FTP password. This affects all URLs.
|
||||||
Default: 'ARIA2USER@'
|
Default: ARIA2USER@
|
||||||
|
|
||||||
--ftp-type=TYPE::
|
--ftp-type=TYPE::
|
||||||
Set FTP transfer type. TYPE is either 'binary'
|
Set FTP transfer type. TYPE is either 'binary'
|
||||||
|
@ -111,12 +109,12 @@ OPTIONS
|
||||||
Default: 'tunnel'
|
Default: 'tunnel'
|
||||||
|
|
||||||
--lowest-speed-limit=SPEED::
|
--lowest-speed-limit=SPEED::
|
||||||
Close connection if download speed is lower than
|
Close connection if download speed is lower than
|
||||||
or equal to this value(bytes per sec).
|
or equal to this value(bytes per sec).
|
||||||
0 means aria2 does not care lowest speed limit.
|
0 means aria2 does not have a lowest speed limit.
|
||||||
You can append 'K' or 'M'(1K = 1024, 1M = 1024K).
|
You can append K or M(1K = 1024, 1M = 1024K).
|
||||||
This option does not affect BitTorrent download.
|
This option does not affect BitTorrent downloads.
|
||||||
Default: '0'
|
Default: 0
|
||||||
|
|
||||||
--max-download-limit=SPEED::
|
--max-download-limit=SPEED::
|
||||||
Set max download speed in bytes per sec.
|
Set max download speed in bytes per sec.
|
||||||
|
@ -125,43 +123,42 @@ OPTIONS
|
||||||
Default: '0'
|
Default: '0'
|
||||||
|
|
||||||
--file-allocation=METHOD::
|
--file-allocation=METHOD::
|
||||||
Specify file allocation method. 'METHOD' is either
|
Specify file allocation method. METHOD is either
|
||||||
'none' or 'prealloc'.
|
'none' or 'prealloc'. 'none' doesn't pre-allocate
|
||||||
'none' doesn't pre-allocate file space. 'prealloc'
|
file space. 'prealloc' pre-allocates file space
|
||||||
pre-allocates file space before download begins.
|
before download begins. This may take some time
|
||||||
This may take some time depending on the size of
|
depending on the size of the file.
|
||||||
file.
|
Default: none
|
||||||
Default: 'none'
|
|
||||||
|
|
||||||
--allow-overwrite=true|false::
|
--allow-overwrite=true|false::
|
||||||
If this option set to 'false', aria2 doesn't
|
If false, aria2 doesn't download a file which
|
||||||
download a file which already exists in the file
|
already exists but the corresponding .aria2 file
|
||||||
system but its corresponding .aria2 file doesn't
|
doesn't exist.
|
||||||
exist.
|
Default: false
|
||||||
Default: 'false'
|
|
||||||
|
|
||||||
--check-integrity=true|false::
|
--check-integrity=true|false::
|
||||||
Check file integrity by validating piece hash.
|
Check file integrity by validating piece hash.
|
||||||
This option makes effect in BitTorrent download
|
This option only affects in BitTorrent downloads
|
||||||
and Metalink with chunk checksums.
|
and Metalink downloads with chunk checksums.
|
||||||
Use this option to redownload a damaged portion of
|
Use this option to re-download a damaged portion
|
||||||
file.
|
of a file.
|
||||||
You may need to specify '--allow-overwrite=true'
|
You may need to specify --allow-overwrite=true
|
||||||
option if .aria2 file doesn't exist.
|
if the .aria2 file doesn't exist.
|
||||||
Default: 'false'
|
Default: false
|
||||||
|
|
||||||
--realtime-chunk-checksum=true|false::
|
--realtime-chunk-checksum=true|false::
|
||||||
Validate chunk checksum while downloading
|
Validate chunk checksum while
|
||||||
a file in Metalink mode. This option makes effect
|
downloading a file in Metalink mode. This option
|
||||||
in Metalink with chunk checksums.
|
on affects Metalink mode with chunk checksums.
|
||||||
Default: 'true'
|
Default: true
|
||||||
|
|
||||||
-c, --continue::
|
-c, --continue::
|
||||||
Continue downloading a partially downloaded
|
Continue downloading a partially downloaded
|
||||||
file. Use this option to resume a download started by web browsers or another programs
|
file. Use this option to resume a download
|
||||||
which download files sequentially from the beginning.
|
started by a web browser or another program
|
||||||
Currently this option is applicable to http(s)/
|
which downloads files sequentially from the
|
||||||
ftp downloads.
|
beginning. Currently this option is only
|
||||||
|
applicable to http(s)/ftp downloads.
|
||||||
|
|
||||||
-U, --user-agent=USER_AGENT::
|
-U, --user-agent=USER_AGENT::
|
||||||
Set user agent for http(s) downloads.
|
Set user agent for http(s) downloads.
|
||||||
|
@ -170,19 +167,19 @@ OPTIONS
|
||||||
Disables netrc support.
|
Disables netrc support.
|
||||||
|
|
||||||
-i, --input-file=FILE::
|
-i, --input-file=FILE::
|
||||||
Downloads URIs found in 'FILE'. You can specify
|
Downloads URIs found in FILE. You can specify
|
||||||
multiple URIs for a single entity: deliminate
|
multiple URIs for a single entity: separate
|
||||||
URIs by Tab in a single line.
|
URIs on a single line using the TAB character.
|
||||||
Reads input from stdin when '-' is specified.
|
Reads input from stdin when '-' is specified.
|
||||||
|
|
||||||
-j, --max-concurrent-downloads=N::
|
-j, --max-concurrent-downloads=N::
|
||||||
Set maximum number of concurrent downloads.
|
Set maximum number of concurrent downloads.
|
||||||
It should be used with '-i' option.
|
It should be used with the -i option.
|
||||||
Default: '5'
|
Default: 5
|
||||||
|
|
||||||
--load-cookies=FILE::
|
--load-cookies=FILE::
|
||||||
Load cookies from 'FILE'. The format of 'FILE' is
|
Load cookies from FILE. The format of FILE is
|
||||||
one used by Netscape and Mozilla.
|
the same used by Netscape and Mozilla.
|
||||||
|
|
||||||
-S, --show-files::
|
-S, --show-files::
|
||||||
Print file listing of .torrent or .metalink file
|
Print file listing of .torrent or .metalink file
|
||||||
|
@ -190,31 +187,31 @@ OPTIONS
|
||||||
|
|
||||||
--select-file=INDEX...::
|
--select-file=INDEX...::
|
||||||
Set file to download by specifing its index.
|
Set file to download by specifing its index.
|
||||||
You can know file index through '--show-files'
|
You can find the file index using the
|
||||||
option. Multiple indexes can be specified by using
|
--show-files option. Multiple indexes can be
|
||||||
',' like "3,6".
|
specified by using ',', for example: "3,6".
|
||||||
You can also use '-' to specify rangelike "1-5".
|
You can also use '-' to specify a range: "1-5".
|
||||||
',' and '-' can be used together.
|
',' and '-' can be used together.
|
||||||
When used with -M option, index may vary depending
|
When used with the -M option, index may vary
|
||||||
on the query(see '--metalink-*' options).
|
depending on the query(see --metalink-* options).
|
||||||
|
|
||||||
-T, --torrent-file=TORRENT_FILE::
|
-T, --torrent-file=TORRENT_FILE::
|
||||||
The file path to .torrent file.
|
The path to the .torrent file.
|
||||||
|
|
||||||
--follow-torrent=true|false::
|
--follow-torrent=true|false::
|
||||||
Setting this option to 'false' prevents aria2 to
|
Set to false to prevent aria2 from
|
||||||
enter BitTorrent mode even if the filename of
|
entering BitTorrent mode even if the filename of
|
||||||
downloaded file ends with .torrent.
|
the downloaded file ends with .torrent.
|
||||||
Default: 'true'
|
Default: true
|
||||||
|
|
||||||
--direct-file-mapping=true|false::
|
--direct-file-mapping=true|false::
|
||||||
Directly read from and write to each file
|
Directly read from and write to each file
|
||||||
mentioned in .torrent file.
|
mentioned in .torrent file.
|
||||||
Default: 'true'
|
Default: 'true'
|
||||||
|
|
||||||
--listen-port=PORT::
|
--listen-port=PORT::
|
||||||
Set port number to listen to for peer connection.
|
Set TCP port number for BitTorrent downloads.
|
||||||
Default: '6881-6999'
|
Default: 6881-6999
|
||||||
|
|
||||||
--max-upload-limit=SPEED::
|
--max-upload-limit=SPEED::
|
||||||
Set max upload speed in bytes per sec.
|
Set max upload speed in bytes per sec.
|
||||||
|
@ -223,15 +220,15 @@ OPTIONS
|
||||||
Default: '0'
|
Default: '0'
|
||||||
|
|
||||||
--seed-time=MINUTES::
|
--seed-time=MINUTES::
|
||||||
Specify seeding time in minutes. See also
|
Specify seeding time in minutes. Also see the
|
||||||
'--seed-ratio' option.
|
--seed-ratio option.
|
||||||
|
|
||||||
--seed-ratio=RATIO::
|
--seed-ratio=RATIO::
|
||||||
Specify share ratio. Seed completed torrents until
|
Specify share ratio. Seed completed torrents
|
||||||
share ratio reaches 'RATIO'. '1.0' is encouraged.
|
until share ratio reaches RATIO. 1.0 is
|
||||||
If '--seed-time' option is specified along with
|
encouraged. If --seed-time option is specified
|
||||||
this option, seeding ends when at least one of
|
along with this option, seeding ends when at
|
||||||
the conditions is satisfied.
|
least one of the conditions is satisfied.
|
||||||
|
|
||||||
-M, --metalink-file=METALINK_FILE::
|
-M, --metalink-file=METALINK_FILE::
|
||||||
The file path to .metalink file.
|
The file path to .metalink file.
|
||||||
|
@ -242,22 +239,22 @@ OPTIONS
|
||||||
Default: '5'
|
Default: '5'
|
||||||
|
|
||||||
--metalink-version=VERSION::
|
--metalink-version=VERSION::
|
||||||
The version of file to download.
|
The version of the file to download.
|
||||||
|
|
||||||
--metalink-language=LANGUAGE::
|
--metalink-language=LANGUAGE::
|
||||||
The language of file to download.
|
The language of the file to download.
|
||||||
|
|
||||||
--metalink-os=OS::
|
--metalink-os=OS::
|
||||||
The operating system the file is targeted.
|
The operating system of the file to download.
|
||||||
|
|
||||||
--metalink-location=LOCATION::
|
--metalink-location=LOCATION::
|
||||||
The location of the prefered server.
|
The location of the prefered server.
|
||||||
|
|
||||||
--follow-metalink=true|false::
|
--follow-metalink=true|false::
|
||||||
Setting this option to 'false' prevents aria2 to
|
Set to false to prevent aria2 from
|
||||||
enter Metalink mode even if the filename of
|
entering Metalink mode even if the filename of
|
||||||
downloaded file ends with .metalink.
|
the downloaded file ends with .metalink.
|
||||||
Default: 'true'
|
Default: true
|
||||||
|
|
||||||
-v, --version::
|
-v, --version::
|
||||||
Print the version number and exit.
|
Print the version number and exit.
|
||||||
|
@ -267,20 +264,20 @@ OPTIONS
|
||||||
|
|
||||||
URL::
|
URL::
|
||||||
You can specify multiple URLs. All URLs must point to the same file
|
You can specify multiple URLs. All URLs must point to the same file
|
||||||
or downloading fails.
|
or downloading will fail.
|
||||||
|
|
||||||
FILE::
|
FILE::
|
||||||
Specify files in multi-file torrent to download. Use conjunction with
|
Specify files in multi-file torrent to download. Use in conjunction with the
|
||||||
'-T' option. This arguments are ignored if you specify '--select-file' option.
|
-T option. This argument is ignored if you specify the --select-file option.
|
||||||
|
|
||||||
EXAMPLES
|
EXAMPLES
|
||||||
--------
|
--------
|
||||||
|
|
||||||
Download a file by 1 connection::
|
Download a file using 1 connection::
|
||||||
aria2c http://AAA.BBB.CCC/file.zip
|
aria2c http://AAA.BBB.CCC/file.zip
|
||||||
Download a file by 2 connections::
|
Download a file using 2 connections::
|
||||||
aria2c -s 2 http://AAA.BBB.CCC/file.zip
|
aria2c -s 2 http://AAA.BBB.CCC/file.zip
|
||||||
Download a file by 2 connections, each connects to a different server::
|
Download a file using 2 connections, each connects to a different server::
|
||||||
aria2c http://AAA.BBB.CCC/file.zip http://DDD.EEE.FFF/GGG/file.zip
|
aria2c http://AAA.BBB.CCC/file.zip http://DDD.EEE.FFF/GGG/file.zip
|
||||||
You can mix up different protocols::
|
You can mix up different protocols::
|
||||||
aria2c http://AAA.BBB.CCC/file.zip ftp://DDD.EEE.FFF/GGG/file.zip
|
aria2c http://AAA.BBB.CCC/file.zip ftp://DDD.EEE.FFF/GGG/file.zip
|
||||||
|
@ -293,7 +290,7 @@ EXAMPLES
|
||||||
|
|
||||||
Download a torrent::
|
Download a torrent::
|
||||||
aria2c -o test.torrent http://AAA.BBB.CCC/file.torrent
|
aria2c -o test.torrent http://AAA.BBB.CCC/file.torrent
|
||||||
Download a torrent using local .torrent file::
|
Download a torrent using a local .torrent file::
|
||||||
aria2c -T test.torrent
|
aria2c -T test.torrent
|
||||||
Download only selected files::
|
Download only selected files::
|
||||||
aria2c -T test.torrent dir/file1.zip dir/file2.zip
|
aria2c -T test.torrent dir/file1.zip dir/file2.zip
|
||||||
|
@ -304,7 +301,7 @@ EXAMPLES
|
||||||
|
|
||||||
Metalink downloading::
|
Metalink downloading::
|
||||||
aria2c --lowest-speed-limit 10K http://AAA.BBB.CCC/file.metalink
|
aria2c --lowest-speed-limit 10K http://AAA.BBB.CCC/file.metalink
|
||||||
Download a file using local .metalink file::
|
Download a file using a local .metalink file::
|
||||||
aria2c -M test.metalink
|
aria2c -M test.metalink
|
||||||
Metalink downloading with preferences::
|
Metalink downloading with preferences::
|
||||||
aria2c -M test.metalink --metalink-version=1.1.1 --metalink-language=en-US
|
aria2c -M test.metalink --metalink-version=1.1.1 --metalink-language=en-US
|
||||||
|
|
|
@ -74,8 +74,9 @@
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
# define SOCKOPT_T const char
|
# define SOCKOPT_T const char
|
||||||
# define HAVE_GETADDRINFO
|
|
||||||
# undef HAVE_GETADDRINFO
|
# undef HAVE_GETADDRINFO
|
||||||
|
# undef HAVE_GAI_STRERROR
|
||||||
|
# undef gai_strerror
|
||||||
#else
|
#else
|
||||||
# define SOCKOPT_T socklen_t
|
# define SOCKOPT_T socklen_t
|
||||||
#endif // __MINGW32__
|
#endif // __MINGW32__
|
||||||
|
|
148
src/main.cc
148
src/main.cc
|
@ -71,6 +71,7 @@ extern int optind, opterr, optopt;
|
||||||
|
|
||||||
#ifdef ENABLE_METALINK
|
#ifdef ENABLE_METALINK
|
||||||
#include "MetalinkRequestInfo.h"
|
#include "MetalinkRequestInfo.h"
|
||||||
|
#include "Xml2MetalinkProcessor.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LIBSSL
|
#ifdef HAVE_LIBSSL
|
||||||
|
@ -125,10 +126,10 @@ void showUsage() {
|
||||||
#endif // ENABLE_METALINK
|
#endif // ENABLE_METALINK
|
||||||
cout << endl;
|
cout << endl;
|
||||||
cout << _("Options:") << endl;
|
cout << _("Options:") << endl;
|
||||||
cout << _(" -d, --dir=DIR The directory to store downloaded file.") << endl;
|
cout << _(" -d, --dir=DIR The directory to store the downloaded file.") << endl;
|
||||||
cout << _(" -o, --out=FILE The file name for downloaded file.") << endl;
|
cout << _(" -o, --out=FILE The file name of the downloaded file.") << endl;
|
||||||
cout << _(" -l, --log=LOG The file path to store log. If '-' is specified,\n"
|
cout << _(" -l, --log=LOG The file name of the log file. If '-' is\n"
|
||||||
" log is written to stdout.") << endl;
|
" specified, log is written to stdout.") << endl;
|
||||||
#ifdef HAVE_DAEMON
|
#ifdef HAVE_DAEMON
|
||||||
cout << _(" -D, --daemon Run as daemon.") << endl;
|
cout << _(" -D, --daemon Run as daemon.") << endl;
|
||||||
#endif // HAVE_DAEMON
|
#endif // HAVE_DAEMON
|
||||||
|
@ -137,10 +138,10 @@ void showUsage() {
|
||||||
" Thus, aria2 connects to each URL with\n"
|
" Thus, aria2 connects to each URL with\n"
|
||||||
" N connections.\n"
|
" N connections.\n"
|
||||||
" Default: 1") << endl;
|
" Default: 1") << endl;
|
||||||
cout << _(" --retry-wait=SEC Set amount of time in second between requests\n"
|
cout << _(" --retry-wait=SEC Set the seconds to wait to retry after an error\n"
|
||||||
" for errors. Specify a value between 0 and 60.\n"
|
" has occured. Specify a value between 0 and 60.\n"
|
||||||
" Default: 5") << endl;
|
" Default: 5") << endl;
|
||||||
cout << _(" -t, --timeout=SEC Set timeout in second. Default: 60") << endl;
|
cout << _(" -t, --timeout=SEC Set timeout in seconds. Default: 60") << endl;
|
||||||
cout << _(" -m, --max-tries=N Set number of tries. 0 means unlimited.\n"
|
cout << _(" -m, --max-tries=N Set number of tries. 0 means unlimited.\n"
|
||||||
" Default: 5") << endl;
|
" Default: 5") << endl;
|
||||||
/*
|
/*
|
||||||
|
@ -149,22 +150,21 @@ void showUsage() {
|
||||||
" value must be greater than or equal to\n"
|
" value must be greater than or equal to\n"
|
||||||
" 1024. Default: 1M") << endl;
|
" 1024. Default: 1M") << endl;
|
||||||
*/
|
*/
|
||||||
cout << _(" --http-proxy=HOST:PORT Use HTTP proxy server. This affects to all\n"
|
cout << _(" --http-proxy=HOST:PORT Use HTTP proxy server. This affects all URLs.") << endl;
|
||||||
" URLs.") << endl;
|
cout << _(" --http-user=USER Set HTTP user. This affects all URLs.") << endl;
|
||||||
cout << _(" --http-user=USER Set HTTP user. This affects to all URLs.") << endl;
|
cout << _(" --http-passwd=PASSWD Set HTTP password. This affects all URLs.") << endl;
|
||||||
cout << _(" --http-passwd=PASSWD Set HTTP password. This affects to all URLs.") << endl;
|
cout << _(" --http-proxy-user=USER Set HTTP proxy user. This affects all URLs.") << endl;
|
||||||
cout << _(" --http-proxy-user=USER Set HTTP proxy user. This affects to all URLs") << endl;
|
cout << _(" --http-proxy-passwd=PASSWD Set HTTP proxy password. This affects all URLs.") << endl;
|
||||||
cout << _(" --http-proxy-passwd=PASSWD Set HTTP proxy password. This affects to all URLs.") << endl;
|
|
||||||
cout << _(" --http-proxy-method=METHOD Set the method to use in proxy request.\n"
|
cout << _(" --http-proxy-method=METHOD Set the method to use in proxy request.\n"
|
||||||
" METHOD is either 'get' or 'tunnel'.\n"
|
" METHOD is either 'get' or 'tunnel'.\n"
|
||||||
" Default: tunnel") << endl;
|
" Default: tunnel") << endl;
|
||||||
cout << _(" --http-auth-scheme=SCHEME Set HTTP authentication scheme. Currently, basic\n"
|
cout << _(" --http-auth-scheme=SCHEME Set HTTP authentication scheme. Currently, basic\n"
|
||||||
" is the only supported scheme.\n"
|
" is the only supported scheme.\n"
|
||||||
" Default: basic") << endl;
|
" Default: basic") << endl;
|
||||||
cout << _(" --referer=REFERER Set Referer. This affects to all URLs.") << endl;
|
cout << _(" --referer=REFERER Set Referer. This affects all URLs.") << endl;
|
||||||
cout << _(" --ftp-user=USER Set FTP user. This affects to all URLs.\n"
|
cout << _(" --ftp-user=USER Set FTP user. This affects all URLs.\n"
|
||||||
" Default: anonymous") << endl;
|
" Default: anonymous") << endl;
|
||||||
cout << _(" --ftp-passwd=PASSWD Set FTP password. This affects to all URLs.\n"
|
cout << _(" --ftp-passwd=PASSWD Set FTP password. This affects all URLs.\n"
|
||||||
" Default: ARIA2USER@") << endl;
|
" Default: ARIA2USER@") << endl;
|
||||||
cout << _(" --ftp-type=TYPE Set FTP transfer type. TYPE is either 'binary'\n"
|
cout << _(" --ftp-type=TYPE Set FTP transfer type. TYPE is either 'binary'\n"
|
||||||
" or 'ascii'.\n"
|
" or 'ascii'.\n"
|
||||||
|
@ -175,105 +175,103 @@ void showUsage() {
|
||||||
" Default: tunnel") << endl;
|
" Default: tunnel") << endl;
|
||||||
cout << _(" --lowest-speed-limit=SPEED Close connection if download speed is lower than\n"
|
cout << _(" --lowest-speed-limit=SPEED Close connection if download speed is lower than\n"
|
||||||
" or equal to this value(bytes per sec).\n"
|
" or equal to this value(bytes per sec).\n"
|
||||||
" 0 means aria2 does not care lowest speed limit.\n"
|
" 0 means aria2 does not have a lowest speed limit.\n"
|
||||||
" You can append K or M(1K = 1024, 1M = 1024K).\n"
|
" You can append K or M(1K = 1024, 1M = 1024K).\n"
|
||||||
|
|
||||||
" This option does not affect BitTorrent download.\n"
|
" This option does not affect BitTorrent downloads.\n"
|
||||||
" Default: 0") << endl;
|
" Default: 0") << endl;
|
||||||
cout << _(" --max-download-limit=SPEED Set max download speed in bytes per sec.\n"
|
cout << _(" --max-download-limit=SPEED Set max download speed in bytes per sec.\n"
|
||||||
" 0 means unrestricted.\n"
|
" 0 means unrestricted.\n"
|
||||||
" You can append K or M(1K = 1024, 1M = 1024K).\n"
|
" You can append K or M(1K = 1024, 1M = 1024K).\n"
|
||||||
" Default: 0") << endl;
|
" Default: 0") << endl;
|
||||||
cout << _(" --file-allocation=METHOD Specify file allocation method. METHOD is either\n"
|
cout << _(" --file-allocation=METHOD Specify file allocation method. METHOD is either\n"
|
||||||
" 'none' or 'prealloc'.\n"
|
" 'none' or 'prealloc'. 'none' doesn't pre-allocate\n"
|
||||||
" 'none' doesn't pre-allocate file space. 'prealloc'\n"
|
" file space. 'prealloc' pre-allocates file space\n"
|
||||||
" pre-allocates file space before download begins.\n"
|
" before download begins. This may take some time\n"
|
||||||
" This may take some time depending on the size of\n"
|
" depending on the size of the file.\n"
|
||||||
" file.\n"
|
|
||||||
" Default: none") << endl;
|
" Default: none") << endl;
|
||||||
cout << _(" --allow-overwrite=true|false If this option set to false, aria2 doesn't\n"
|
cout << _(" --allow-overwrite=true|false If false, aria2 doesn't download a file which\n"
|
||||||
" download a file which already exists in the file\n"
|
" already exists but the corresponding .aria2 file\n"
|
||||||
" system but its corresponding .aria2 file doesn't\n"
|
" doesn't exist.\n"
|
||||||
" exist.\n"
|
|
||||||
" Default: false") << endl;
|
" Default: false") << endl;
|
||||||
#ifdef ENABLE_MESSAGE_DIGEST
|
#ifdef ENABLE_MESSAGE_DIGEST
|
||||||
cout << _(" --check-integrity=true|false Check file integrity by validating piece hash.\n"
|
cout << _(" --check-integrity=true|false Check file integrity by validating piece hash.\n"
|
||||||
" This option makes effect in BitTorrent download\n"
|
" This option only affects in BitTorrent downloads\n"
|
||||||
" and Metalink with chunk checksums.\n"
|
" and Metalink downloads with chunk checksums.\n"
|
||||||
" Use this option to redownload a damaged portion of\n"
|
" Use this option to re-download a damaged portion\n"
|
||||||
" file.\n"
|
" of a file.\n"
|
||||||
" You may need to specify --allow-overwrite=true\n"
|
" You may need to specify --allow-overwrite=true\n"
|
||||||
" option if .aria2 file doesn't exist.\n"
|
" if the .aria2 file doesn't exist.\n"
|
||||||
" Default: false") << endl;
|
" Default: false") << endl;
|
||||||
cout << _(" --realtime-chunk-checksum=true|false Validate chunk checksum while downloading\n"
|
cout << _(" --realtime-chunk-checksum=true|false Validate chunk checksum while\n"
|
||||||
" a file in Metalink mode. This option makes effect\n"
|
" downloading a file in Metalink mode. This option\n"
|
||||||
" in Metalink with chunk checksums.\n"
|
" on affects Metalink mode with chunk checksums.\n"
|
||||||
" Default: true") << endl;
|
" Default: true") << endl;
|
||||||
#endif // ENABLE_MESSAGE_DIGEST
|
#endif // ENABLE_MESSAGE_DIGEST
|
||||||
cout << _(" -c, --continue Continue downloading a partially downloaded\n"
|
cout << _(" -c, --continue Continue downloading a partially downloaded\n"
|
||||||
" file. Use this option to resume a download started\n"
|
" file. Use this option to resume a download\n"
|
||||||
" by web browsers or another programs\n"
|
" started by a web browser or another program\n"
|
||||||
" which download files sequentially from the\n"
|
" which downloads files sequentially from the\n"
|
||||||
" beginning. Currently this option is applicable to\n"
|
" beginning. Currently this option is only\n"
|
||||||
" http(s)/ftp downloads.") << endl;
|
" applicable to http(s)/ftp downloads.") << endl;
|
||||||
cout << _(" -U, --user-agent=USER_AGENT Set user agent for http(s) downloads.") << endl;
|
cout << _(" -U, --user-agent=USER_AGENT Set user agent for http(s) downloads.") << endl;
|
||||||
cout << _(" -n, --no-netrc Disables netrc support.") << endl;
|
cout << _(" -n, --no-netrc Disables netrc support.") << endl;
|
||||||
cout << _(" -i, --input-file=FILE Downloads URIs found in FILE. You can specify\n"
|
cout << _(" -i, --input-file=FILE Downloads URIs found in FILE. You can specify\n"
|
||||||
" multiple URIs for a single entity: deliminate\n"
|
" multiple URIs for a single entity: separate\n"
|
||||||
" URIs by Tab in a single line.\n"
|
" URIs on a single line using the TAB character.\n"
|
||||||
" Reads input from stdin when '-' is specified.") << endl;
|
" Reads input from stdin when '-' is specified.") << endl;
|
||||||
cout << _(" -j, --max-concurrent-downloads=N Set maximum number of concurrent downloads.\n"
|
cout << _(" -j, --max-concurrent-downloads=N Set maximum number of concurrent downloads.\n"
|
||||||
" It should be used with -i option.\n"
|
" It should be used with the -i option.\n"
|
||||||
" Default: 5") << endl;
|
" Default: 5") << endl;
|
||||||
cout << _(" --load-cookies=FILE Load cookies from FILE. The format of FILE is\n"
|
cout << _(" --load-cookies=FILE Load cookies from FILE. The format of FILE is\n"
|
||||||
" one used by Netscape and Mozilla.") << endl;
|
" the same used by Netscape and Mozilla.") << endl;
|
||||||
#if defined ENABLE_BITTORRENT || ENABLE_METALINK
|
#if defined ENABLE_BITTORRENT || ENABLE_METALINK
|
||||||
cout << _(" -S, --show-files Print file listing of .torrent or .metalink file\n"
|
cout << _(" -S, --show-files Print file listing of .torrent or .metalink file\n"
|
||||||
" and exit.") << endl;
|
" and exit.") << endl;
|
||||||
cout << _(" --select-file=INDEX... Set file to download by specifing its index.\n"
|
cout << _(" --select-file=INDEX... Set file to download by specifing its index.\n"
|
||||||
" You can know file index through --show-files\n"
|
" You can find the file index using the\n"
|
||||||
" option. Multiple indexes can be specified by using\n"
|
" --show-files option. Multiple indexes can be\n"
|
||||||
" ',' like \"3,6\".\n"
|
" specified by using ',', for example: \"3,6\".\n"
|
||||||
" You can also use '-' to specify rangelike \"1-5\".\n"
|
" You can also use '-' to specify a range: \"1-5\".\n"
|
||||||
" ',' and '-' can be used together.\n"
|
" ',' and '-' can be used together.\n"
|
||||||
" When used with -M option, index may vary depending\n"
|
" When used with the -M option, index may vary\n"
|
||||||
" on the query(see --metalink-* options).") << endl;
|
" depending on the query(see --metalink-* options).") << endl;
|
||||||
#endif // ENABLE_BITTORRENT || ENABLE_METALINK
|
#endif // ENABLE_BITTORRENT || ENABLE_METALINK
|
||||||
#ifdef ENABLE_BITTORRENT
|
#ifdef ENABLE_BITTORRENT
|
||||||
cout << _(" -T, --torrent-file=TORRENT_FILE The file path to .torrent file.") << endl;
|
cout << _(" -T, --torrent-file=TORRENT_FILE The path to the .torrent file.") << endl;
|
||||||
cout << _(" --follow-torrent=true|false Setting this option to false prevents aria2 to\n"
|
cout << _(" --follow-torrent=true|false Set to false to prevent aria2 from\n"
|
||||||
" enter BitTorrent mode even if the filename of\n"
|
" entering BitTorrent mode even if the filename of\n"
|
||||||
" downloaded file ends with .torrent.\n"
|
" the downloaded file ends with .torrent.\n"
|
||||||
" Default: true") << endl;
|
" Default: true") << endl;
|
||||||
cout << _(" --direct-file-mapping=true|false Directly read from and write to each file\n"
|
cout << _(" --direct-file-mapping=true|false Directly read from and write to each file\n"
|
||||||
" mentioned in .torrent file.\n"
|
" mentioned in .torrent file.\n"
|
||||||
" Default: true") << endl;
|
" Default: true") << endl;
|
||||||
cout << _(" --listen-port=PORT Set port number to listen to for peer connection.\n"
|
cout << _(" --listen-port=PORT Set TCP port number for BitTorrent downloads.\n"
|
||||||
" Default: 6881-6999") << endl;
|
" Default: 6881-6999") << endl;
|
||||||
cout << _(" --max-upload-limit=SPEED Set max upload speed in bytes per sec.\n"
|
cout << _(" --max-upload-limit=SPEED Set max upload speed in bytes per sec.\n"
|
||||||
" 0 means unrestricted.\n"
|
" 0 means unrestricted.\n"
|
||||||
" You can append K or M(1K = 1024, 1M = 1024K).\n"
|
" You can append K or M(1K = 1024, 1M = 1024K).\n"
|
||||||
" Default: 0") << endl;
|
" Default: 0") << endl;
|
||||||
cout << _(" --seed-time=MINUTES Specify seeding time in minutes. See also\n"
|
cout << _(" --seed-time=MINUTES Specify seeding time in minutes. Also see the\n"
|
||||||
" --seed-ratio option.") << endl;
|
" --seed-ratio option.") << endl;
|
||||||
cout << _(" --seed-ratio=RATIO Specify share ratio. Seed completed torrents until\n"
|
cout << _(" --seed-ratio=RATIO Specify share ratio. Seed completed torrents\n"
|
||||||
" share ratio reaches RATIO. 1.0 is encouraged.\n"
|
" until share ratio reaches RATIO. 1.0 is\n"
|
||||||
" If --seed-time option is specified along with\n"
|
" encouraged. If --seed-time option is specified\n"
|
||||||
" this option, seeding ends when at least one of\n"
|
" along with this option, seeding ends when at\n"
|
||||||
" the conditions is satisfied.") << endl;
|
" least one of the conditions is satisfied.") << endl;
|
||||||
#endif // ENABLE_BITTORRENT
|
#endif // ENABLE_BITTORRENT
|
||||||
#ifdef ENABLE_METALINK
|
#ifdef ENABLE_METALINK
|
||||||
cout << _(" -M, --metalink-file=METALINK_FILE The file path to .metalink file.") << endl;
|
cout << _(" -M, --metalink-file=METALINK_FILE The file path to the .metalink file.") << endl;
|
||||||
cout << _(" -C, --metalink-servers=NUM_SERVERS The number of servers to connect to\n"
|
cout << _(" -C, --metalink-servers=NUM_SERVERS The number of servers to connect to\n"
|
||||||
" simultaneously.\n"
|
" simultaneously.\n"
|
||||||
" Default: 5") << endl;
|
" Default: 5") << endl;
|
||||||
cout << _(" --metalink-version=VERSION The version of file to download.") << endl;
|
cout << _(" --metalink-version=VERSION The version of the file to download.") << endl;
|
||||||
cout << _(" --metalink-language=LANGUAGE The language of file to download.") << endl;
|
cout << _(" --metalink-language=LANGUAGE The language of the file to download.") << endl;
|
||||||
cout << _(" --metalink-os=OS The operating system the file is targeted.") << endl;
|
cout << _(" --metalink-os=OS The operating system of the file to download.") << endl;
|
||||||
cout << _(" --metalink-location=LOCATION The location of the prefered server.") << endl;
|
cout << _(" --metalink-location=LOCATION The location of the prefered server.") << endl;
|
||||||
cout << _(" --follow-metalink=true|false Setting this option to false prevents aria2 to\n"
|
cout << _(" --follow-metalink=true|false Set to false to prevent aria2 from\n"
|
||||||
" enter Metalink mode even if the filename of\n"
|
" entering Metalink mode even if the filename of\n"
|
||||||
" downloaded file ends with .metalink.\n"
|
" the downloaded file ends with .metalink.\n"
|
||||||
" Default: true") << endl;
|
" Default: true") << endl;
|
||||||
#endif // ENABLE_METALINK
|
#endif // ENABLE_METALINK
|
||||||
cout << _(" -v, --version Print the version number and exit.") << endl;
|
cout << _(" -v, --version Print the version number and exit.") << endl;
|
||||||
|
@ -281,20 +279,20 @@ void showUsage() {
|
||||||
cout << endl;
|
cout << endl;
|
||||||
cout << "URL:" << endl;
|
cout << "URL:" << endl;
|
||||||
cout << _(" You can specify multiple URLs. All URLs must point to the same file\n"
|
cout << _(" You can specify multiple URLs. All URLs must point to the same file\n"
|
||||||
" or downloading fails.") << endl;
|
" or downloading will fail.") << endl;
|
||||||
cout << endl;
|
cout << endl;
|
||||||
#ifdef ENABLE_BITTORRENT
|
#ifdef ENABLE_BITTORRENT
|
||||||
cout << "FILE:" << endl;
|
cout << "FILE:" << endl;
|
||||||
cout << _(" Specify files in multi-file torrent to download. Use conjunction with\n"
|
cout << _(" Specify files in multi-file torrent to download. Use in conjunction with the\n"
|
||||||
" -T option. This arguments are ignored if you specify --select-file option.") << endl;
|
" -T option. This argument is ignored if you specify the --select-file option.") << endl;
|
||||||
cout << endl;
|
cout << endl;
|
||||||
#endif // ENABLE_BITTORRENT
|
#endif // ENABLE_BITTORRENT
|
||||||
cout << _("Examples:") << endl;
|
cout << _("Examples:") << endl;
|
||||||
cout << _(" Download a file by 1 connection:") << endl;
|
cout << _(" Download a file using 1 connection:") << endl;
|
||||||
cout << " aria2c http://AAA.BBB.CCC/file.zip" << endl;
|
cout << " aria2c http://AAA.BBB.CCC/file.zip" << endl;
|
||||||
cout << _(" Download a file by 2 connections:") << endl;
|
cout << _(" Download a file using 2 connections:") << endl;
|
||||||
cout << " aria2c -s 2 http://AAA.BBB.CCC/file.zip" << endl;
|
cout << " aria2c -s 2 http://AAA.BBB.CCC/file.zip" << endl;
|
||||||
cout << _(" Download a file by 2 connections, each connects to a different server:") << endl;
|
cout << _(" Download a file using 2 connections, each connects to a different server:") << endl;
|
||||||
cout << " aria2c http://AAA.BBB.CCC/file.zip http://DDD.EEE.FFF/GGG/file.zip" << endl;
|
cout << " aria2c http://AAA.BBB.CCC/file.zip http://DDD.EEE.FFF/GGG/file.zip" << endl;
|
||||||
cout << _(" You can mix up different protocols:") << endl;
|
cout << _(" You can mix up different protocols:") << endl;
|
||||||
cout << " aria2c http://AAA.BBB.CCC/file.zip ftp://DDD.EEE.FFF/GGG/file.zip" << endl;
|
cout << " aria2c http://AAA.BBB.CCC/file.zip ftp://DDD.EEE.FFF/GGG/file.zip" << endl;
|
||||||
|
@ -302,7 +300,7 @@ void showUsage() {
|
||||||
cout << endl;
|
cout << endl;
|
||||||
cout << _(" Download a torrent:") << endl;
|
cout << _(" Download a torrent:") << endl;
|
||||||
cout << " aria2c -o test.torrent http://AAA.BBB.CCC/file.torrent" << endl;
|
cout << " aria2c -o test.torrent http://AAA.BBB.CCC/file.torrent" << endl;
|
||||||
cout << _(" Download a torrent using local .torrent file:") << endl;
|
cout << _(" Download a torrent using a local .torrent file:") << endl;
|
||||||
cout << " aria2c -T test.torrent" << endl;
|
cout << " aria2c -T test.torrent" << endl;
|
||||||
cout << _(" Download only selected files:") << endl;
|
cout << _(" Download only selected files:") << endl;
|
||||||
cout << " aria2c -T test.torrent dir/file1.zip dir/file2.zip" << endl;
|
cout << " aria2c -T test.torrent dir/file1.zip dir/file2.zip" << endl;
|
||||||
|
|
Loading…
Reference in New Issue