Tatsuhiro Tsujikawa
3e00be26e8
Include local IP address to DHT GetPeers reply message
...
This is required when DHT is used in private network, where seeder is
initially not known to all nodes. This functionality requires
--bt-external-ip is set since aria2 cannot figure out external IP
address to advertise in general.
2016-05-27 23:28:53 +09:00
suzker
fa43431974
fixed mmap failure check with MAP_FAILED flag
2016-05-27 02:07:02 -07:00
suzker
ef0a2e601f
Compare filesize directly to the numeric max of size_t
2016-05-25 07:43:57 -07:00
suzker
43aea5c940
added filesize overflow check for mmap on 32bit os
2016-05-24 16:37:31 -07:00
Tatsuhiro Tsujikawa
c57259f8e7
Use standard percent-encode for tracker request query
2016-05-23 22:16:04 +09:00
Tatsuhiro Tsujikawa
9d40c47799
Merge branch 'master' into dynamic-select-file
2016-05-22 20:57:33 +09:00
Tatsuhiro Tsujikawa
949a580a14
mingw32: Gain privilege before opening files
2016-05-18 22:59:46 +09:00
Tatsuhiro Tsujikawa
9727b5b256
Merge branch 'master' into dynamic-select-file
2016-05-16 12:27:14 +09:00
Tatsuhiro Tsujikawa
56a114746a
Use std::make_shared for efficiency
2016-05-16 00:05:28 +09:00
Tatsuhiro Tsujikawa
cef9109070
Refactor BtBitfieldMessage
2016-05-16 00:03:02 +09:00
Tatsuhiro Tsujikawa
dae42d0cd0
Remove unused SimpleBtMessage::getMessageLength
2016-05-15 23:44:54 +09:00
Tatsuhiro Tsujikawa
a7237c69f7
Refactor BitTorrent message buffer usage
2016-05-15 23:40:52 +09:00
Tatsuhiro Tsujikawa
cc8375f0b0
Refactor BtHandshakeMessage
2016-05-15 22:00:16 +09:00
Tatsuhiro Tsujikawa
2449ee6a76
Simplify cache write
...
The previous cache write routine was too complex. I'm sure I can
rewrite it to more elegantly. But the primary motivation of this
complex logic is for disk activity reduction on Windows 7, and I
observed it on my old IDE disk. I checked it again recently, and
there is no difference between with and without this complex logic.
For this reason, it was removed. Will revert this change if many of
users are not happy with this.
2016-05-15 18:47:13 +09:00
Tatsuhiro Tsujikawa
bafbbe7c1d
Allow subsecond value in ns cookie.txt file's expiry time field
2016-05-15 18:40:50 +09:00
Tatsuhiro Tsujikawa
6976ffed9e
Adjust chromium cookie time
2016-05-15 17:58:01 +09:00
Tatsuhiro Tsujikawa
3443349fc3
Refactor
2016-05-14 19:50:58 +09:00
Tatsuhiro Tsujikawa
8897d7ec70
Restart active download to apply previously not applicable options
...
Previously, we categorized options that can be used in
aria2.changeOption RPC method into 2 categories. The options in one
category can be applied on the fly, meaning that download continues to
be active while applying options. Another category includes options
which are only applicable when downloads are waiting or paused.
In this change, when active download is ordered to change options
which only applicable in waiting or paused state, it is now paused,
and then automatically restarted. Although we have limited number of
download concurrency, the pause and restart is done atomically, and
the download is inserted at the front of the queue, it is picked up
immediately if the concurrency regulation allows.
2016-05-06 18:31:50 +09:00
Tatsuhiro Tsujikawa
e174b90ff2
Fix compile error
2016-05-02 23:51:16 +09:00
Tatsuhiro Tsujikawa
94a45bfbfc
Documented new options
2016-04-27 00:28:27 +09:00
Tatsuhiro Tsujikawa
db239c2853
Add --stderr option to redirect all stdout log output to stderr
2016-04-27 00:16:55 +09:00
Tatsuhiro Tsujikawa
aa863fa4d1
Add "hide" to --download-result option
2016-04-26 23:35:44 +09:00
Tatsuhiro Tsujikawa
3c637fa3d5
Fix downloaded metaurl torrent filename
2016-04-23 19:29:01 +09:00
Tatsuhiro Tsujikawa
1ce6ac0b23
Add error handling for sigaction, signal and strdup
2016-04-23 18:18:06 +09:00
Tatsuhiro Tsujikawa
b316b2cec5
clang-format
2016-04-21 23:03:24 +09:00
Tatsuhiro Tsujikawa
aab2472390
Remove trailing "." from SAN and CN
2016-04-21 23:02:58 +09:00
rotor
cefea5db5a
Add a little bit of color to have a better visual of important informations
2016-04-20 00:22:34 +09:00
Tatsuhiro Tsujikawa
e8bd019570
Relocate from github.com/tatsuhiro-t/aria2 to github.com/aria2/aria2
2016-04-18 22:31:07 +09:00
Tatsuhiro Tsujikawa
1126722bd3
mingw: Defer the falloc warning until falloc is specified by option
2016-04-18 22:17:41 +09:00
Tatsuhiro Tsujikawa
ca634a82bd
Add bittorrent key to aria2.tellStopped status
2016-04-17 21:06:41 +09:00
Tatsuhiro Tsujikawa
2e0e8ed0e5
Amend
2016-04-15 23:54:10 +09:00
Tatsuhiro Tsujikawa
302bdfd9a0
Merge branch 'RpcTellStatus-Hashing' of https://github.com/kkartaltepe/aria2 into kkartaltepe-RpcTellStatus-Hashing
2016-04-15 23:33:26 +09:00
Tatsuhiro Tsujikawa
8fc28a9e43
clang-format
2016-04-15 23:31:00 +09:00
Tatsuhiro Tsujikawa
cf1dd06d03
Merge branch 'system.listNotifications' of https://github.com/sonnyp/aria2 into sonnyp-system.listNotifications
2016-04-15 23:26:38 +09:00
Tatsuhiro Tsujikawa
437d4aa776
Fix compile error with Android NDK
2016-04-15 23:09:54 +09:00
Tatsuhiro Tsujikawa
a474183bd3
clang-format
2016-04-15 23:09:54 +09:00
Tatsuhiro Tsujikawa
ce868d75bd
Fix issues reported by coverity
2016-04-13 19:20:19 +09:00
Sonny Piers
d3f16a5711
system.listNotifications RPC method
2016-04-08 18:09:50 +02:00
Tatsuhiro Tsujikawa
395b8e93c5
Make single-etnry metalink download with multi-file torrent work
2016-03-27 19:29:19 +09:00
Tatsuhiro Tsujikawa
d64089632e
Merge branch 'master' into random-webseeding
2016-03-26 17:20:27 +09:00
Tatsuhiro Tsujikawa
a7cd943a06
clang-format
2016-03-26 00:35:16 +09:00
Tatsuhiro Tsujikawa
2a8522f6a5
Attemp to fix compile error
2016-03-26 00:32:00 +09:00
Kurt Kartaltepe
2417225023
Report CheckIntegrity info in tellStatus
...
- Adds verifiedLength to tellStatus. Reports the length of data that has
been verified of the current RequestGroup being verified.
- Adds verifyPending to tellStatus. Reports if the RequestGroup has a
verification of integrity pending.
Closes #561
2016-03-22 23:38:38 -05:00
Tatsuhiro Tsujikawa
f316c94710
Ignore floating number in torrent file
2016-03-17 23:28:28 +09:00
Tatsuhiro Tsujikawa
bf3d95c5d1
Give advanced tag to optimize-concurrent-downloads option
2016-03-16 22:11:51 +09:00
Tatsuhiro Tsujikawa
db5af2cec3
Fit into 80 columns
2016-03-16 21:40:42 +09:00
Tatsuhiro Tsujikawa
60d0cb0e24
Remove trailing white spaces
2016-03-16 21:25:43 +09:00
oliviercommelarbre
9e05371fb6
Added support for a dynamic management of the number of concurrent downloads as a function of the overall bandwidth observed
2016-03-16 21:22:49 +09:00
Tatsuhiro Tsujikawa
f0f1b8ef47
clang-format-3.6
2016-03-15 23:49:56 +09:00
Tatsuhiro Tsujikawa
4595aa75e1
SessionSerializer: Fix bug that pause=true is added to wrong item
...
This change also defers writing metadata download to the location
where first its follower download is written.
2016-03-13 16:11:29 +09:00
Tatsuhiro Tsujikawa
21754fa103
Add following to aria2.tellStatus response key as reverse link for followedBy
2016-03-05 14:20:42 +09:00
Tatsuhiro Tsujikawa
74811ddaff
mingw: Add warning for falloc
2016-03-03 22:19:57 +09:00
Nils Maier
fc490ac05c
Update ciphers in AppleTLS
...
Also enable fast start while at it
2016-03-03 06:17:46 +01:00
Tatsuhiro Tsujikawa
8985d66e71
Fix compile error without TLS support
2016-02-23 01:37:38 +09:00
Athmane Madjoudj
c275b6f297
Remove trailing spaces
2016-02-17 00:12:24 +01:00
Athmane Madjoudj
1849ccfbba
Add support for using gnutls system wide crypto policy
2016-02-17 00:11:23 +01:00
Tatsuhiro Tsujikawa
a6970895ac
clang-format
2016-02-16 00:20:12 +09:00
Tatsuhiro Tsujikawa
8d30869966
Fix compile error with --disable-bittorrent
2016-02-15 23:54:51 +09:00
Tatsuhiro Tsujikawa
8684923344
Merge branch 'patch-2' of https://github.com/kwkam/aria2 into kwkam-patch-2
2016-02-13 17:13:25 +09:00
kwkam
04eacf05e7
Update WinConsoleFile.cc
...
add blank line
2016-02-13 16:03:41 +08:00
kwkam
1c573c9708
src/WinConsoleFile.cc: fix colour
...
Try to make it less confusing
2016-02-13 16:01:41 +08:00
Tatsuhiro Tsujikawa
c245c5ecc6
Fix compile error with clang and --enable-werror
2016-02-13 16:33:47 +09:00
kwkam
25ae17b490
src/WinConsoleFile.cc: fix colour
...
Set default foreground/background colour correctly
2016-02-12 14:24:04 +08:00
Tatsuhiro Tsujikawa
5e48e01bf9
Don't inherit file descriptor to child process
...
For non-Mingw32 build, set FD_CLOEXEC to file descriptors which live
beyond function scope. For Mingw32 build, just pass false to
bInheritHandles parameter of CreateProcessW.
2016-02-08 00:09:17 +09:00
Tatsuhiro Tsujikawa
25615fcb17
Add "seeder" key to tellStatus RPC response
2016-02-03 22:21:37 +09:00
Tatsuhiro Tsujikawa
2a4d39b7e8
Don't add C++11 switch flags to CXXFLAGS
2016-01-30 19:14:38 +09:00
Tatsuhiro Tsujikawa
e4d4eabd85
Use std::make_unique if C++14 is used
2016-01-30 19:13:41 +09:00
Tatsuhiro Tsujikawa
cf2fa33fe0
WinTLS: Fix hang because of buffered received data
...
WinTLSSession buffers received decrypted data into its own buffer. If
read is requested, it copies the data from its buffer. But if
requested buffer size is less than decrypted buffer, some of the data
is left in the buffer. Previously, we had no facility to check the
existence of this pending data. If this data is the last requested
data from remote server, we may end up waiting for read event even if
we have already data in our buffer, which may cause hang. This commit
fixes this issue by introducing function to return the buffered length
in TLSSession. SocketCore also provides the same function, which
delegates to TLSSession object.
2016-01-30 00:17:54 +09:00
Tatsuhiro Tsujikawa
8f51793b19
Add --max-mmap-limit option
...
Set the maximum file size to enable mmap (see --enable-mmap
option). The file size is determined by the sum of all files contained
in one download. For example, if a download contains 5 files, then
file size is the total size of those files. If file size is strictly
greater than the size specified in this option, mmap will be disabled.
2016-01-29 00:14:30 +09:00
Tatsuhiro Tsujikawa
fc95a91eb6
mingw: Use SetFileValidData to make --file-allocation=falloc work
2016-01-28 23:15:04 +09:00
Tatsuhiro Tsujikawa
25243da039
mingw: Add formatLastError as wrapper function for FormatMessage
2016-01-28 22:25:46 +09:00
Tatsuhiro Tsujikawa
ad6d799b98
Retry with 504 status code
2016-01-26 15:49:05 +09:00
Tatsuhiro Tsujikawa
8203ee3d0d
Increase DHT transaction ID from 2 to 4 bytes to avoid conflict
2016-01-23 12:39:42 +09:00
Tatsuhiro Tsujikawa
dda0b62fb9
Add --enable-werror option to configure to enable warning flags
2016-01-22 23:22:46 +09:00
Tatsuhiro Tsujikawa
f6fc952486
Don't modify user variables (e.g., CFLAGS, LIBS, etc)
2016-01-22 22:27:39 +09:00
Tatsuhiro Tsujikawa
6da1e9989c
migw: Fix build failure
2016-01-22 22:19:55 +09:00
Tatsuhiro Tsujikawa
d648062851
Replace sourforge reference to the new site
2016-01-22 09:09:58 +09:00
Tatsuhiro Tsujikawa
5892291c55
clang-format-3.6
2016-01-21 23:16:58 +09:00
Tatsuhiro Tsujikawa
aaab5bbc74
Improve error message when loading pkcs12 file failed
2016-01-21 23:13:13 +09:00
Tatsuhiro Tsujikawa
8b93b12488
Reduce delay in tracker request
...
We eliminated 1 second delay between completion of name resolution for
tracker request and time when it is actually issued. We also elimited
1 second delay after last torrent download exists and it is told to
DHTInteractionCommand.
2016-01-19 11:24:57 +09:00
Tatsuhiro Tsujikawa
7b2e797fdf
Disable IPv6 on non-async NameResolver if configuration wants
2016-01-19 10:50:21 +09:00
Tatsuhiro Tsujikawa
ffec92ec57
Fix mysterious 1 second delay with async DNS
2016-01-19 10:42:25 +09:00
Tatsuhiro Tsujikawa
e6b6aa324b
UDP tracker: Log transaction ID and connection ID in hex string
2016-01-19 00:24:21 +09:00
Tatsuhiro Tsujikawa
dd678b7c65
UDP tracker: Use unsigned integer for transaction ID and connection ID
2016-01-18 23:47:31 +09:00
Tatsuhiro Tsujikawa
ddb94ebdac
Fix bug that UDP port was incorrectly used in UDP tracker announce request
2016-01-18 23:29:07 +09:00
Tatsuhiro Tsujikawa
9b41970134
Don't use std::random_device directly as suggested by document
...
See http://en.cppreference.com/w/cpp/numeric/random/random_device
2016-01-17 17:30:36 +09:00
Tatsuhiro Tsujikawa
0282899bfa
Fix compile error
2016-01-16 21:21:16 +09:00
Tatsuhiro Tsujikawa
aa06a17fda
Refactor HttpRequest
...
This also makes comparison performed when replacing builtin header
field with user-defined one case-insensitive.
2016-01-10 16:59:31 +09:00
Tatsuhiro Tsujikawa
bf9d99f291
Send Want-Digest as per RFC 3230
2016-01-10 16:10:57 +09:00
Tatsuhiro Tsujikawa
ea4d99ea08
Refactor SocketCore::getPeerInfo, getAddrInfo to return Endpoint object
2016-01-09 18:17:04 +09:00
Tatsuhiro Tsujikawa
e899eba76f
Define SockAddr and use it instead of raw std::pair
2016-01-09 17:20:03 +09:00
Tatsuhiro Tsujikawa
d2d06395d9
Try all found address set to bind sockets with --multiple-interface
...
Fixes GH-523
2016-01-09 14:06:09 +09:00
Tatsuhiro Tsujikawa
8246fd1ff5
Updating upload size and speed must be done separately
2016-01-05 16:23:58 +09:00
Tatsuhiro Tsujikawa
b1132d6b10
make clang-format using clang-format-3.6
2015-12-27 18:40:08 +09:00
Tatsuhiro Tsujikawa
4abad2f64c
Exclude src/usage_text.h from clang-format
2015-12-27 18:36:36 +09:00
Tatsuhiro Tsujikawa
22e18e5983
Fix compile error on travis
2015-12-26 21:08:06 +09:00
Tatsuhiro Tsujikawa
d0ccb39880
Add system.listMethods RPC method
...
system.listMethods just returns the available RPC method names. It
can be executed without secret token, because it just returns the
method names, and does not alter anything.
See GH-437
2015-12-26 20:58:42 +09:00
Tatsuhiro Tsujikawa
b9435f8786
Clean up
2015-12-26 19:03:50 +09:00
Tatsuhiro Tsujikawa
0a63a7ecc3
Add clang-format
...
Use clang-format-3.6 for now.
2015-12-23 18:00:49 +09:00
Tatsuhiro Tsujikawa
bc1c9cae00
Cleanup
2015-12-23 17:34:09 +09:00
Tatsuhiro Tsujikawa
8512fe992e
Support content-range from non-compliant server
...
See GH-509
2015-12-19 19:26:39 +09:00
Tatsuhiro Tsujikawa
8709015024
Reduce UDP tracker request timeout
...
See GH-507
2015-12-19 18:26:10 +09:00
Tatsuhiro Tsujikawa
b89dc77407
Update doc
2015-12-19 11:35:30 +09:00
Tatsuhiro Tsujikawa
029d6897f2
Apply --retry-wait when retrying after 404
...
Previously, --retry-wait was not used when retrying after 404
(--max-file-not-found). The retry was done without delay. Also the
maximum retry count (--max-retries) was ignored when retrying with
404.
This commit makes --retry-wait apply for retrying with 404 as well.
It also combines --max-retries and --max-file-not-found. When
retrying with 404, it is counted toward retry count.
2015-12-18 23:00:35 +09:00
Tatsuhiro Tsujikawa
c54ecdf8e1
Fix compile error with LibreSSL
2015-12-17 17:21:28 +09:00
Tatsuhiro Tsujikawa
79e3381173
Compile with OpenSSL 1.1.0-pre1
2015-12-14 21:11:06 +09:00
Tatsuhiro Tsujikawa
9a77c404f7
Fix bug that pause/unpause seeding torrent prevents new downloads from starting
...
Previously, with --bt-detach-seed-only, when user issued pause and
unpause command to seeding torrent, and it was started again, and it
immediately got seeding status, but aria2 did not start new download
waiting in the queue. This commit fixes this bug.
See GH-490
2015-12-02 23:49:38 +09:00
Nils Maier
cccbc59026
mingw: fix handle leak in File::size
2015-12-01 14:24:17 +01:00
Tatsuhiro Tsujikawa
8fbfb3ac84
Log tracker request URI when processing response failed
2015-11-30 23:29:57 +09:00
Tatsuhiro Tsujikawa
35f08f05ef
Add --bt-enable-hook-after-hash-check option
...
This option sets flag which allows hook command invocation after hash
check (see -V option) in BitTorrent download. By default, when hash
check succeeds, the command given by --on-bt-download-complete is
executed. To disable this action, give false to this option.
2015-11-29 18:54:19 +09:00
Tatsuhiro Tsujikawa
e8a9a366db
Add --socket-recv-buffer-size option
...
Set the maximum socket receive buffer in bytes. Specifing 0 will
disable this option. This value will be set to socket file descriptor
using SO_RCVBUF socket option with setsockopt() call.
See GH-487 about the usecase of this option
2015-11-28 14:12:23 +09:00
Tatsuhiro Tsujikawa
699f04d0b8
Disable --deferred-input when --save-session is used together
...
With --deferred-input=true, aria2 only reads input file to fill active
download slots, while keeping input file open. Meanwhile,
--save-session saves all download info inside memory, but this does
not take into account of unread item in input file. This will lead to
lose input data in saved session file. Also current BufferedFile
implementation used to read/write input/output file take a lock on
Windows. This effectively prevents session serializer from writing
session data to the same file which is still kept open because of
--deferred-input. See GH-493
2015-11-28 13:02:21 +09:00
Tatsuhiro Tsujikawa
d0b6a88f9c
Base32 decode lowercased characters as well
2015-11-25 23:08:24 +09:00
Tatsuhiro Tsujikawa
432675e512
mingw: Use GetFileSize to get file size
...
_wstat family does not work with symbolic links. They always returns
size 0. To workaround this, we now use GetFileSize to get file size.
To do that, we need to first obtain file HANDLE, which is a bit
tedious because of the messy interface of CreateFileW, but we have no
way to get around it.
2015-11-23 12:30:49 +09:00
Tatsuhiro Tsujikawa
c2157e608e
Fix bug that file allocation=trunc get stuck with Windows symlink
2015-11-22 00:36:43 +09:00
Jarda Snajdr
06b8874a49
Send the last error message as part of tellStatus RPC response
2015-11-18 14:54:29 +01:00
Tatsuhiro Tsujikawa
dfadc2e68b
Use cached filesize instead of calling size() again
2015-11-14 00:09:40 +09:00
Tatsuhiro Tsujikawa
3974c1223b
Don't enable mmap if file allocation is disabled
...
Without file allocation, we cannot map file because file length could
be zero.
This could fix bug reported at GH-478
2015-11-12 22:42:24 +09:00
Tatsuhiro Tsujikawa
af98861aff
Evict timed out pooled socket periodically
...
Previously we only scanned pool socket to check they are timed out
when we pooled another socket. This means that pooled socket is not
closed long time (stays in CLOSE-WAIT state) if we don't pool any more
socket. In this commit, we now check pooled socket periodically (30
seconds) to avoid the sockets hanging in CLOSE-WAIT state long time.
See GH-477
2015-11-11 22:31:00 +09:00
Tatsuhiro Tsujikawa
269520ee69
Don't write control file if content is not changed from previous one
...
This is desirable so that we don't have to wake up disk if control
file is not changed, and it is not have to be written again. We use
the same method (SHA1 hash) to check the content is the same. The
limitation is the hash is stored in memory, so we have to write the
first time in each session.
See GH-382
2015-11-10 23:02:21 +09:00
Tatsuhiro Tsujikawa
5ccd5b6953
Remove content-length and content-range if transfer-encoding is given
...
See GH-473
2015-11-04 00:28:44 +09:00
Tatsuhiro Tsujikawa
4bbc71c8e6
Retry after 404 status if --max-file-not-found > 0
2015-10-24 01:15:43 +09:00
Tatsuhiro Tsujikawa
c81b132112
Merge branch 'master' into random-webseeding
2015-10-03 17:59:39 +09:00
Tatsuhiro Tsujikawa
85faafcaf2
Fix bug that progress summary is not shown timely
2015-09-29 21:16:41 +09:00
Tatsuhiro Tsujikawa
031b86d512
Return 400 status code if there is an error in RPC level
...
200 status code means success. Since the request did not succeed, we
should avoid it.
2015-09-21 22:58:31 +09:00
Tatsuhiro Tsujikawa
17e5c98ba6
Return 200 HTTP status code if exception was caught while executing RPC method
...
Previously, we returned 500 HTTP status code. I think the found in
RPC level, not in HTTP protocol, so 500 is not appropriate.
2015-08-15 17:56:05 +09:00
Tatsuhiro Tsujikawa
925b5cec07
WinTLS: Fix potential infinite loop
2015-08-07 22:20:04 +09:00
Tatsuhiro Tsujikawa
52c68c431d
Fix on-download-error is executed even if download succeeded
2015-08-01 21:42:03 +09:00
Tatsuhiro Tsujikawa
f6f3bd3c3a
Merge branch 'mingw' of https://github.com/elieux/aria2 into elieux-mingw
2015-07-19 16:30:39 +09:00
Tatsuhiro Tsujikawa
c3b89d37e1
Increase --select-file upper bound to 1m for torrent containing lots of files
2015-07-08 21:37:49 +09:00
Tatsuhiro Tsujikawa
7e3d82cb22
Fix busy loop with --dry-run and 4xx response for URI listed in metalink
...
See GH-430
2015-06-26 21:38:03 +09:00
Nils Maier
a3ba5c0588
Make clang (OSX) happy again
2015-06-24 14:26:43 +02:00
Nils Maier
3f2b5dce2f
Make LibuvEventPoll compatible with the latest libuv again
2015-06-24 13:59:44 +02:00
Tatsuhiro Tsujikawa
11b25b7a55
Fix formatting issue for avg speed in Download Result
2015-06-22 22:18:58 +09:00
Tatsuhiro Tsujikawa
1adef4db0c
Fix compile warning with Mingw64 x86 build
2015-06-21 20:53:08 +09:00
Tatsuhiro Tsujikawa
318c804504
Use user-defined literal for k, m, and g (powers of 1024)
2015-06-21 19:29:54 +09:00
Tatsuhiro Tsujikawa
8ba9b04747
Cleanup for defines
2015-06-21 17:42:27 +09:00
Tatsuhiro Tsujikawa
f5ff5da9da
Use constexpr for macros defined in BtConstants.h
2015-06-21 17:33:23 +09:00
Tatsuhiro Tsujikawa
95f2c00c71
Remove unused macros defined in util.h
2015-06-21 17:17:40 +09:00
Tatsuhiro Tsujikawa
7b3f94145d
Make constexpr macros in DHTConstant.h
2015-06-21 17:05:02 +09:00
Tatsuhiro Tsujikawa
0b48bb1dbd
Use user-defined literals for time units
2015-06-21 15:30:02 +09:00
Tatsuhiro Tsujikawa
dd277b33af
gnutls: Allow SIGN-RSA-SHA1 for compatibility reason
2015-06-21 15:16:15 +09:00
Tatsuhiro Tsujikawa
377eb0699f
Use std::begin and std::end
2015-06-11 23:51:41 +09:00
Tatsuhiro Tsujikawa
37c2edd97a
Use std::shuffle, instead of std::random_shuffle
2015-06-11 22:40:56 +09:00
Tatsuhiro Tsujikawa
8448b5062f
Use std::begin and std::end
2015-06-11 21:37:00 +09:00
Tatsuhiro Tsujikawa
2bbec1086d
Use std::make_shared
2015-06-11 21:25:19 +09:00
Tatsuhiro Tsujikawa
ce89e26e55
Remove clock_gettime detection and its replacements
2015-06-09 03:45:40 +09:00
Tatsuhiro Tsujikawa
826c239ed2
Fix compiler warning on 32 bit platform
2015-06-09 03:24:14 +09:00
Tatsuhiro Tsujikawa
b0f440e631
Rewrite Time with chrono
2015-06-09 03:15:10 +09:00
Tatsuhiro Tsujikawa
99cd73c092
Replace timer facility with chrono lib
2015-06-09 02:05:34 +09:00
Vasilij Schneidermann
8bc1d37b3a
Make config and cache files conform to XDG
...
See http://standards.freedesktop.org/basedir-spec/latest/ for further
details. This implementation decides the default based on whether a
file exists at the legacy location, if it doesn't, it picks the
XDG-conforming location instead.
2015-06-02 15:54:27 +02:00
Tatsuhiro Tsujikawa
bb8df11d7e
ftp, sftp: Fix heap-after-free bug on exception
2015-05-28 22:15:25 +09:00
Tatsuhiro Tsujikawa
70541498d8
ftp: Fix timeout when reusing FTP connection
2015-05-28 22:14:43 +09:00
Tatsuhiro Tsujikawa
e30becdbed
Fix uninitialized field bug in WebSocketSession
2015-05-23 21:17:47 +09:00
Tatsuhiro Tsujikawa
fa3401dcb2
Update copyright year in -v output
2015-05-21 00:52:49 +09:00
Tatsuhiro Tsujikawa
ee12923122
Arrange #ifdef guard so that formatter does not get fooled
2015-05-16 20:58:51 +09:00
Tatsuhiro Tsujikawa
c26da09687
Add --ssh-host-key-md option
...
Set checksum for SSH host public key. Use same syntax with --checksum
option. TYPE is hash type. The supported hash type is sha-1 or
md5. DIGEST is hex digest. For example:
sha-1=b030503d4de4539dc7885e6f0f5e256704edf4c3. This option can be
used to validate server's public key when SFTP is used. If this
option is not set, which is default, no validation takes place.
2015-05-16 19:43:11 +09:00
Ryan Steinmetz
ceee04cfe8
Allow netrc-path to be specified in the config file
2015-05-14 21:20:11 +09:00
multisnow
e84176d1f0
fix build error without libssh2
2015-05-14 08:44:17 +08:00
Tatsuhiro Tsujikawa
3855205026
Exit with 32 status code if checksum verification failed
2015-05-12 23:08:10 +09:00
Tatsuhiro Tsujikawa
62826d691d
ftp: Fix accessing first element in empty segments vector
2015-05-12 22:42:26 +09:00
Tatsuhiro Tsujikawa
5723f4211a
sftp: Seek to the correct position to resume, fix slow start of transfer
2015-05-12 22:31:14 +09:00
Tatsuhiro Tsujikawa
2758fba10c
sftp: Add SFTP and libssh2 to feature summary, and add tests
2015-05-12 00:52:50 +09:00
Tatsuhiro Tsujikawa
46595e77d7
sftp: Guard sftp code with HAVE_LIBSSH2
2015-05-12 00:37:21 +09:00
Tatsuhiro Tsujikawa
21c328fc11
sftp: Make sftp works through HTTP proxy
2015-05-12 00:32:30 +09:00
Tatsuhiro Tsujikawa
d0ad7033c3
sftp: basic download works
...
This commits implements basic downloading feature for sftp URI. This
includes segmented downloads, and connection (sftp session) pooling.
Download via HTTP proxy has not been implemented yet.
2015-05-12 00:31:57 +09:00
Tatsuhiro Tsujikawa
82ba003209
Add basic ssh/sftp code to SocketCore and introduce SSHSession
...
We use libssh2 to implement sftp feature. SSHSession is closely
designed to TLSSession, but it differs in several aspects. In this
code, we only implements read part of sftp, since aria2 won't offer
uploading feature. Adding SSH/sftp to SocketCore is a bit bloat. But
by doing this we can reuse DownloadCommand, without mostly no
modification. We can just create SSHDownloadCommand by inheriting it,
just like existing ftp.
2015-05-10 00:00:23 +09:00
Tatsuhiro Tsujikawa
0ab23e7a8d
Document --multiple-interface option
...
Thic commit documents --multiple-interface option, and move option
handler for it to the place alphabetical order as we do usually
2015-04-22 22:48:49 +09:00
Tatsuhiro Tsujikawa
45199d3691
Merge branch 'master' of https://github.com/sarim/aria2 into sarim-master
2015-04-22 00:08:57 +09:00
Sarim Khan
34d773a465
multiple interface support for link aggregation
...
fix: wrong variable
2015-04-21 20:59:38 +06:00
Tatsuhiro Tsujikawa
692a674fe0
SocketRecvBuffer: Eliminate memmove
...
Since we don't try to read into buffer if buffer is not empty, we
don't have to memmove things. This commit mostly rewrites
SocketRecvBuffer.
2015-04-14 00:25:23 +09:00
David Macek
20a04c1b8d
Fix linking with libintl on MinGW-w64
2015-04-03 00:40:06 +02:00
Tatsuhiro Tsujikawa
8ed8ac0fe8
Remove extra space between # and define
...
Fixes GH-356
2015-03-23 23:38:31 +09:00
Tatsuhiro Tsujikawa
d03c7b32c6
Refactor MultiDiskAdaptor::closeFile() and add assert for debugging
2015-03-22 18:38:50 +09:00
Tatsuhiro Tsujikawa
b324be70ad
Run on-bt-download-complete command when -V reports download finished
...
See GH-355
2015-03-22 17:58:13 +09:00
Tatsuhiro Tsujikawa
7f9bb0e2da
Use dedicated DiskWriter in MultiDiskFileAllocationIterator
...
We have to use dedicated DiskWriter instead of
(*entryItr_)->getDiskWriter(). This is because
SingleFileAllocationIterator cannot reopen file if file is closed by
OpenedFileCounter.
2015-03-22 01:32:38 +09:00
Nils Maier
c248d456d1
Comment getrandom code a bit
2015-03-18 01:46:26 +01:00
Nils Maier
ee63dff225
Fix getrandom for system with libc not including errno or systems
...
not supporting ENOSYS in the first place.
Fixes GH-347
2015-03-18 01:46:21 +01:00
Tatsuhiro Tsujikawa
c17b98a9fc
Don't send back rpc-secret option value in aria2.getGlobalOption RPC method
2015-03-13 01:09:01 +09:00
Tatsuhiro Tsujikawa
762ab15450
Avoid copy
2015-03-13 00:18:14 +09:00
Tatsuhiro Tsujikawa
cb5ccf6a7a
SocketBuffer: Keep sending until blocked
...
See GH-345
2015-03-08 21:15:12 +09:00
Tatsuhiro Tsujikawa
649c49dcc6
Mingw: Use _wgetenv to get user's home directory
...
Fixes GH-342
2015-02-21 01:49:07 +09:00
Tatsuhiro Tsujikawa
c63fc414c3
Add --stream-piece-selector=random
2015-02-14 18:33:37 +09:00
Nils Maier
ba0e32abae
Handle linux getrandom returning EINTR on interrupts/signals
...
Also handle ENOTSUP failures where aria2 was build with linux headers
newer than the actual running kernel.
Fixes GH-336
2015-02-07 17:18:45 +01:00
Tatsuhiro Tsujikawa
9d577b0ad7
Fix adjustAnnounceUri parameter is not passed
2015-02-07 00:39:33 +09:00
Tatsuhiro Tsujikawa
4cf0bb742f
Shuffle web-seeding URIs
2015-02-07 00:38:03 +09:00
Tatsuhiro Tsujikawa
e1739c8ee7
Fix compile error without SSL/TLS enabled
2015-02-01 21:32:47 +09:00
Tatsuhiro Tsujikawa
d5d21d20d7
Support HTTP date ending "+0000" as well as "GMT".
2015-01-26 21:31:47 +09:00
Nils Maier
81bdd5f61a
Revise getRandom facilities
...
Use one of the following to provide random bytes:
- Windows CryptGenRandom
- Linux getrandom (syscall interface to urandom, without nasty corner
cases such as file descriptor exhaustion or re-linked /dev/urandom)
- std::device_random (C++ random device, which usually will be urandom)
This also equalizes util::getRandom and SimpleRandomizer (the former
will now use the latter) instead of having essentially two different
PRNG interfaces with potentially different quality.
Closes GH-320
2015-01-20 22:37:24 +01:00
Tatsuhiro Tsujikawa
bec6461262
Merge branch 'comments' of https://github.com/dfandrich/aria2 into dfandrich-comments
2015-01-16 21:36:22 +09:00
Dan Fandrich
0538aa40da
Fixed some typos in code comments
2015-01-16 01:17:35 +01:00
Dan Fandrich
8c53e37c21
Added debug log of all Metalink URLs with final priorities
2015-01-16 00:29:17 +01:00
Tatsuhiro Tsujikawa
d0c20e158e
Fix typo
2015-01-13 23:41:59 +09:00
Tatsuhiro Tsujikawa
9f4e76d1b7
Fix indentation in usage output
2015-01-12 17:49:45 +09:00
Tatsuhiro Tsujikawa
c653c72dc8
Add --bt-force-encryption option
...
This option requires BitTorrent message payload encryption with
arc4. This is a shorthand of --bt-requre-crypto
--bt-min-crypto-level=arc4. If true is given, deny legacy BitTorrent
handshake and only use Obfuscation handshake and always encrypt
message payload. This option defaults to false.
2015-01-12 17:46:20 +09:00
Nils Maier
0895008e5c
Fix SSLv3 warnings being issued on connection reuse.
...
And also improve tlsHandshake code a bit in the process, mostly by being
more explicit about error conditions.
2014-12-30 22:36:24 +01:00
Nils Maier
590aa21c68
Add backward-compatible libuv defs
2014-12-30 22:36:24 +01:00
Nils Maier
e0812d5ad1
Fix another printf related warning
2014-12-29 03:15:50 +01:00
Tatsuhiro Tsujikawa
ff2a630efe
GNUTLS: Remove ifdef for GNUTLS_TLS* since they are not macros
...
Since they are not macros, we get always TLS_PROTO_NONE (otherwise you
are using SSLv3 and you will get warning nonetheless) and get warning.
2014-12-26 18:08:41 +09:00
Tatsuhiro Tsujikawa
d755df2505
TLS: Fix memory leak with OpenSSL
...
Based on the patch submitted by midnight2k
2014-12-26 18:04:50 +09:00
Tatsuhiro Tsujikawa
701e5df790
Merge branch 'master' into warn-ssl3
2014-12-15 23:44:41 +09:00
Nils Maier
48bcb47a30
Refine messages to include peer info
2014-12-14 10:34:09 +01:00
Nils Maier
3c8704178a
Move warn logic into SocketCore
...
Also fiddle a bit with the WinTLS implementation, forcing "strong"
crypto only for > SSLv3.
2014-12-14 10:34:09 +01:00
Nils Maier
b0cdbfe9e7
Fix ASYNC_DNS code in LibuvEventPoll
2014-12-13 08:14:07 +01:00
Nils Maier
c5c38bf3a4
Warn about insecure SSL connections.
...
Fixed GH-313
2014-12-12 18:24:19 +01:00
Nils Maier
811c0f758d
Port poll changes to LibuvEventPoll
2014-12-12 12:21:39 +01:00
Nils Maier
6f9ea555c2
Fix compiler warning
2014-12-12 10:34:53 +01:00
Nils Maier
46aa2f6af3
Fix AppleTLSContext protocol selection
2014-12-12 09:29:33 +01:00
Nils Maier
0e5ed611d1
AppleTLS: Set error state when handshake fails...
...
+ some minor formatting issues.
2014-12-11 12:12:04 +01:00
Tatsuhiro Tsujikawa
73d752fb1c
Add --min-tls-version option
...
The --min-tls-version option specifies minimum SSL/TLS version to
enable. Possible Values: SSLv3, TLSv1, TLSv1.1, TLSv1.2 Default: TLSv1
2014-12-06 17:50:35 +09:00
Tatsuhiro Tsujikawa
62fba76666
Compile with old OpenSSL
2014-12-05 22:43:16 +09:00
Tatsuhiro Tsujikawa
6d3bd60905
LibgnuTLSSession: Disable SSLv3
2014-11-29 20:00:46 +09:00
Tatsuhiro Tsujikawa
71d8424318
LibsslTLSContext: Disable SSLv3 and enable ECDHE cipher suites
2014-11-29 19:33:50 +09:00
Tatsuhiro Tsujikawa
bb6fae2f00
LibsslTLSSession: Strict clean shutdown detection
2014-11-14 21:46:06 +09:00
Tatsuhiro Tsujikawa
2cec9df2a2
Fix crash when JSON batch response vector is empty
2014-10-16 22:56:23 +09:00
Tatsuhiro Tsujikawa
f72a303b8d
Add --bt-detach-seed-only option
...
This option excludes seed only downloads when counting concurrent
active downloads (-j option). This means that if -j3 is given and
this option is turned on and 3 downloads are active and one of those
enters seed mode, then it is excluded from active download count (thus
it becomes 2), and the next download waiting in queue gets started.
But be aware that seeding item is still recognized as active download
in RPC method.
2014-10-14 00:13:29 +09:00
Tatsuhiro Tsujikawa
09d7956537
mingw: Use MoveFileExW for better atomic move
2014-10-10 23:49:53 +09:00
David Macek
784d0e5e51
Work around libintl's vprintf macro messing with OutputFile::vprintf
2014-10-05 11:27:17 +02:00
Tatsuhiro Tsujikawa
d8cde1f499
Rewrite auto_deleter_r with defer function template
2014-09-16 23:49:50 +09:00
Tatsuhiro Tsujikawa
fa5998ba85
Rewrite expression template to make it a bit easier
2014-09-16 21:53:35 +09:00
Tatsuhiro Tsujikawa
b63c1dce08
SessionSerializer: Use std::unique_ptr instead of std::shared_ptr
2014-09-15 16:43:46 +09:00
Tatsuhiro Tsujikawa
306d92a1da
Move req
2014-09-15 14:23:00 +09:00
Tatsuhiro Tsujikawa
9a931e7c61
Fix crash on OSX when proxy is used
...
See GH-275
2014-09-15 14:19:59 +09:00
Tatsuhiro Tsujikawa
9b84727324
Use std::make_shared and make_unique where possible, part 2
2014-09-13 18:37:57 +09:00
Tatsuhiro Tsujikawa
596e5c6162
Refactor event poll classes so that we don't have to allocate memory on query
...
I left Port and libuv classes, since I don't have them compiled.
So they were updated minimally.
2014-09-13 17:33:22 +09:00
Tatsuhiro Tsujikawa
f55c16c7ed
Use std::unique_ptr for DHTBucketTree's left and right pointers
2014-09-13 00:49:08 +09:00
Tatsuhiro Tsujikawa
e18e8aeeaa
Support Adler32 checksum
...
Adler32 checksum is available for --checksum option and hash element
in Metalink files. Currently, we use Adler32 implementation in Zlib.
2014-09-13 00:08:07 +09:00
Tatsuhiro Tsujikawa
d91f7dc721
Use lambda
2014-09-13 00:08:07 +09:00
Tatsuhiro Tsujikawa
2807258279
Use std::make_shared and make_unique where possible, part 1
2014-09-13 00:07:21 +09:00
Tatsuhiro Tsujikawa
bee7a8317c
Update doc
2014-09-12 02:02:33 +09:00
Tatsuhiro Tsujikawa
c0b8b471ab
Fix hash function comparator
2014-09-11 23:54:17 +09:00
Nils Maier
e0d6d04fe8
WinTLS: Fix abrupt connection closing and closing in general.
...
Fixes GH-277
2014-09-10 16:26:34 +02:00
Tatsuhiro Tsujikawa
04f875e273
WinTLS: Return 0 if eof_ is true and decBuf_ is empty
2014-09-10 21:45:08 +09:00
Tatsuhiro Tsujikawa
83c78c497b
LibsslTLSSession: Treat 0 from readData as EOF
2014-09-10 21:26:06 +09:00
Tatsuhiro Tsujikawa
e7e80e5ec6
WinTLS: Fix busy loop on EOF
...
Fixes gh#277
2014-09-10 01:11:57 +09:00
Nils Maier
0f805fb962
Silence some compiler warnings in SessionSerializer.
2014-08-30 02:03:57 +02:00
Nils Maier
bd29fd2c30
Always include raw OS version number on Windows
2014-08-30 01:15:40 +02:00
Nils Maier
bc5d9e5466
Fix typo in FeatureConfig/OS detection
2014-08-30 01:03:58 +02:00
Tatsuhiro Tsujikawa
ae631513f3
Replace A2_ARRAY_LEN with constexpr arraySize
2014-08-29 23:37:31 +09:00
Tatsuhiro Tsujikawa
e74b39deaf
Fix crash in OpenedFileCounter::ensureMaxOpenFileLimit()
...
The crash happens if PieceStorage and/or DiskAdaptor are not
initialized in one of active RequestGroups.
2014-07-30 22:31:48 +09:00
Tatsuhiro Tsujikawa
bd0a3960df
mingw32: Fix bug that aria2 does not read piped stdin
2014-07-30 00:38:45 +09:00
Tatsuhiro Tsujikawa
c659fe939d
Fix std::length_error when no_proxy is used
...
This is regression introduced in 8cada497
.
2014-07-26 16:12:10 +09:00
Nils Maier
8732a24433
Try to set sane limits for RLIMIT_NO_FILE
...
E.g. on OSX the default is 256, which isn't exactly compatible with
torrent downloads.
Closes GH-257
2014-07-22 21:58:31 +02:00
Nils Maier
70a80b1455
Remove request pre-authorization again
2014-07-22 21:58:30 +02:00
Nils Maier
8f2af33b6d
Delay auth failures instead of PBKDF2
...
Closes GH-256
2014-07-22 21:58:30 +02:00
diadistis
9b1667fe81
Fixed segfault unsupported encodings
2014-07-20 18:06:09 +03:00
Tatsuhiro Tsujikawa
d69764879e
Fix regression 100% CPU utility when -V is used and download is multi-file BT
...
This is regression of a3426821c8
2014-07-20 18:36:52 +09:00
Tatsuhiro Tsujikawa
b611cd2bdc
UnknownLengthPieceStorage: Use std::make_shared
2014-07-15 23:48:32 +09:00
Tatsuhiro Tsujikawa
a6b7bd0342
Show bitfield for unknown length download in aria2.tellStatus RPC method
...
Generally, bitfield is not available for download whose total length
is unknown. We create bitfield when download is completed (usually
connection EOF) so that we can use it to show additional info in RPC
aria2.tellStatus response. Specifically, bitfield is now shown. And
completedLength under files key (or completedLength in
aria2.getFiles() response) is correctly shown.
2014-07-15 23:36:10 +09:00
Tatsuhiro Tsujikawa
98681552fc
Fix compile error on big endian platform
2014-07-14 21:32:48 +09:00