libTorrent BitTorrent library

Overview
LibTorrent

Copyright (C) 2005-2014, Jari Sundell

LICENSE

 GNU GPL, see COPYING. "libtorrent/src/utils/sha_fast.{cc,h}" is
originally from the Mozilla NSS and is under a triple license; MPL,
LGPL and GPL. An exception to non-NSS code has been added for linking
to OpenSSL as requested by Debian, though the author considers that
library to be part of the Operative System and thus linking is allowed
according to the GPL.

 Use whatever fits your purpose, the code required to compile with
Mozilla's NSS implementation of SHA1 has been retained and can be
compiled if the user wishes to avoid using OpenSSL.

CONTACT

 Jari Sundell

 Skomakerveien 33
 3185 Skoppum, NORWAY

 Send bug reports, suggestions and patches to
<[email protected]> or to the mailinglist.

Issues
  • min interval is ignored

    min interval is ignored

    According to the unfixed rtorrent bug #386, there is another big problem with libtorrent announcing. If one single user is seeding a high number of torrents and restarts his rtorrent, it results in massive announce hammering.

    First the scenario: The tracker sends interval and min interval to rtorrent. The interval will be ignored (see issue #386 rtorrent), but rtorrent should actually use min interval of course. Let's say the user has to restart his rtorrent with 5000 torrents. 5000 torrents announce, get the random interval and are supposed to use that interval for the next announce. But that's not working, because of how the interval to use is calculated by libtorrent. So all 5000 torrents will announce at the same time again instead of what they've been told by the tracker. That comes close to a DoS attack.

    How to fix this: Here is a different version of tracker_next_timeout_promiscuous() from tracker_controller.cc which does respect what the tracker sent:

    uint32_t tracker_next_timeout_promiscuous(Tracker *tracker) {
    	if ((tracker->is_busy() && tracker->latest_event() != Tracker::EVENT_SCRAPE) || !tracker->is_usable())
    		return ~uint32_t();
    
    	int32_t interval, min_interval, use_interval, since_last;
    
    	if (tracker->failed_counter())
    		interval = 5 << std::min<int>(tracker->failed_counter() - 1, 6);
    	else
    		interval = tracker->normal_interval();
    
    	min_interval = tracker->min_interval();
    
    	if (min_interval < 300)
    		min_interval = 300;
    
    	if (interval < min_interval)
    		use_interval = min_interval;
    	else
    		use_interval = interval;
    
    	since_last = cachedTime.seconds() - (int32_t)tracker->activity_time_last();
    	return std::max(use_interval - since_last, 0);
    }
    

    After that it works as it should. I hope, that will be fixed soon, because it's a big problem for trackers with users who seed thousands of torrents. Also most shared seedbox providers use rtorrent and the users can't apply changes to libtorrent.

    Edit:// This bug only appears, if the min interval is set over 30 minutes. Below 30 minutes it works, but I don't know why any tracker should set the min interval below that value, because rtorrent ignores the default interval anyway.

    opened by paxter 56
  • libtorrent fails to compile using clang with libc++

    libtorrent fails to compile using clang with libc++

    libtorrent fails to compile with clang when clang is using libc++ as its C++ stdlib (for example, on Mac OS X 10.9 where that is the default). The failure comes from libtorrent using the TR1 prefixed versions of a few headers; libc++ includes only the C++11 versions of these, not the TR1 versions.

    You can see the build logs here: https://gist.github.com/mistydemeo/7271614 I also notice that configure says:

    checking for C++11 support... no

    Which isn't correct. Seems to come from this in the configure test for C++11 support:

    conftest.cpp:32:24: error: union member 'b1' has a non-trivial copy constructor
    union test { Bar b1; };
    ^
    /Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/unordered_map:733:5: note: because type 'std::__1::unordered_map<Foo *, int, std::__1::hash<Foo *>, std::__1::equal_to<Foo *>, std::__1::allocator<std::__1::pair<Foo *const, int> > >' has a user-provided copy constructor
    unordered_map(const unordered_map& __u);
    ^
    1 error generated.
    
    opened by mistydemeo 21
  • Compile fails with missing openssl - configure should have caught that.

    Compile fails with missing openssl - configure should have caught that.

    $ make /Library/Developer/CommandLineTools/usr/bin/make all-recursive Making all in src Making all in torrent Making all in data /bin/sh ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../../src/torrent/data -I../../.. -I../../../../src/torrent/data -I../../../../src/torrent/data/.. -I../../../../src/torrent/data/../.. -I../../../.. -I/usr/include -I/usr/include -D_THREAD_SAFE -g -O2 -g -DDEBUG -Wall -std=c++11 -fvisibility=hidden -MT block.lo -MD -MP -MF .deps/block.Tpo -c -o block.lo ../../../../src/torrent/data/block.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../../../src/torrent/data -I../../.. -I../../../../src/torrent/data -I../../../../src/torrent/data/.. -I../../../../src/torrent/data/../.. -I../../../.. -I/usr/include -I/usr/include -D_THREAD_SAFE -g -O2 -g -DDEBUG -Wall -std=c++11 -fvisibility=hidden -MT block.lo -MD -MP -MF .deps/block.Tpo -c ../../../../src/torrent/data/block.cc -fno-common -DPIC -o .libs/block.o In file included from ../../../../src/torrent/data/block.cc:44: In file included from ../../../../src/torrent/data/../../protocol/peer_connection_base.h:46: In file included from ../../../../src/torrent/data/../../protocol/encryption_info.h:40: ../../../../src/torrent/data/../../utils/rc4.h:48:10: fatal error: 'openssl/rc4.h' file not found #include <openssl/rc4.h> ^ 1 error generated. make[4]: *** [block.lo] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2

    opened by hannesweisbach 15
  • Broken compilation with gcc v6.x if CXXFLAGS env var is set

    Broken compilation with gcc v6.x if CXXFLAGS env var is set

    Couple of our users reported that they can't compile rtorrent-ps-ch on newer distros (not just on a particular one), one of them, @colinhd8 even came up with an unexpected fix: unset the CXXFLAGS env var in our script. The only common thing amongst those distros is the gcc compiler version, which is v6.x .

    Since I wasn't sure where the actual issue relies (in our automagic function, other part of our script, etc.) I've created a minimal build script on fresh install of Debian 9 (using gcc v6.3.0) to see whether rtorrent can be built or not.

    Conclusion: if the CXXFLAGS env var is set (even when it's empty string) building "fails" at the end of compilation process only when rtorrent tries to link libtorrent.so :

    ../rak/priority_queue_default.h: In destructor ‘rak::priority_item::~priority_item()’:
    ../rak/priority_queue_default.h:56:95: warning: throw will always call terminate() [-Wterminate]
    	   throw torrent::internal_error("priority_item::~priority_item() called on a queued item.");
    																							   ^
    ../rak/priority_queue_default.h:56:95: note: in C++11 destructors default to noexcept
    mv -f .deps/main.Tpo .deps/main.Po
    /bin/bash ../libtool  --tag=CXX   --mode=link g++  -g -DDEBUG -Wall   -I/home/test/lib/rtorrent-0.9.7-1.5.1/include  -I/home/test/lib/rtorrent-0.9.7-1.5.1/include   -L/home/test/lib/rtorrent-0.9.7-1.5.1/lib -o rtorrent main.o libsub_root.a ui/libsub_ui.a core/libsub_core.a display/libsub_display.a input/libsub_input.a rpc/libsub_rpc.a utils/libsub_utils.a  -lncursesw -lcppunit -L/home/test/lib/rtorrent-0.9.7-1.5.1/lib -lcurl -ltorrent -lpthread -L/home/test/lib/rtorrent-0.9.7-1.5.1/lib   -lxmlrpc_server -lxmlrpc  -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_util -lpthread 
    libtool: link: g++ -g -DDEBUG -Wall -I/home/test/lib/rtorrent-0.9.7-1.5.1/include -I/home/test/lib/rtorrent-0.9.7-1.5.1/include -o rtorrent main.o  -L/home/test/lib/rtorrent-0.9.7-1.5.1/lib libsub_root.a ui/libsub_ui.a core/libsub_core.a display/libsub_display.a input/libsub_input.a rpc/libsub_rpc.a utils/libsub_utils.a -lncursesw -lcppunit /home/test/lib/rtorrent-0.9.7-1.5.1/lib/libcurl.so /home/test/lib/rtorrent-0.9.7-1.5.1/lib/libtorrent.so -lxmlrpc_server -lxmlrpc -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_util -lpthread -Wl,-rpath -Wl,/home/test/lib/rtorrent-0.9.7-1.5.1/lib -Wl,-rpath -Wl,/home/test/lib/rtorrent-0.9.7-1.5.1/lib
    /home/test/lib/rtorrent-0.9.7-1.5.1/lib/libtorrent.so: undefined reference to `torrent::PeerConnection<(torrent::Download::ConnectionType)1>::offer_chunk()'
    /home/test/lib/rtorrent-0.9.7-1.5.1/lib/libtorrent.so: undefined reference to `torrent::PeerConnection<(torrent::Download::ConnectionType)0>::offer_chunk()'
    collect2: error: ld returned 1 exit status
    

    The same can be achieved earlier when rtorrent is configured with xmlrpc suppport: this time the checking macro fails at the biginning of building process of rtorrent: resulting the very same error message as above in config.log.

    In summary:

    • other env vars we use aren't affected by this only CXXFLAGS
    • it's distro independent
    • it only depends on the version of gcc: 4.x , 5.x work fine (I'm not sure about 7.x , like in newer Arch Linux)
    • both master and feature-bind branches are affected
    • strangly enough 0.9.6/0.13.6 is NOT affected by this

    This is a really nasty bug, e.g. in Gentoo such env vars can be defined system wide in /etc/make.conf. And that means no additional flags can be set in this way. I quickly went through the configure.ac and all the m4 macros in scripts dir but I didn't see anything unusual. More than that almost all the marcos are identical in rtorrent and libtorrent projects: so I'm not sure at all that rtorrent isn't affected by this, since libtorrent builds fine seemingly until it's not linked!

    Maybe it would be worth to modify Travis scripts to:

    • include newer compilers: 4.x, 5.x, 6.x, 7x
    • export these empty env vars at the beginning of the script

    Example distros that are affected:

    • Debian 9, gcc 6.3
    • Fedora 24 x64 GCC:6.3.1 20161221 (Red Hat 6.3.1-1) (GCC)
    • CentOs 7 x64 GCC:gcc version 6.2.1 20160916 (Red Hat 6.2.1-3) (GCC)
    • Ubuntu Server 17.04, gcc 6.3.0
    • ViodLinux gcc 6.3
    opened by chros73 10
  • 0.13.4: Check fails to link libz

    0.13.4: Check fails to link libz

    libtorrent builds fine, but the tests don't build.

    Log: Making check in src make[1]: Entering directory '/home/ingmar/Repositories/libtorrent/src' Making check in torrent make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src/torrent' Making check in data make[3]: Entering directory '/home/ingmar/Repositories/libtorrent/src/torrent/data' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/torrent/data' Making check in download make[3]: Entering directory '/home/ingmar/Repositories/libtorrent/src/torrent/download' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/torrent/download' Making check in peer make[3]: Entering directory '/home/ingmar/Repositories/libtorrent/src/torrent/peer' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/torrent/peer' Making check in utils make[3]: Entering directory '/home/ingmar/Repositories/libtorrent/src/torrent/utils' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/torrent/utils' make[3]: Entering directory '/home/ingmar/Repositories/libtorrent/src/torrent' make[3]: Nothing to be done for 'check-am'. make[3]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/torrent' make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/torrent' Making check in data make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src/data' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/data' Making check in dht make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src/dht' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/dht' Making check in download make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src/download' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/download' Making check in net make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src/net' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/net' Making check in protocol make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src/protocol' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/protocol' Making check in tracker make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src/tracker' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/tracker' Making check in utils make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src/utils' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/utils' make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src' make[2]: Nothing to be done for 'check-am'. make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src' make[1]: Leaving directory '/home/ingmar/Repositories/libtorrent/src' Making check in test make[1]: Entering directory '/home/ingmar/Repositories/libtorrent/test' make LibTorrentTest make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/test' /bin/sh ../libtool --tag=CXX --mode=link x86_64-pc-linux-gnu-g++ -g -O2 -DNDEBUG -fvisibility=hidden -pthread -L/usr/lib64 -lcppunit -ldl -ldl -o LibTorrentTest ../src/LibTorrentTest-thread_disk.o rak/LibTorrentTest-allocators_test.o rak/LibTorrentTest-ranges_test.o data/LibTorrentTest-chunk_list_test.o data/LibTorrentTest-hash_check_queue_test.o data/LibTorrentTest-hash_queue_test.o protocol/LibTorrentTest-test_request_list.o torrent/LibTorrentTest-http_test.o torrent/LibTorrentTest-object_test.o torrent/LibTorrentTest-object_test_utils.o torrent/LibTorrentTest-object_static_map_test.o torrent/LibTorrentTest-object_stream_test.o torrent/LibTorrentTest-tracker_controller_test.o torrent/LibTorrentTest-tracker_controller_features.o torrent/LibTorrentTest-tracker_controller_requesting.o torrent/LibTorrentTest-tracker_list_test.o torrent/LibTorrentTest-tracker_list_features_test.o torrent/LibTorrentTest-tracker_timeout_test.o torrent/utils/LibTorrentTest-log_test.o torrent/utils/LibTorrentTest-log_buffer_test.o torrent/utils/LibTorrentTest-net_test.o torrent/utils/LibTorrentTest-option_strings_test.o torrent/utils/LibTorrentTest-test_extents.o torrent/utils/LibTorrentTest-test_queue_buckets.o torrent/utils/LibTorrentTest-signal_bitfield_test.o torrent/utils/LibTorrentTest-thread_base_test.o tracker/LibTorrentTest-tracker_http_test.o LibTorrentTest-main.o ../src/libtorrent.la ../src/torrent/libsub_torrent.la ../src/torrent/data/libsub_torrentdata.la ../src/torrent/download/libsub_torrentdownload.la ../src/torrent/peer/libsub_torrentpeer.la ../src/data/libsub_data.la ../src/dht/libsub_dht.la ../src/download/libsub_download.la ../src/net/libsub_net.la ../src/protocol/libsub_protocol.la ../src/tracker/libsub_tracker.la ../src/utils/libsub_utils.la ../src/torrent/utils/libsub_torrentutils.la -lcrypto libtool: link: x86_64-pc-linux-gnu-g++ -g -O2 -DNDEBUG -fvisibility=hidden -pthread -o .libs/LibTorrentTest ../src/LibTorrentTest-thread_disk.o rak/LibTorrentTest-allocators_test.o rak/LibTorrentTest-ranges_test.o data/LibTorrentTest-chunk_list_test.o data/LibTorrentTest-hash_check_queue_test.o data/LibTorrentTest-hash_queue_test.o protocol/LibTorrentTest-test_request_list.o torrent/LibTorrentTest-http_test.o torrent/LibTorrentTest-object_test.o torrent/LibTorrentTest-object_test_utils.o torrent/LibTorrentTest-object_static_map_test.o torrent/LibTorrentTest-object_stream_test.o torrent/LibTorrentTest-tracker_controller_test.o torrent/LibTorrentTest-tracker_controller_features.o torrent/LibTorrentTest-tracker_controller_requesting.o torrent/LibTorrentTest-tracker_list_test.o torrent/LibTorrentTest-tracker_list_features_test.o torrent/LibTorrentTest-tracker_timeout_test.o torrent/utils/LibTorrentTest-log_test.o torrent/utils/LibTorrentTest-log_buffer_test.o torrent/utils/LibTorrentTest-net_test.o torrent/utils/LibTorrentTest-option_strings_test.o torrent/utils/LibTorrentTest-test_extents.o torrent/utils/LibTorrentTest-test_queue_buckets.o torrent/utils/LibTorrentTest-signal_bitfield_test.o torrent/utils/LibTorrentTest-thread_base_test.o tracker/LibTorrentTest-tracker_http_test.o LibTorrentTest-main.o -L/usr/lib64 /usr/lib64/libcppunit.so -ldl ../src/.libs/libtorrent.so ../src/torrent/.libs/libsub_torrent.a ../src/torrent/data/.libs/libsub_torrentdata.a ../src/torrent/download/.libs/libsub_torrentdownload.a ../src/torrent/peer/.libs/libsub_torrentpeer.a ../src/data/.libs/libsub_data.a ../src/dht/.libs/libsub_dht.a ../src/download/.libs/libsub_download.a ../src/net/.libs/libsub_net.a ../src/protocol/.libs/libsub_protocol.a ../src/tracker/.libs/libsub_tracker.a ../src/utils/.libs/libsub_utils.a ../src/torrent/utils/.libs/libsub_torrentutils.a /usr/lib64/../lib64/libstdc++.so -lm -lcrypto -pthread -Wl,-rpath -Wl,/usr/lib64/../lib64 torrent/utils/LibTorrentTest-log_test.o: In function utils_log_test::test_file_output()': /home/ingmar/Repositories/libtorrent/test/torrent/utils/log_test.cc:140: warning: the use oftmpnam' is dangerous, better use mkstemp' ../src/torrent/utils/.libs/libsub_torrentutils.a(log.o): In functiontorrent::log_gz_file_write(std::tr1::shared_ptrtorrent::log_gz_output&, char const_, unsigned long, int)': /home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:377: undefined reference to gzwrite' /home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:379: undefined reference togzwrite' /home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:380: undefined reference to gzwrite' /home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:383: undefined reference togzwrite' /home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:388: undefined reference to gzwrite' ../src/torrent/utils/.libs/libsub_torrentutils.a(log.o):/home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:386: more undefined references togzwrite' follow ../src/torrent/utils/.libs/libsub_torrentutils.a(log.o): In function log_gz_output': /home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:76: undefined reference togzopen' ../src/torrent/utils/.libs/libsub_torrentutils.a(log.o): In function ~log_gz_output': /home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:77: undefined reference togzclose' /home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:77: undefined reference to gzclose' ../src/protocol/.libs/libsub_protocol.a(request_list.o): In functiontorrent::RequestList::delegate()': /home/ingmar/Repositories/libtorrent/src/protocol/request_list.cc:127: undefined reference to `torrent::Delegator::delegate(torrent::PeerChunks_, int)' collect2: error: ld returned 1 exit status Makefile:791: recipe for target 'LibTorrentTest' failed make[2]: *** [LibTorrentTest] Error 1 make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/test' Makefile:1504: recipe for target 'check-am' failed make[1]: *** [check-am] Error 2 make[1]: Leaving directory '/home/ingmar/Repositories/libtorrent/test' Makefile:486: recipe for target 'check-recursive' failed make: *** [check-recursive] Error 1

    opened by ingmarv 10
  • Fixed another potential issue causing high loads while waiting for main thread to exit polling.

    Fixed another potential issue causing high loads while waiting for main thread to exit polling.

    In rtorrent ce16621 some magic was added to src/thread_base.cc to migitate high load problems. A similar issue manifests on FreeBSD in the "new" libtorrent method thread_base::interrupt() in src/torrent/utils/thread_base.cc, added with commit aa9d73e4. The attached commit fixes this issue the same way as it was done in rtorrent.

    opened by Yamagi 9
  • recipe for target 'diffie_hellman.lo' failed

    recipe for target 'diffie_hellman.lo' failed

    Makefile:424: recipe for target 'diffie_hellman.lo' failed make[3]: *** [diffie_hellman.lo] Error 1 make[3]: *** Waiting for unfinished jobs.... mv -f .deps/instrumentation.Tpo .deps/instrumentation.Plo make[3]: Leaving directory '/tmp/libtorrent-0.13.6/src/utils' Makefile:573: recipe for target 'all-recursive' failed make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory '/tmp/libtorrent-0.13.6/src' Makefile:505: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/tmp/libtorrent-0.13.6' Makefile:414: recipe for target 'all' failed make: *** [all] Error 2

    I'm getting this erro, i saw some reated issues and i need to patch, but how can i patch? Is there any step by step tutorial?

    Thanks in advanced.

    Im running debian 9.

    opened by 4K-Crisp 8
  • IPv6 bugs

    IPv6 bugs

    First of all, thanks for adding ipv6 support! (#111) I just quickly tried it out, and I came across the following problems (both were existed with the previosly mentioned patches):

    A. Can't connect to udp trackers, error message: Tracker: [Could not open UDP socket.] Used config: note, that network.bind_address is disabled to be able to use both ipv4 AND ipv6.

    #network.bind_address.set = 192.168.1.6
    schedule2 = ip_tick, 0, 1800, network.local_address.set=somehost.no-ip.org
    network.port_range.set = 60367-60367
    trackers.use_udp.set = true
    dht.mode.set = auto
    dht.port.set = 60378
    

    Is the missing network.bind_address option the problem? tracker_udp.cc#L148

    B. It breaks this setup: DHT not enabled. even when it is Error message: Scheduled command failed: dht_node: DHT not enabled.

    opened by chros73 7
  • Not updated

    Not updated "configure.ac" file in 0.13.5 release...

    Hello, the 0.13.5 release ( https://github.com/rakshasa/libtorrent/releases/tag/0.13.5 ) has the 0.13.4 version of "configure.ac" file. It causes rtorrent 0.9.5 to not configure, as it finds libtorrent 0.13.4 instead of 0.13.5. ^^

    opened by Micdu70 7
  • Different peer, same peer ID?

    Different peer, same peer ID?

    We're seeing requests from different peers using the same peer ID. This doesn't seem right, could you fix this? Note the different ports, indicating different peers. This causes tracker-side stats problems when multiple users share one IP address. How's the peer ID generated?

    ?info_hash=<>&peer_id=-lt0D20-9%27%96k%24%B0%DC%8F%14%CC2%F9&key=3c7e178b&ip=<>&compact=1&numwant=100&port=54946&uploaded=1221299856&downloaded=8642776720&left=0 ?info_hash=<>&peer_id=-lt0D20-9%27%96k%24%B0%DC%8F%14%CC2%F9&key=3c7e178b&ip=<>&compact=1&numwant=100&port=56056&uploaded=6619008928&downloaded=8642776720&left=0

    opened by OlafvdSpek 7
  • Allow log files to be appended

    Allow log files to be appended

    Rather than current implentation of truncate/overwrite by default.

    The only real difference from standard open_file is in the ofstream constructor. Added tests as well.

    Makes using simple file names great again, and prevent rtorrent from overwriting all files on a restart. I also ran into a small issue when using logrotate.d and the copytruncate directive. After a log rotation had been performed, and when rtorrent began writing to file again, it wouuld be filled with null 0's up to the last position it had been written to. This would potentially solve that.

    opened by nicholi 6
  • 'make check' fails with missing sig_t on Solaris

    'make check' fails with missing sig_t on Solaris

    Hi,

    I was trying to uprev libtorrent on Solaris and found that gmake check fails to build unit tests. sig_t is missing on Solaris.

    Attached patch workarounds that. Consider adopting it, please.

    Thank you

    Martin check.txt

    opened by l1gi 0
  • Getting lots of

    Getting lots of "message:7 network error" on handshake_manager however network is fine

    Running libtorrent 0.13.8 with rtorrent 0.9.8 - noticed that rTorrent on server was unable to connect to a torrent client running on my local computer and decided to investigate the logs.

    More strangely, while some of incoming connection attempts end up with network error, some others connect successfully "Handshake success". No pattern could be spotted between successful and failing ones.

    Collected a pcap of both sides (my local machine and server) but could not spot anything unusual. After the Handshake, which is received without issues, server sends a FIN packet in order to close the connection.

    Changing the network connection (used tethered 4G) made it to work - but again, connection between the two machines is solid.

    Any guidance on how to proceed? Any way of increasing logging for handshake_manager beyond just a "network error"?

    Thanks!

    opened by seansasha 0
  • Add is_initialized() API

    Add is_initialized() API

    Backports is_initialized() API from jesec/libtorrent . This is required to fix a memory leak with SCGI on rTorrent. A pull request will be created later on rTorrent linking this. It will require a new release version of libtorrent.

    opened by stickz 0
an efficient feature complete C++ bittorrent implementation

libtorrent is an open source C++ library implementing the BitTorrent protocol, along with most popular extensions, making it suitable for real world d

Arvid Norberg 4k Aug 5, 2022
Tool for inspecting, creating and editing BitTorrent metafiles.

A commandline tool for creating, inspecting and modifying bittorrent metafiles.

null 103 Jul 27, 2022
Transmission is a fast, easy, and free BitTorrent client.

Official Transmission BitTorrent client repository

Transmission 7k Jul 30, 2022
Transmission is a fast, easy, and free BitTorrent client

About Transmission is a fast, easy, and free BitTorrent client. It comes in several flavors: A native Mac OS X GUI application GTK+ and Qt GUI applica

Bread 74 Aug 6, 2022
qBittorrent - A BitTorrent client in Qt

qBittorrent - A BitTorrent client in Qt Description: qBittorrent is a bittorrent client programmed in C++ / Qt that uses libtorrent (sometimes called

qBittorrent project 16.6k Jul 28, 2022
uTorrent Transport Protocol library

libutp - The uTorrent Transport Protocol library. Copyright (c) 2010 BitTorrent, Inc. uTP is a TCP-like implementation of LEDBAT documented as a BitTo

BitTorrent Inc. 1k Jul 20, 2022
BitTorrent DHT library

The files dht.c and dht.h implement the variant of the Kademlia Distributed Hash Table (DHT) used in the Bittorrent network (``mainline'' variant). T

Juliusz Chroboczek 639 Jul 27, 2022
an efficient feature complete C++ bittorrent implementation

libtorrent is an open source C++ library implementing the BitTorrent protocol, along with most popular extensions, making it suitable for real world d

Arvid Norberg 4k Aug 5, 2022
Tool for inspecting, creating and editing BitTorrent metafiles.

A commandline tool for creating, inspecting and modifying bittorrent metafiles.

null 103 Jul 27, 2022
A bittorrent plugin for VLC.

vlc-bittorrent (Bittorrent plugin for VLC) What is this? With vlc-bittorrent, you can open a .torrent file or magnet link with VLC and stream any medi

Johan Gunnarsson 319 Jul 27, 2022
Transmission is a fast, easy, and free BitTorrent client.

Official Transmission BitTorrent client repository

Transmission 7k Jul 30, 2022
This is a collection of tools for creating and manipulating BitTorrent v2 torrent files

torrent tools This is a collection of tools for creating and manipulating BitTorrent v2 torrent files. torrent-new can create hybrid torrents, but the

Arvid Norberg 8 Jun 1, 2022
Transmission is a fast, easy, and free BitTorrent client

About Transmission is a fast, easy, and free BitTorrent client. It comes in several flavors: A native Mac OS X GUI application GTK+ and Qt GUI applica

Bread 74 Aug 6, 2022
qBittorrent - A BitTorrent client in Qt

qBittorrent - A BitTorrent client in Qt Description: qBittorrent is a bittorrent client programmed in C++ / Qt that uses libtorrent (sometimes called

qBittorrent project 16.6k Jul 28, 2022
SSD1306 library and simple graphics core library based on Adafruit GFX Library.

Raspberry Pico SSD1306 + GFX Library Based on Adafruit GFX Library https://github.com/adafruit/Adafruit-GFX-Library Usage Hardware Connect your SSD130

Marcin Bober 29 Jul 27, 2022
This library provides a cross-platform image loading library in C11 for projects based on our foundation library

Image Library - Public Domain This library provides a cross-platform image loading library in C11 for projects based on our foundation library.

Mattias Jansson 1 Jan 29, 2022
The dgSPARSE Library (Deep Graph Sparse Library) is a high performance library for sparse kernel acceleration on GPUs based on CUDA.

dgSPARSE Library Introdution The dgSPARSE Library (Deep Graph Sparse Library) is a high performance library for sparse kernel acceleration on GPUs bas

dgSPARSE 52 Jul 28, 2022
C-based/Cached/Core Computer Vision Library, A Modern Computer Vision Library

Build Status Travis CI VM: Linux x64: Raspberry Pi 3: Jetson TX2: Backstory I set to build ccv with a minimalism inspiration. That was back in 2010, o

Liu Liu 6.9k Jul 30, 2022
A simple header-only C++ argument parser library. Supposed to be flexible and powerful, and attempts to be compatible with the functionality of the Python standard argparse library (though not necessarily the API).

args Note that this library is essentially in maintenance mode. I haven't had the time to work on it or give it the love that it deserves. I'm not add

Taylor C. Richberger 992 Aug 5, 2022
Bolt is a C++ template library optimized for GPUs. Bolt provides high-performance library implementations for common algorithms such as scan, reduce, transform, and sort.

Bolt is a C++ template library optimized for heterogeneous computing. Bolt is designed to provide high-performance library implementations for common

null 355 Jun 27, 2022
oneAPI DPC++ Library (oneDPL) https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/dpc-library.html

oneAPI DPC++ Library (oneDPL) The oneAPI DPC++ Library (oneDPL) aims to work with the oneAPI DPC++ Compiler to provide high-productivity APIs to devel

oneAPI-SRC 632 Aug 7, 2022
C-based/Cached/Core Computer Vision Library, A Modern Computer Vision Library

Build Status Travis CI VM: Linux x64: Raspberry Pi 3: Jetson TX2: Backstory I set to build ccv with a minimalism inspiration. That was back in 2010, o

Liu Liu 6.9k Jul 28, 2022
MIRACL Cryptographic SDK: Multiprecision Integer and Rational Arithmetic Cryptographic Library is a C software library that is widely regarded by developers as the gold standard open source SDK for elliptic curve cryptography (ECC).

MIRACL What is MIRACL? Multiprecision Integer and Rational Arithmetic Cryptographic Library – the MIRACL Crypto SDK – is a C software library that is

MIRACL 491 Aug 5, 2022
Mongoose Embedded Web Server Library - a multi-protocol embedded networking library with TCP/UDP, HTTP, WebSocket, MQTT built-in protocols, async DNS resolver, and non-blocking API.

Mongoose - Embedded Web Server / Embedded Networking Library Mongoose is a networking library for C/C++. It implements event-driven non-blocking APIs

Cesanta Software 8.6k Jul 29, 2022
MIRACL Cryptographic SDK: Multiprecision Integer and Rational Arithmetic Cryptographic Library is a C software library that is widely regarded by developers as the gold standard open source SDK for elliptic curve cryptography (ECC).

MIRACL What is MIRACL? Multiprecision Integer and Rational Arithmetic Cryptographic Library – the MIRACL Crypto SDK – is a C software library that is

MIRACL 490 Jul 28, 2022
C Hypertext Library - A library for writing web applications in C

CHL C Hypertext Library - A library for writing web applications in C #include <chl/chl.h> int main() { chl_set_default_headers(); chl_print_header

null 272 Jun 20, 2022
This repository is a summary of the basic knowledge of recruiting job seekers and beginners in the direction of C/C++ technology, including language, program library, data structure, algorithm, system, network, link loading library, interview experience, recruitment, recommendation, etc.

?? C/C++ 技术面试基础知识总结,包括语言、程序库、数据结构、算法、系统、网络、链接装载库等知识及面试经验、招聘、内推等信息。This repository is a summary of the basic knowledge of recruiting job seekers and beginners in the direction of C/C++ technology, including language, program library, data structure, algorithm, system, network, link loading library, interview experience, recruitment, recommendation, etc.

huihut 25.2k Aug 7, 2022
C XML Minimalistic Library (CXML) - An XML library for C with a focus on simplicity and ease of use.

cxml (C XML Minimalistic Library) is a powerful and flexible XML library for C with a focus on simplicity and ease of use, coupled with features that enables quick processing of XML documents.

null 28 Feb 11, 2022
Edge ML Library - High-performance Compute Library for On-device Machine Learning Inference

Edge ML Library (EMLL) offers optimized basic routines like general matrix multiplications (GEMM) and quantizations, to speed up machine learning (ML) inference on ARM-based devices. EMLL supports fp32, fp16 and int8 data types. EMLL accelerates on-device NMT, ASR and OCR engines of Youdao, Inc.

NetEase Youdao 176 Jul 21, 2022