summaryrefslogtreecommitdiff
path: root/test/BittorrentHelperTest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix a failed testTatsuhiro Tsujikawa2022-04-031-0/+1
|
* clang-formatTatsuhiro Tsujikawa2017-10-071-1/+2
|
* Add --peer-agent optionKurt Kartaltepe2017-07-111-0/+9
| | | | | Add --peer-agent for setting the version/user agent used in the extended handshake protocol for bittorrent.
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-201/+239
|
* Use user-defined literal for k, m, and g (powers of 1024)Tatsuhiro Tsujikawa2015-06-211-4/+4
|
* Use constexpr for macros defined in BtConstants.hTatsuhiro Tsujikawa2015-06-211-3/+3
|
* util::parseIntSegments: Return SegList<int>Tatsuhiro Tsujikawa2014-06-041-18/+8
|
* bittorrent::computeFastSet: Return std::vectorTatsuhiro Tsujikawa2014-06-041-6/+3
|
* Support PREF_DIR change for Metalink filesTatsuhiro Tsujikawa2014-06-041-0/+8
| | | | | Reworked previous commit adeead6f0396e2f8551d1182972e277728fd6c8b, and now support changing PREF_DIR for Metalink downloads.
* Use std::unique_ptr for ValueBase object hierarchyTatsuhiro Tsujikawa2013-07-111-26/+26
|
* Remove vbegin and vend in favor of std::begin and std::endTatsuhiro Tsujikawa2013-06-241-6/+3
|
* DownloadContext::attrs_ now holds std::unique_ptrTatsuhiro Tsujikawa2013-06-231-42/+42
| | | | DownloadContext::getAttribute() returns a raw pointer.
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-88/+88
|
* Use BtFileMode for TorrentAttribute::modeTatsuhiro Tsujikawa2013-05-151-2/+2
|
* Removed trailing spacesTatsuhiro Tsujikawa2012-10-011-3/+3
|
* Parse torrent file on the fly if --follow-torrent=mem is givenTatsuhiro Tsujikawa2012-07-261-11/+7
| | | | | In this changes, Bencode parser in bencode2 is removed and the request is delegated to BencodeParser.
* Use int64_t instead of off_tTatsuhiro Tsujikawa2012-06-251-2/+2
| | | | | Some classes such as DiskAdaptor, DiskWriter, FileAllocationIterator and ChecksumValidator are left unchanged.
* Use int or int32_t instead of size_t where suitableTatsuhiro Tsujikawa2011-12-091-3/+3
|
* Use int32_t for piece length instead of size_tTatsuhiro Tsujikawa2011-12-091-1/+1
|
* Replaced uint64_t with off_t or int64_t.Tatsuhiro Tsujikawa2011-12-091-2/+2
| | | | | Since off_t is int64_t with LFS, we cannot take advantage of extra capacity of uint64_t.
* Made util::fromHex and base32::decode function templateTatsuhiro Tsujikawa2011-11-051-6/+6
|
* Rewritten bencode2::decode functionsTatsuhiro Tsujikawa2011-11-051-5/+9
|
* Apply PREF_MAX_CONNECTION_PER_SERVER to BitTorrent WEB Seeding hosts.Tatsuhiro Tsujikawa2011-10-311-0/+5
|
* Use SegList<int> instead of IntSequence in DownloadContext::setFileFilter()Tatsuhiro Tsujikawa2011-10-291-8/+18
|
* Stored hash value as raw byte string, instead of hex digest.Tatsuhiro Tsujikawa2011-10-131-3/+3
|
* Removed asString, asList, ... and use downcast<T> instead.Tatsuhiro Tsujikawa2011-09-261-3/+3
|
* Eliminated inet_ntoa and inet_ntop. Use getnameinfo() instead.Tatsuhiro Tsujikawa2011-08-201-8/+0
|
* Consistent naming scheme for hash type and digest for DownloadContext.Tatsuhiro Tsujikawa2011-07-271-1/+1
|
* Removed DownloadContext::dir_. Use PREF_DIR value instead.Tatsuhiro Tsujikawa2010-12-031-43/+46
|
* Made `make distcheck' pass.Tatsuhiro Tsujikawa2010-12-021-27/+27
| | | | | | We added 2 macros A2_TEST_DIR and A2_TEST_OUT_DIR to pass tests in `make distcheck`. A2_TEST_DIR refers to test directory. All output files by unit tests are now created under A2_TEST_OUT_DIR directory.
* 2010-11-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-111-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced MessageDigestContext with MessageDigest. Cleaned up unnecessary functions in MessageDigestHelper. * src/BtPieceMessage.cc * src/Checksum.h * src/DHTTokenTracker.cc * src/DownloadCommand.cc * src/DownloadCommand.h * src/HashFuncEntry.h * src/IteratableChecksumValidator.cc * src/IteratableChecksumValidator.h * src/IteratableChunkChecksumValidator.cc * src/IteratableChunkChecksumValidator.h * src/LibgcryptMessageDigestImpl.cc * src/LibgcryptMessageDigestImpl.h * src/LibsslMessageDigestImpl.cc * src/LibsslMessageDigestImpl.h * src/MSEHandshake.cc * src/MSEHandshake.h * src/Makefile.am * src/MessageDigest.cc * src/MessageDigest.h * src/MessageDigestHelper.cc * src/MessageDigestHelper.h * src/MessageDigestImpl.h * src/MetalinkParserController.cc * src/Piece.cc * src/Piece.h * src/UTMetadataDataExtensionMessage.cc * src/bittorrent_helper.cc * src/messageDigest.cc: Removed * src/messageDigest.h: Removed * src/util.cc * src/version_usage.cc * test/BittorrentHelperTest.cc * test/GZipDecoderTest.cc * test/GZipDecodingStreamFilterTest.cc * test/IteratableChecksumValidatorTest.cc * test/IteratableChunkChecksumValidatorTest.cc * test/Makefile.am * test/MessageDigestHelperTest.cc * test/MessageDigestTest.cc * test/Metalink2RequestGroupTest.cc * test/MetalinkProcessorTest.cc * test/PieceTest.cc * test/TestUtil.cc * test/TestUtil.h * test/UTMetadataDataExtensionMessageTest.cc * test/UTMetadataPostDownloadHandlerTest.cc
* 2010-10-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-041-0/+8
| | | | | | | | | | | | | | | | | | | Use inet_ntoa if inet_ntop is not available. Since inet_ntoa does not handle IPv6 address, IPv6 support is limited in this case. Fixed unit test error under mingw32. * configure.ac * src/AsyncNameResolver.cc * src/SocketCore.cc * src/bittorrent_helper.cc * test/BittorrentHelperTest.cc * test/DHTMessageFactoryImplTest.cc * test/DHTRoutingTableDeserializerTest.cc * test/DHTRoutingTableSerializerTest.cc * test/DefaultBtAnnounceTest.cc * test/Metalink2RequestGroupTest.cc * test/UTPexExtensionMessageTest.cc
* 2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-021-0/+48
| | | | | | | | | | | | | | | | | | Non-UTF8 filenames are now percent-encoded. For example, filename for http://example.org/%90%A2%8AE will be %90%A2%8AE because it is Shift_JIS. The comments and name in .torrent file in XML-RPC response are percent-encoded if they are not UTF-8. * src/FtpNegotiationCommand.cc * src/HttpRequestCommand.cc * src/HttpResponseCommand.cc * src/XmlRpcMethodImpl.cc * src/bittorrent_helper.cc * src/util.cc * src/util.h * test/BittorrentHelperTest.cc * test/UtilTest.cc
* 2010-08-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-08-241-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added --bt-tracker and --bt-exclude-tracker option. In --bt-tracker option, you can specify comma separated list of additional BitTorrent tracker's announce URI. These URIs are not affected by --bt-exclude-tracker option because they are added after URIs in --bt-exclude-tracker option are removed. In --bt-exclude-tracker option, you can specify comma separated list of BitTorrent tracker's announce URI to remove. You can use special value '*' which matches all URIs, thus removes all announce URIs. When specifying '*' in shell command-line, don't forget to escape or quote it. * src/BtDependency.cc * src/OptionHandlerFactory.cc * src/UTMetadataPostDownloadHandler.cc * src/bittorrent_helper.cc * src/bittorrent_helper.h * src/download_helper.cc * src/download_helper.h * src/prefs.cc * src/prefs.h * src/usage_text.h * test/BittorrentHelperTest.cc * test/DownloadHelperTest.cc
* 2010-08-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-08-031-16/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added bittorrent::packcompact() which replaces bittorrent::createcompact() and supports IPv6 addresses. Rewritten bittorrent::unpackcompact() and bittorrent::extractPeer() to support IPv6 addresses. Fixed added.f flags in ut_pex. * src/BtConstants.h * src/DHTFindNodeReplyMessage.cc * src/DHTGetPeersReplyMessage.cc * src/DHTMessageFactoryImpl.cc * src/DHTRoutingTableDeserializer.cc * src/DHTRoutingTableSerializer.cc * src/DHTTokenTracker.cc * src/DefaultBtAnnounce.cc * src/UTPexExtensionMessage.cc * src/bittorrent_helper.cc * src/bittorrent_helper.h * test/BittorrentHelperTest.cc * test/DHTFindNodeReplyMessageTest.cc * test/DHTGetPeersReplyMessageTest.cc * test/DHTMessageFactoryImplTest.cc * test/DHTRoutingTableSerializerTest.cc * test/DefaultExtensionMessageFactoryTest.cc * test/UTPexExtensionMessageTest.cc
* 2010-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-211-1/+1
| | | | | | | Changed naming standards for class member variable: now it looks like var_ instead of _var.
* 2010-06-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-201-0/+41
| | | | | | | | | | | | | | | | Removed PeerListProcessor. Its functionality is now moved to bittorrent_helper.h * src/DefaultBtAnnounce.cc * src/Makefile.am * src/PeerListProcessor.h: Removed * src/UTPexExtensionMessage.cc * src/bittorrent_helper.cc * src/bittorrent_helper.h * test/BittorrentHelperTest.cc * test/Makefile.am * test/PeerListProcessorTest.cc: Removed
* 2010-06-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-181-101/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced ValueBase class, which is a replacement of BDE. In this change ValueBase is used instead of BDE except DHT messages, UTMetadata messages and XML-RPC. They'll be replaced in the later commits. DownloadContext::_attrs is now ContextAttribute rather than BDE. * src/ActivePeerConnectionCommand.cc * src/AnnounceList.cc * src/AnnounceList.h * src/BtDependency.cc * src/BtRegistry.cc * src/BtSetup.cc * src/ConsoleStatCalc.cc * src/ContextAttribute.h * src/DefaultBtAnnounce.cc * src/DefaultBtInteractive.cc * src/DownloadContext.cc * src/DownloadContext.h * src/HandshakeExtensionMessage.cc * src/InitiateConnectionCommand.cc * src/LpdReceiveMessageCommand.cc * src/MSEHandshake.cc * src/Makefile.am * src/Makefile.in * src/PeerInteractionCommand.cc * src/PeerListProcessor.h * src/ProtocolDetector.cc * src/RequestGroup.cc * src/RequestGroupMan.cc * src/TorrentAttribute.h * src/TrackerWatcherCommand.cc * src/UTMetadataDataExtensionMessage.cc * src/UTMetadataPostDownloadHandler.cc * src/UTMetadataRequestExtensionMessage.cc * src/ValueBase.cc * src/ValueBase.h * src/XmlRpcMethodImpl.cc * src/XmlRpcMethodImpl.h * src/bencode2.cc * src/bencode2.h * src/bittorrent_helper.cc * src/bittorrent_helper.h * src/download_helper.cc * src/magnet.cc * src/magnet.h * test/AnnounceListTest.cc * test/Bencode2Test.cc * test/BencodeTest.cc * test/BittorrentHelperTest.cc * test/BtDependencyTest.cc * test/BtRegistryTest.cc * test/DefaultBtAnnounceTest.cc * test/DefaultBtProgressInfoFileTest.cc * test/HandshakeExtensionMessageTest.cc * test/MSEHandshakeTest.cc * test/MagnetTest.cc * test/Makefile.am * test/Makefile.in * test/RequestGroupManTest.cc * test/UTMetadataDataExtensionMessageTest.cc * test/UTMetadataPostDownloadHandlerTest.cc * test/UTMetadataRequestExtensionMessageTest.cc * test/ValueBaseTest.cc * test/XmlRpcMethodTest.cc
* 2010-04-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-031-8/+8
| | | | | | | | | | | Fixed the bug that web-seed URI is not percent-encoded. * src/a2functional.h * src/bittorrent_helper.cc * test/BittorrentHelperTest.cc * test/url-list-multiFile.torrent * test/url-list-singleFileEndsWithSlash.torrent
* 2010-03-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-03-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added vbegin() and vend() for fixed sized array. * src/DownloadHandlerConstants.cc * src/FeatureConfig.cc * src/OptionHandlerFactory.cc * src/ServerStat.cc * src/TimeA2.cc * src/XmlRpcMethod.cc * src/array_fun.h * src/download_helper.cc * src/messageDigest.cc * src/util.cc * test/BittorrentHelperTest.cc * test/DHTRoutingTableDeserializerTest.cc * test/DHTRoutingTableSerializerTest.cc * test/DefaultBtAnnounceTest.cc * test/DefaultBtProgressInfoFileTest.cc * test/DownloadContextTest.cc * test/DownloadHelperTest.cc * test/FeatureConfigTest.cc * test/FeedbackURISelectorTest.cc * test/HttpRequestTest.cc * test/InOrderURISelectorTest.cc * test/MSEHandshakeTest.cc * test/MultiDiskAdaptorTest.cc * test/MultiFileAllocationIteratorTest.cc * test/PriorityPieceSelectorTest.cc * test/RequestGroupManTest.cc * test/UtilTest.cc * test/XmlRpcMethodTest.cc * test/a2algoTest.cc * test/array_funTest.cc
* 2010-03-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-03-121-0/+6
| | | | | | | | Inspect all xt in magnet to find urn:btih. * src/bittorrent_helper.cc * test/BittorrentHelperTest.cc
* 2010-02-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-271-17/+17
| | | | | | | | | | | | | | | | | | Discard torrent file if path data in it contains directory traversal directives. Discard metalink:file element in Metalink3 format if its name attribute contains directory traversal directives. Ignore name attribute of metalink:signature element in Metalink3 format if it contains directory traversal directives. * src/MetalinkParserStateV3Impl.cc * src/bittorrent_helper.cc * src/message.h * test/BittorrentHelperTest.cc * test/Makefile.am * test/MetalinkProcessorTest.cc * test/metalink3-dirtraversal.xml * test/test.xml
* 2010-02-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Supported name attribute of metalink::metaurl element and multi-file torrent with Metalink4. Files with same metaurl are grouped and downloaded in one RequestGroup. * src/BtDependency.cc * src/FileEntry.h * src/Metalink2RequestGroup.cc * src/Metalink2RequestGroup.h * src/MetalinkEntry.cc * src/MetalinkEntry.h * src/MetalinkHelper.cc * src/MetalinkHelper.h * src/MetalinkMetaurl.cc * src/MetalinkMetaurl.h * src/MetalinkParserController.cc * src/RequestGroup.cc * src/RequestGroup.h * src/bittorrent_helper.cc * test/BittorrentHelperTest.cc * test/BtDependencyTest.cc * test/MetalinkHelperTest.cc
* 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-051-42/+42
| | | | | | | | | Untabify. Fixed one line in copyright which is longer than 80 columns. * src * test
* 2009-12-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-12-181-1/+1
| | | | | | | | Show info hash in Magnet URI in upper case letters in -S output. * src/bittorrent_helper.cc * test/BittorrentHelperTest.cc
* 2009-12-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-12-101-3/+18
| | | | | | | | | | Print Magnet URI in -S output. * src/AnnounceList.cc * src/bittorrent_helper.cc * src/bittorrent_helper.h * test/BittorrentHelperTest.cc
* 2009-11-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-11-281-1/+2
| | | | | | | | | In Magnet URI with tr parameter, put each announce URI in separate tier. * src/bittorrent_helper.cc * test/BittorrentHelperTest.cc
* 2009-11-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-11-281-0/+21
| | | | | | | | | | | | | | Accept BitTorrent Magnet URI in Metalink resource type bittorrent. Rewritten UTMetadataPostDownloadHandler. To create torrent data from metadata, use new metadata2Torrent() function. * src/BtDependency.cc * src/UTMetadataPostDownloadHandler.cc * src/bittorrent_helper.cc * src/bittorrent_helper.h * test/BittorrentHelperTest.cc * test/BtDependencyTest.cc
* 2009-11-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-11-241-1/+2
| | | | | | | | Prepended "[METADATA]" before dn. * src/bittorrent_helper.cc * test/BittorrentHelperTest.cc
* 2009-11-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-11-241-19/+23
| | | | | | | | | | | | | | | | | Rewritten Magnet URI parser. * src/Makefile.am * src/ProtocolDetector.cc * src/bittorrent_helper.cc * src/bittorrent_helper.h * src/download_helper.cc * src/magnet.cc * src/magnet.h * test/BittorrentHelperTest.cc * test/MagnetTest.cc * test/Makefile.am * test/ProtocolDetectorTest.cc