Commit Graph

1140 Commits (db5af2cec3d058fcb33ffee7a3d9d3641a03fddd)

Author SHA1 Message Date
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 2a4d39b7e8 Don't add C++11 switch flags to CXXFLAGS 2016-01-30 19:14:38 +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 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 dd678b7c65 UDP tracker: Use unsigned integer for transaction ID and connection ID 2016-01-18 23:47: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 e92027b9f0 clang-format 2016-01-05 16:23:58 +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 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 8512fe992e Support content-range from non-compliant server
See GH-509
2015-12-19 19:26:39 +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 5ccd5b6953 Remove content-length and content-range if transfer-encoding is given
See GH-473
2015-11-04 00:28:44 +09:00
Nils Maier a3ba5c0588 Make clang (OSX) happy again 2015-06-24 14:26:43 +02: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 f5ff5da9da Use constexpr for macros defined in BtConstants.h 2015-06-21 17:33:23 +09:00
Tatsuhiro Tsujikawa 0b48bb1dbd Use user-defined literals for time units 2015-06-21 15:30:02 +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
Tatsuhiro Tsujikawa 2758fba10c sftp: Add SFTP and libssh2 to feature summary, and add tests 2015-05-12 00:52:50 +09:00
Tatsuhiro Tsujikawa 9cbbe9f1bb Split UtilTest.cc into UtilTest1.cc and UtilTest2.cc 2015-02-08 00:31:33 +09:00
Tatsuhiro Tsujikawa 4cf0bb742f Shuffle web-seeding URIs 2015-02-07 00:38:03 +09:00
Nils Maier de37dbf13d Remove some left-over code from converting a test.
Checking once with CPPUNIT_ASSERT_MESSAGE should suffice.
2015-01-26 18:31:19 +01: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 1185972042 Update .gitignore 2014-10-18 19:00:02 +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 c0b8b471ab Fix hash function comparator 2014-09-11 23:54:17 +09:00
Tatsuhiro Tsujikawa ae631513f3 Replace A2_ARRAY_LEN with constexpr arraySize 2014-08-29 23:37:31 +09: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
Tatsuhiro Tsujikawa 04caefa406 Fix test failure with --enable-libaria2 2014-07-14 00:06:32 +09:00
Tatsuhiro Tsujikawa 7fbd8a50ef Fix compile error and warning with clang 2014-07-12 17:44:43 +09:00
Tatsuhiro Tsujikawa 3aaa5a7344 Fix file length information in RPC response when length > 2GB is unknown
This commit fixes the bug that aria2.tellStopped RPC method returns
total length and completedLength as 0 when file size is unknown in
advance and turns out > 2GB in the end.  This commit and addresses the
performance degradation in this case.
2014-07-12 17:01:46 +09:00
Nils Maier 8587669995 Fix big endianess support in InternalMessageDigest and PBKDF2
- Replace sha1/md5 implementation by ones from https://github.com/nmaier/crypto
- Add endianess functionality fro https://github.com/nmaier/crypto

Closes GH-239
2014-06-24 20:45:05 +02:00
Tatsuhiro Tsujikawa c0e4381780 util::parseIntSegments: Return SegList<int> 2014-06-04 23:21:01 +09:00
Tatsuhiro Tsujikawa 007b890fe4 bittorrent::computeFastSet: Return std::vector 2014-06-04 22:50:39 +09:00
Tatsuhiro Tsujikawa 9b54272190 FileEntry::getUris: Return std::vector<std::string> 2014-06-04 22:33:46 +09:00
Tatsuhiro Tsujikawa 4f3c526dcd Support PREF_DIR change for Metalink files
Reworked previous commit adeead6f03, and
now support changing PREF_DIR for Metalink downloads.
2014-06-04 21:45:12 +09:00
Nils Maier b1a8df4cd9 Disable PBKDF2 load test
Closes #236
2014-05-31 21:32:02 +02:00
Nils Maier a82f08765e Fix (unknown length) downloads larger than 2GiB
Closes #215
2014-05-25 14:49:29 +02:00
Nils Maier f7cc24d6cf Internally use HMAC in http auth
To at least get constant time compare.
Also fix incorrect parsing of the creds (were incorrectly stripped).
Also add unit tests.
2014-05-22 15:24:20 +02:00
Nils Maier 855dfa0e2f Authorize RPC multicalls only once.
Cache the auth status afterwards and just assume the token still matches
(within the same request, of course).
2014-05-20 12:53:39 +02:00
Nils Maier 82dad90ff3 Validate token using PBKDF2-HMAC-SHA1.
This change should make token validation more resilient to:
 - timing attacks (constant time array compare)
 - brute-force/dictionary attacks (PBKDF2)

 Closes #220
2014-04-19 19:10:06 +02:00
Nils Maier 98ba096951 Add util::security (compare, HMAC, PBKDF2)
See #220
2014-04-19 19:07:38 +02:00
Nils Maier 010131161e Remove ENABLE_MESSAGE_DIGEST, since we got the internal md, always 2014-04-17 18:02:42 +02:00