an efficient feature complete C++ bittorrent implementation

Overview

docs/img/logo-color-text.png


https://ci.appveyor.com/api/projects/status/w7teauvub5813mew/branch/master?svg=true https://api.cirrus-ci.com/github/arvidn/libtorrent.svg?branch=RC_2_0 https://img.shields.io/lgtm/alerts/g/arvidn/libtorrent.svg?logo=lgtm&logoWidth=18 https://codecov.io/github/arvidn/libtorrent/coverage.svg?branch=master https://img.shields.io/lgtm/grade/cpp/g/arvidn/libtorrent.svg?logo=lgtm&logoWidth=18 https://www.openhub.net/p/rasterbar-libtorrent/widgets/project_thin_badge.gif https://bestpractices.coreinfrastructure.org/projects/3020/badge

libtorrent is an open source C++ library implementing the BitTorrent protocol, along with most popular extensions, making it suitable for real world deployment. It is configurable to be able to fit both servers and embedded devices.

The main goals of libtorrent are to be efficient and easy to use.

See libtorrent.org for more detailed build and usage instructions.

To build with boost-build, make sure boost and boost-build is installed and run:

b2

In the libtorrent root. To build the examples, run b2 in the examples directory.

See building.html for more details on how to build and which configuration options are available. For python bindings, see the python docs.

libtorrent ABI report.

libtorrent package versions in linux distributions, on repology.

Issues
  • WebTorrent support

    WebTorrent support

    This PR suggests an implementation of the WebTorrent protocol inside libtorrent. With this add-on, libtorrent can be used to run hybrid peers seamlessly.

    WebTorrent peers use the same application protocol as classic peers but with WebRTC Data Channels as underlying transport instead of uTP or TCP, allowing to run peers in web browsers. Due to the necessary connection signaling, WebTorrent peers require a specific WebSocket tracker to connect.

    Since documentation seems to be lacking, I implemented the WebTorrent signaling protocol the best I could guess by looking at existing code. You can find useful information and the reference Javascript implementation here: https://github.com/webtorrent/webtorrent

    The implementation requires two external dependencies added as submodules:

    • libdatachannel, my lightweight WebRTC Data Channels implementation, which relies on my ad-hoc UDP Interactive Connectivity Establishment (ICE) library libjuice
    • boost.JSON, a header-only JSON library for the tracker protocol

    This PR does not add new external dependencies to libtorrent (it only requires OpenSSL or GnuTLS depending on the compilation option).

    To test, you need a torrent file with at least one WebSocket tracker, for instance wss://tracker.openwebtorrent.com. You can find such a torrent file here: https://ageneau.org/upload/sintel.torrent You can also run a web browser peer on this page: https://webtorrent.io/

    opened by paullouisageneau 192
  • Support WebTorrent Protocol

    Support WebTorrent Protocol

    WebTorrent is a new implementation of the bittorrent protocol designed to work over WebRTC. This allows browsers to download torrents without plugins. However, due to the limitations of WebRTC it isn't possible to make the protocol compatible with bittorrent (or uTP).

    If libtorrent supported WebTorrent it would be able to communicate with both the existing swarm as well as the browser swarm that is restricted to WebTorrent only.

    enhancement pinned 
    opened by kevincox 155
  • Poor uTP performance

    Poor uTP performance

    When I seed a single 5GB file from an AWS server in Australia using the newest uTorrent version - to a single peer in Norway I get 2-3 megabyte/sec speed - which is pretty good compared to other UDP based transfer acceleration protocols. Flags in uTorrent on the peer side in Norway shows that uTP is used. The latency is about 350ms.

    When I seed the same single file using libTorrent 1.1.0.0 I end up with approx 150-500 kbyte/sec. Flags in uTorrent on the peer side in Norway shows that uTP is used here as well. I am running vanilla settings for libTorrent - the only settings specified are seedmode = true and automanaged=false.

    So it seems to be a uTP (UDP) performance issue with libtorrent?

    I also saw a similar issue here where you are in the loop @arvidn : https://github.com/Tribler/tribler/issues/2620

    What do you think?

    libtorrent version (or branch): 1.1.0.0 platform/architecture: Win - x64 - static MT compiler and compiler version: VS2017 - toolset v.141

    stale 
    opened by ngjermundshaug 148
  • trackers do not work in 1.2.4 with qbittorrent, 1.2.3 was ok

    trackers do not work in 1.2.4 with qbittorrent, 1.2.3 was ok

    libtorrent version (or branch): 1.2.4

    platform/architecture: x86_64 Linux Fedora 30

    compiler and compiler version: gcc 9.2.1

    When using qbittorrent 4.3.0-git with libtorrent 1.2.4, qbittorrent reports that none of the trackers work. Switching back to libtorrent 1.2.3 makes everything work just fine. Unfortunately qbittorrent does not produce any logs.

    opened by Safari77 101
  • Add a cibuildwheel workflow

    Add a cibuildwheel workflow

    This adds a cibuildwheel workflow.

    Features

    • Builds and tests wheels in 28 flavors
    • Can be run manually, with an option to upload to pypi
    • ~~Will run automatically when a release is published, unconditionally uploads to pypi~~
    • If a PR touches cibuildwheel infrastructure (cibuildwheel.yml or tools/cibuildwheel/**), we will test by building a representative sample of wheels (the full suite of wheels takes hours)
    • Caches build artifacts, so re-runs are fast

    Changes

    • ~~The python project name is changed from python-libtorrent to just libtorrent. Closer to common practice in python, plus the name was available on pypi~~
    • ~~Other changes to setup.py, following the principle that --config-mode=distutils should create a wheel-suitable build by default~~

    Tests

    I patched this (and other dependent build system changes) on the v1.2.14 and v2.0.4 tags. I uploaded the wheels to test-pypi:

    • https://test.pypi.org/project/libtorrent/2.0.4.post3/
    • https://test.pypi.org/project/libtorrent/1.2.14.post3/

    Release procedures and notes

    • @arvidn should create a pypi API token restricted to the "libtorrent" project, and add it as a github actions secret (PYPI_API_TOKEN)
    • EDIT: also create an API token on test-pypi restricted to the separate "libtorrent" project there, and add it as a github actions secret TEST_PYPI_API_TOKEN
    • I already registered the project on pypi (EDIT: and test-pypi), and invited @arvidn as an owner

    Proposed release procedure:

    • before you create a release, manually run the cibuildwheel workflow without publishing to pypi, to make sure everything builds
    • If everything builds, run the workflow again and publish to pypi. ~~Or just create the release, and the workflow will publish automatically.~~

    Release procedure caveats

    NOTE: pypi uploads are immutable, and filenames cannot be reused even after files are deleted. Publish with care!!

    • I already uploaded some files for libtorrent 2.0.4, then deleted them, not realizing those filenames can never be used again
      • If desired, this could be remedied by publishing a 2.0.4.1 release
    • It's good practice to upload to https://test.pypi.org/ before uploading the "production" index at https://pypi.org/
    • ~~But "libtorrent" at test-pypi is held by someone else, I believe by github user @mayli~~
    • ~~I have contacted @mayli by email to transfer ownership of the test-pypi project~~ EDIT: mayli transferred ownership of the project, thanks!

    Build Flavors

    • cp37-cp37m-macosx_10_9_x86_64
    • cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64
    • cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64
    • cp37-cp37m-musllinux_1_1_aarch64
    • cp37-cp37m-musllinux_1_1_x86_64
    • cp37-cp37m-win32
    • cp37-cp37m-win_amd64
    • cp38-cp38-macosx_10_9_x86_64
    • cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64
    • cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64
    • cp38-cp38-musllinux_1_1_aarch64
    • cp38-cp38-musllinux_1_1_x86_64
    • cp38-cp38-win32
    • cp38-cp38-win_amd64
    • cp39-cp39-macosx_10_9_x86_64
    • cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64
    • cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64
    • cp39-cp39-musllinux_1_1_aarch64
    • cp39-cp39-musllinux_1_1_x86_64
    • cp39-cp39-win32
    • cp39-cp39-win_amd64
    • cp310-cp310-macosx_10_9_x86_64
    • cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64
    • cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64
    • cp310-cp310-musllinux_1_1_aarch64
    • cp310-cp310-musllinux_1_1_x86_64
    • cp310-cp310-win32
    • cp310-cp310-win_amd64

    Missing flavors

    Flavors we'd like to build but can't

    • macos arm64
      • the x86 macos runners can cross-compile, but I can't seem to make it work. We are invoking b2 architecture=arm address-model=64 which should be right, but there are still link errors about mixing x86_64 objects.
      • macos on x86_64 cannot run or emulate arm64 code, so these builds can't be tested until there are m1 mac runners
    • macos universal2
      • b2 architecture=combined address-model=64 does not build this (should pick -arch x86_64 -arch arm64), even in boost 1.77.0. I tried cxxflags="-arch x86_64 -arch arm64", but the compiler says these flags are unused.
      • as above, these can't be tested until there are m1 mac runners. apparently mac on m1 can emulate x86_64, so universal binaries can be tested on a single runner, just not the runners we have
    • ~~musllinux~~
      • ~~this is new, and cibuildwheel doesn't support it yet~~ EDIT: the latest cibuildwheel supports this!
    • pypy
      • the python bindings don't build with this. I'll investigate

    Other flavors

    The build times already take hours, and the artifacts are large due to static linking, and pypi has finite hosting space. We should add flavors as requested, rather than building everything.

    Python 3.6 will reach end of life in 2021-12, so I've preemptively removed it from the list to shorten build times. numpy has already done this in their most recent release

    Future optimizations

    The builds currently take hours on aarch64 and other emulated architectures. It would be nice to reduce this.

    abi3

    The biggest win would be to use abi3 which would let us produce one build per platform rather than building for every python version. However

    Prebuild dependencies

    • openssl and boost-python (in all python versions) are built from source every time. We could cache them somewhere. On linux, using actions/cache is difficult because the builds run in docker. The right approach is probably to build a custom docker image with prebuilt dependencies. This would especially cut down build times for aarch64 and other emulated architectures.

    macos ccache

    We build artifacts for a given platform sequentially in a single job, which lets us use ccache. On the Linux builds this works well today.

    On mac, ccache reports 0% hit rates between builds for some reason. The only thing that changes is the python version. We should investigate this.

    windows ccache equivalent

    On Windows, there is no build caching. It would be nice to have. However the Windows builds already complete in ~40 minutes, so this is a smaller gain compared to others.

    opened by AllSeeingEyeTolledEweSew 96
  • Not working without a sparse mode

    Not working without a sparse mode

    I checked. The library shows that there are peers, but it doesn't download anything. Most devices in the world do not have sparse mode. It's an obvious library bug.

    opened by master255 94
  • LibTorrent remains connected to peers and seeds even when stalled

    LibTorrent remains connected to peers and seeds even when stalled

    libtorrent version (or branch):

    qBitTorrent 4.3.1 LibTorrent 1.2.11.0

    platform/architecture: Windows 10 64-bit

    LibTorrent remains connected to peers and seeds even when stalled because connected clients do not have any more torrent chunks to send.

    image

    stale 
    opened by Sophist-UK 91
  • libtorrent 1.1.{7,8,9} + Deluge 1.3.15, connecting only to small fraction of peers over dozens and only on certain trackers

    libtorrent 1.1.{7,8,9} + Deluge 1.3.15, connecting only to small fraction of peers over dozens and only on certain trackers

    Please provide the following information

    libtorrent version (or branch):

    • 1.1.7
    • 1.1.8
    • 1.1.9

    platform/architecture: Debian GNU/Linux 9, x86_64

    compiler and compiler version:

    gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516

    please describe what symptom you see, what you would expect to see instead and how to reproduce it.

    This issue was originally posted on Reddit r/seedboxes. I am summarizing it here.

    Deluge with the 1.1 branch of libtorrent (confirmed on .7, .8, and .9). Snatching torrents with autodl irssi on IPT and TL trackers.

    After seeing the first Announce OK message (not related to the unregistered torrent issue in #315; workaround on that works fine), Deluge connects to only a small fraction of peers. Usually 2 to 5 over confirmed swarms of dozens (also 60+). Often, the uploader does not seem to be included in the swarm, or the uploader is not shown on Deluge because of the bug itself. Download and upload start and performance is (of course) terrible.

    There are no other trackers that seem affected by the issue.

    Pausing and resuming a torrent mid-race "fixes" the issue. From 2-5 peers, Deluge starts seeing the entire swarm. Most of which are finished already. Download goes to the max, upload is almost none as most of them are at 100% already.

    A catch: the issue happens most of the times, but not all the times.

    Downgrading to libtorrent 1.0.11.0 fixes the issue completely.

    Somebody on Reddit suggested disabling UTP, but it does not solve the issue.

    opened by quarreldazzle 82
  • Simultaneously announcing IPv4 and IPv6 addresses

    Simultaneously announcing IPv4 and IPv6 addresses

    Please provide the following information

    libtorrent version (or branch):

    1.1.4

    platform/architecture:

    Debian Stretch x86-64 (Deluge)

    compiler and compiler version:

    Those used by the debian package / pre-compiled binaries for Ubuntu

    please describe what symptom you see, what you would expect to see instead and how to reproduce it:

    After postponing the update to 1.x as long as possible (0.16.18 on Debian Jessie works fine) but now Debian stable having reached 1.1.1 with the issue still in place, I hope it can be solved. The issue seems similar to https://github.com/arvidn/libtorrent/issues/219 but its resolution did not solve this one.

    I'm trying to announce both my IPv4 and IPv6 addresses to trackers which resulted in me trying the following configurations:

    • Binding to all addresses results in the client connecting to the tracker using the address it resolves to and not supplying either "ip" or "ipv6" parameters. If the tracker resolves to an v4 address, it only receives my IPv4 address and the same with IPv6.

    • Binding to only IPv4 results in the same outcome except the tracker will obviously only see my IPv4 address.

    • Binding to only IPv6 results in the client appending the "ipv6" parameter and the tracker receiving only the IPv6 address (two times).

    • When binding to all addresses it's possible to use announce_ip which seems to work for both v4 and v6 according to NexusPHP. If one guesses the address family the tracker resolves to (or just forces it using /etc/hosts), it's possible to add the "missing" other address that way. This seems to be the only way to currently pass both v4 and v6 to it while also listening to both addresses.

    To be sure the culprit are not these conditions: https://github.com/arvidn/libtorrent/pull/597/files#diff-19929347e18a6ff1fc37f09ec720306bR3147 I compiled 1.1.4 without them without any change.

    A bit off-topic but I don't understand the reason for the latter condition. In a regular scenario I'd want to connect to as many peers as possible, private torrent or not. This obviously includes peers having only an IPv6 address (which at some point in the future will be the whole swarm).

    bug 
    opened by lovesyk 74
  • Error state on unregistered torrents not set correctly (tracker_backoff and autodl)

    Error state on unregistered torrents not set correctly (tracker_backoff and autodl)

    Hey there,

    I've been trying to get Deluge 1.3.12 + Libtorrent 1.0.7 to work in conjunction with an autodl filter and a watch folder from a private tracker. I've been running around in circles trying to figure out why if when a torrent is added before the tracker has registered it, the client will wait a full 30 minutes until the next announce to refresh.

    I found the tracker_backoff setting and was hopeful that this would fix my problem; however, no amount of changing this value would do anything to solve my problem with unregistered torrents. The torrent gets added and if the torrent is not registered, the announce interval is set to 30 minutes.

    I started wondering, perhaps a failure isn't being reported properly somehow. Sure enough, I altered the tracker URL to something bogus and suddenly the retry intervals were set according to the tracker_backoff setting ( 7, 15, 27, 45, 95, 127, 165 seconds, etc). This leads me to believe that somehow the error status on unregistered torrents isn't being recognized properly, even though the Announce Status reads: Error: (Unregistered Torrent) and as a result of being able to connect to the tracker, libtorrent decides to announce as if all is normal and set the next refresh to 30 minutes.

    This may be a tracker specific issue; however, it's worth noting that the error state is read correctly when using AutoDL with rtorrent.

    opened by niayh 69
  • CMake: refactor scripts

    CMake: refactor scripts

    • refactor macros and create a common interface target
    • Enquote non-list variables
    • Specify project version directly in the build script instead of reading from version.hpp.
    • correctly specify boost components and minimum required version.
    • make all feature setup explicit, not automatic upon finding/not finding certain dependencies/components.
    • get rid of ucm_flags.cmake and associated manual manipulation of CMAKE_CXX_* variable manipulation
    • fix install-time warnings about CMP0007 and CMP0053
    • use only target_* commands to propagate build and usage requirements, don't use any directory-scope commands.
    • simplify feature selection
    • make use of generator expressions to help better structure the main build script. The main build script is now roughly structured as follows:
      1. feature declaration/setup
      2. find required dependency packages
      3. main target configuration: add_library(...) followed by target_*(...) commands to configure its compile features, options, definitions, etc. We strive to call each target_*(...) command only once or as few times as possible, so that each logical property of the build (compile options, compile definitions, ...) can be contained in a single place, hopefully making things easier to find and thus the build script easier to maintain.
      4. optional build of bindings
      5. install configuration
      6. optional build of tools, examples, and tests

    Pretty substantial overhaul. The focus was on modernizing and structuring it more logically and consistently.

    Tested on Windows (x64-windows and x64-windows-static with vcpkg) and Ubuntu (dynamic build). Let's see if the CI complains...

    Porting this to other branches is almost certainly non-trivial, but I'd be willing to help with that of course.

    Feel free to ask about the reasoning for each of the changes.

    EDIT: here is the old vs new dependency graph, as generated on Ubuntu 20.04 with CMake's --graphviz option, in a build with both tools and examples.

    The biggest difference is that now the dependency on Boost components is correctly acknowledged (because we're explicitly linking its targets instead of "throwing in a bunch of include files").

    The other big difference is that every target has a private dependency on the interface library libtorrent_common_cfg. This is so that targets of the libtorrent project can use some common options, without propagating to other upstream projects.

    old_graph new_graph

    EDIT: current revised target dependency graphs after changes made with the feedback below with/without deprecated functions disabled, respectively. new2 new2depr

    stale 
    opened by FranciscoPombal 68
  • Inefficient synchronization way to obtain some data from libtorrent

    Inefficient synchronization way to obtain some data from libtorrent

    libtorrent version (or branch): both v1.2.x and v2.0.x

    platform/architecture: any

    compiler and compiler version: any

    When receiving some data from libtorrent using synchronous calls (for example, using some kind of torrent_handle getter), too long delays are noticed from time to time, regardless of either the current system load or the parameters of the affected torrent. It looks like either the synchronization code has some drawbacks, or it is implemented in a way that is unfriendly to the caller. Recently, we have tried to avoid synchronous calls as much as possible. Unfortunately, some of the mentioned data cannot be obtained asynchronously (for example, via torrent_status), so we still have to resort to synchronous way, which leads to GUI hangups.

    opened by glassez 1
  • Fedora 36 x86_64 - crypto-policy - sha1 - segfault

    Fedora 36 x86_64 - crypto-policy - sha1 - segfault

    I have been trying to understand an issue occuring on Fedora 36 and here are two comments from an openssl thread regarding some recent changes to crypto-policy

    My post has all the links and info needs (patches/packages/potential causes/workarounds) https://github.com/openssl/openssl/issues/17662#issuecomment-1201245477

    A reply about where the issue might be. https://github.com/openssl/openssl/issues/17662#issuecomment-1201293020

    I have built on Fedora 36 and created this better back trace

    Reading symbols from ./qbt-build/completed/qbittorrent-nox...
    (gdb) run
    Starting program: /root/qbt-build/completed/qbittorrent-nox
    warning: Error disabling address space randomization: Operation not permitted
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib64/libthread_db.so.1".
    Qt en_GB locale unrecognized, using default (en).
    en_GB locale recognized, using translation.
    Disabling HTTP communications proxy
    HTTP communications proxy string:
    terminate called after throwing an instance of 'boost::wrapexcept<boost::system::system_error>'
      what():  context: unknown option (digital envelope routines) [asio.ssl:50331817]
    
    Program received signal SIGABRT, Aborted.
    __pthread_kill_implementation (threadid=<optimized out>, [email protected]=6, [email protected]=0) at pthread_kill.c:44
    44            return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
    (gdb) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, [email protected]=6, [email protected]=0) at pthread_kill.c:44
    #1  0x00007f83a0e8dcb3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
    #2  0x00007f83a0e3d9c6 in __GI_raise ([email protected]=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007f83a0e277f4 in __GI_abort () at abort.c:79
    #4  0x00007f83a11a1b57 in __gnu_cxx::__verbose_terminate_handler () at ../../../../libstdc++-v3/libsupc++/vterminate.cc:95
    #5  0x00007f83a11ad43c in __cxxabiv1::__terminate (handler=<optimized out>) at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:48
    #6  0x00007f83a11ad4a7 in std::terminate () at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:58
    #7  0x00007f83a11ad708 in __cxxabiv1::__cxa_throw (obj=<optimized out>, tinfo=0x211cfc0 <typeinfo for boost::wrapexcept<boost::system::system_error>>, dest=0x4b23d0 <boost::wrapexcept<boost::system::system_error>::~wrapexcept()>)
        at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:98
    #8  0x00000000004b24da in boost::throw_exception<boost::system::system_error> (e=...) at /root/qbt-build/boost/boost/throw_exception.hpp:165
    #9  0x00000000006a9485 in boost::asio::detail::do_throw_error (err=..., location=0x1991996 "context") at /root/qbt-build/boost/boost/asio/detail/impl/throw_error.ipp:38
    #10 0x00000000006a944e in boost::asio::detail::throw_error (err=..., location=0x1991996 "context") at /root/qbt-build/boost/boost/asio/detail/throw_error.hpp:42
    #11 0x0000000000787025 in boost::asio::ssl::context::context (this=0x2cf82f0, m=boost::asio::ssl::context_base::tls_client) at /root/qbt-build/boost/boost/asio/ssl/impl/context.ipp:364
    #12 0x0000000000743670 in libtorrent::aux::session_impl::session_impl(boost::asio::io_context&, libtorrent::settings_pack const&, std::function<std::unique_ptr<libtorrent::disk_interface, std::default_delete<libtorrent::disk_interface> > (boost::asio::io_context&, libtorrent::settings_interface const&, libtorrent::counters&)>, libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void>) (this=0x2cf7300, ioc=..., pack=..., disk_io_constructor=..., flags=...) at /root/qbt-build/libtorrent/src/session_impl.cpp:518
    #13 0x00000000007087be in std::_Construct<libtorrent::aux::session_impl, std::reference_wrapper<boost::asio::io_context>, libtorrent::settings_pack, std::function<std::unique_ptr<libtorrent::disk_interface, std::default_delete<libtorrent::disk_interface> > (boost::asio::io_context&, libtorrent::settings_interface const&, libtorrent::counters&)>, libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void> const&>(libtorrent::aux::session_impl*, std::reference_wrapper<boost::asio::io_context>&&, libtorrent::settings_pack&&, std::function<std::unique_ptr<libtorrent::disk_interface, std::default_delete<libtorrent::disk_interface> > (boost::asio::io_context&, libtorrent::settings_interface const&, libtorrent::counters&)>&&, libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void> const&) (__p=0x2cf7300) at /usr/include/c++/12/bits/stl_construct.h:119
    #14 0x0000000000707ac0 in std::allocator_traits<std::allocator<void> >::construct<libtorrent::aux::session_impl, std::reference_wrapper<boost::asio::io_context>, libtorrent::settings_pack, std::function<std::unique_ptr<libtorrent::disk_interface, std::default_delete<libtorrent::disk_interface> > (boost::asio::io_context&, libtorrent::settings_interface const&, libtorrent::counters&)>, libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void> const&>(std::allocator<void>&, libtorrent::aux::session_impl*, std::reference_wrapper<boost::asio::io_context>&&, libtorrent::settings_pack&&, std::function<std::unique_ptr<libtorrent::disk_interface, std::default_delete<libtorrent::disk_interface> > (boost::asio::io_context&, libtorrent::settings_interface const&, libtorrent::counters&)>&&, libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void> const&) (__p=0x2cf7300) at /usr/include/c++/12/bits/alloc_traits.h:635
    #15 0x00000000007070dc in std::_Sp_counted_ptr_inplace<libtorrent::aux::session_impl, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<std::reference_wrapper<boost::asio::io_context>, libtorrent::settings_pack, std::function<std::unique_ptr<libtorrent::disk_interface, std::default_delete<libtorrent::disk_interface> > (boost::asio::io_context&, libtorrent::settings_interface const&, libtorrent::counters&)>, libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void> const&>(std::allocator<void>, std::reference_wrapper<boost::asio::io_context>&&, libtorrent::settings_pack&&, std::function<std::unique_ptr<libtorrent::disk_interface, std::default_delete<libtorrent::disk_interface> > (boost::asio::io_context&, libtorrent::settings_interface const&, libtorrent::counters&)>&&, libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void> const&) (this=0x2cf72f0, __a=...) at /usr/include/c++/12/bits/shared_ptr_base.h:604
    #16 0x00000000007066ab in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<libtorrent::aux::session_impl, std::allocator<void>, std::reference_wrapper<boost::asio::io_context>, libtorrent::settings_pack, std::function<std::unique_ptr<libtorrent::disk_interface, std::default_delete<libtorrent::disk_interface> > (boost::asio::io_context&, libtorrent::settings_interface const&, libtorrent::counters&)>, libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void> const&>(libtorrent::aux::session_impl*&, std::_Sp_alloc_shared_tag<std::allocator<void> >, std::reference_wrapper<boost::asio::io_context>&&, libtorrent::settings_pack&&, std::function<std::unique_ptr<libtorrent::disk_interface, std::default_delete<libtorrent::disk_interface> > (boost::asio::io_context&, libtorrent::settings_interface const&, libtorrent::counters&)>&&, libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void> const&) (this=0x7ffd9b1d88c8, [email protected]: 0x0, __a=...) at /usr/include/c++/12/bits/shared_ptr_base.h:971
    #17 0x0000000000705e6c in std::__shared_ptr<libtorrent::aux::session_impl, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, std::reference_wrapper<boost::asio::io_context>, libtorrent::settings_pack, std::function<std::unique_ptr<libtorrent::disk_interface, std::default_delete<libtorrent::disk_interface> > (boost::asio::io_context&, libtorrent::settings_interface const&, libtorrent::counters&)>, libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void> const&>(std::_Sp_alloc_shared_tag<std::allocator<void> >, std::reference_wrapper<boost::asio::io_context>&&, libtorrent::settings_pack&&, std::function<std::unique_ptr<libtorrent::disk_interface, std::default_delete<libtorrent::disk_interface> > (boost::asio::io_context&, libtorrent::settings_interface const&, libtorrent::counters&)>&&, libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void> const&) (this=0x7ffd9b1d88c0, __tag=...) at /usr/include/c++/12/bits/shared_ptr_base.h:1712
    #18 0x000000000070538d in std::shared_ptr<libtorrent::aux::session_impl>::shared_ptr<std::allocator<void>, std::reference_wrapper<boost::asio::io_context>, libtorrent::settings_pack, std::function<std::unique_ptr<libtorrent::disk_interface, std::default_delete<libtorrent::disk_interface> > (boost::asio::io_context&, libtorrent::settings_interface const&, libtorrent::counters&)>, libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void> const&>(std::_Sp_alloc_shared_tag<std::allocator<void> >, std::reference_wrapper<boost::asio::io_context>&&, libtorrent::settings_pack&&, std::function<std::unique_ptr<libtorrent::disk_interface, std::default_delete<libtorrent::disk_interface> > (boost::asio::io_context&, libtorrent::settings_interface const&, libtorrent::counters&)>&&, libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void> const&) (this=0x7ffd9b1d88c0, __tag=...) at /usr/include/c++/12/bits/shared_ptr.h:464
    #19 0x0000000000704807 in std::make_shared<libtorrent::aux::session_impl, std::reference_wrapper<boost::asio::io_context>, libtorrent::settings_pack, std::function<std::unique_ptr<libtorrent::disk_interface, std::default_delete<libtorrent::disk_interface> > (boost::asio::io_context&, libtorrent::settings_interface const&, libtorrent::counters&)>, libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void> const&>(std::reference_wrapper<boost::asio::io_context>&&, libtorrent::settings_pack&&, std::function<std::unique_ptr<libtorrent::disk_interface, std::default_delete<libtorrent::disk_interface> > (boost::asio::io_context&, libtorrent::settings_interface const&, libtorrent::counters&)>&&, libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void> const&) ()
        at /usr/include/c++/12/bits/shared_ptr.h:1010
    #20 0x0000000000700fe8 in libtorrent::session::start (this=0x2cf6120, flags=..., params=..., ios=0x2cf6970) at /root/qbt-build/libtorrent/src/session.cpp:308
    #21 0x000000000070170a in libtorrent::session::session (this=0x2cf6120, params=...) at /root/qbt-build/libtorrent/src/session.cpp:369
    #22 0x000000000049a72f in BitTorrent::Session::initializeNativeSession (this=0x2cf1a00) at /root/qbt-build/qbittorrent/src/base/bittorrent/session.cpp:1103
    #23 0x00000000004962d9 in BitTorrent::Session::Session (this=0x2cf1a00, parent=0x0) at /root/qbt-build/qbittorrent/src/base/bittorrent/session.cpp:457
    #24 0x0000000000499f8a in BitTorrent::Session::initInstance () at /root/qbt-build/qbittorrent/src/base/bittorrent/session.cpp:1003
    #25 0x000000000042f7ec in Application::exec (this=0x2cdd530, params=...) at /root/qbt-build/qbittorrent/src/app/application.cpp:634
    #26 0x0000000000441e8c in main (argc=1, argv=0x7ffd9b1d9fa8) at /root/qbt-build/qbittorrent/src/app/main.cpp:312
    (gdb)
    

    I this is a libtorrent boost issue? or is the problem elsewhere?

    opened by userdocs 1
  • Checking on a Mounted Drive

    Checking on a Mounted Drive

    Hi, I use libtorrent to download on a mounted google drive but when I resume a transfer, I always run out of disk space while it is checking the files. It seems like it copies the files locally. What settings could help me get around that? I'm using the python binding btw on a Ubuntu 18.04 Thank you

    opened by FloatingMind12 2
  • Compile error: MSYS2 Mingw64 + wolfssl

    Compile error: MSYS2 Mingw64 + wolfssl

    $BOOST_ROOT/b2.exe --toolset=gcc --layout=system cxxstd=20 variant=release threading=multi boost-link=static link=static runtime-link=static i2p=on dht=on boost-link=static fpic=on logging=off crypto=wolfssl deprecated-functions=on debug-symbols=off

    image

    Insert the header file #include <sys/stat.h> into include\libtorrent\stat.hpp could pass the compiling process.

    But the "libtorrent.a" was broken because the stat macro (OpenSSL & WolfSSL) replaced the libtorrent::stat.

    There is no such problem if crypto=built-in, it only existed on windows + MinGW.

    opened by filecxx 1
Releases(v2.0.7)
  • v2.0.7(Jul 17, 2022)

    Changes since last release:

    • fix issue in use of copy_file_range() on linux
    • avoid open-file race in the file_view_pool
    • fix issue where stop-when-ready would not close files
    • fix issue with duplicate hybrid torrent via separate v1 and v2 magnet links
    • added new function to load torrent files, load_torrent_*()
    • support sync_file_range() on linux
    • fix issue in write_torrent_file() when file size is exactly piece size
    • fix file_num_blocks() and file_num_pieces() for empty files
    • add new overload to make_magnet_uri()
    • add missing protocol version to tracker_reply_alert and tracker_error_alert
    • fix privilege issue with SetFileValidData()
    • add asynchronous overload of torrent_handle::add_piece()
    • default to a single hashing thread, for full checks
    • Fix bug when checking files and the first piece is invalid

    As well as changes merged in from the 1.2.x branch:

    • fixed tracker connections spinning when hostname lookups stall
    • fixed error in pkg-config file generation in Jamfile
    • improve backwards compatibility with loading magnet link resume files
    • fix bind-to-device for tracker announces and UPnP
    • rename peer_tos setting to peer_dscp
    • fix bdecode support for large strings (>= 100 MB)
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-2.0.7.tar.gz(4.24 MB)
  • v1.2.17(Jul 17, 2022)

    Changes since last release:

    • fixed tracker connections spinning when hostname lookups stall
    • fixed error in pkg-config file generation in Jamfile
    • improve backwards compatibility with loading magnet link resume files
    • fix bind-to-device for tracker announces and UPnP
    • rename peer_tos setting to peer_dscp
    • fix bdecode support for large strings (>= 100 MB)
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-1.2.17.tar.gz(3.97 MB)
  • v2.0.6(Apr 16, 2022)

    Changes since 2.0.5:

    • fix issue creating a v2 torrent from torrent_info containing an empty file
    • make recheck files also update which files use partfile
    • add write_through disk_io_write_mode, which flushes pieces to disk immediately
    • improve copy file function to preserve sparse regions (when supported)
    • add function to truncate over-sized files part of a torrent
    • fix directory creation on windows shared folders
    • add flag to make add_files() not record file attributes
    • deprecate (unused) allow_partial_disk_writes settings
    • fix disk-full error reporting in mmap_disk_io
    • fixed similar-torrents feature for v2 torrents
    • fix potential unbounded recursion in add_completed_job, in disk I/O
    • deprecated (unused) volatile_read_cache setting
    • fix part files being marked as hidden on windows
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-2.0.6.tar.gz(4.22 MB)
  • v1.2.16(Apr 16, 2022)

    changes since 1.2.15:

    • send User-Agent field in anonymous mode
    • fix python binding for settings_pack conversion
    • fix DHT announce timer issue
    • use DSCP_TRAFFIC_TYPE socket option on windows
    • update default ToS setting according to RFC 8622
    • keep trying to announce to trackers even when all fail
    • don't disable announcing from local endpoints because of temporary failures
    • fix issue in parsing UPnP XML response with multiple forwarding services
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-1.2.16.tar.gz(3.97 MB)
  • v2.0.5(Dec 4, 2021)

    • on windows, explicitly flush memory mapped files periodically
    • fix build with WolfSSL
    • fix issue where incoming uTP connections were not accepted over SOCKS5
    • fix several issues in handling of checking files of v2 torrents, esp. from magnet links
    • make the token limit when parsing metadata from magnet files configurable
    • fix issue with stalled pieces on disk full errors
    • fix missing python binding for file_progress_flags
    • fix torrent_file_with_hashes() to fail when we don't have the piece layers
    • restore path character encoding conversion for non UTF-8 locales on linux
    • fix use-after-free bug in make_magnet_uri
    • add write_torrent_file() to produce a .torrent file from add_torrent_params
    • allow loading v2 .torrent files without piece layer
    • fix issue with adding v2 torrents with invalid file root hash
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-2.0.5.tar.gz(4.20 MB)
  • v1.2.15(Dec 4, 2021)

    1.2.15 released

    • cache DNS lookups for SOCKS5 proxy
    • fix stalled pieces on disk-full errors
    • fix build configuration issue on NetBSD, OpenBSD and DragonFly
    • make UTF-8 sanitization a bit stricter. This will re-write invalid UTF-8 code points encoding surrogate pairs
    • fix restoring last_seen_complete from resume data
    • fix issue on MacOS where the DHT was not restarted on a network-up notification
    • make remove_torrent flags be treated as flags (instead of an enum)
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-1.2.15.tar.gz(3.97 MB)
  • v2.0.4(Jun 7, 2021)

    • fix piece picker bug causing double-picks with prefer-contiguous enabled
    • expose session_params in python bindings
    • fix (deprecated) use of add_torrent_params::info_hash
    • fix issue creating and loading v2 torrents with empty files. Improves conformance to BEP52 reference implementation

    fixes merged in from the 1.2.x branch:

    • improve handling of seed flag in PEX messages
    • fix issue of accruing unlimited DHT node candidates when DHT is disabled
    • fix bug in parsing chunked encoding
    • fix incorrect reporting of active_duration when entering graceful-pause
    • fix python binding for functions taking string_view
    • fix python binding for torrent_info constructor overloads
    • issue python deprecation warnings for some deprecated functions in the python bindings
    • fix python binding for torrent_info::add_url_seed, add_tracker and add_http_seed
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-2.0.4.tar.gz(4.11 MB)
  • v1.2.14(Jun 7, 2021)

    • improve handling of seed flag in PEX messages
    • fix issue of accruing unlimited DHT node candidates when DHT is disabled
    • fix bug in parsing chunked encoding
    • fix incorrect reporting of active_duration when entering graceful-pause
    • fix python binding for functions taking string_view
    • fix python binding for torrent_info constructor overloads
    • issue python deprecation warnings for some deprecated functions in the python bindings
    • fix python binding for torrent_info::add_url_seed, add_tracker and add_http_seed
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-1.2.14.tar.gz(3.96 MB)
  • v2.0.3(Mar 28, 2021)

    With this release there's also a security audit published, done by include security and sponsored by Mozilla. The issues raised in the report were addressed in the previous release and documented here along with the report.

    Changes since the previous 2.0.x release:

    • add new torrent_file_with_hashes() which includes piece layers for creating .torrent files
    • add file_prio_alert, posted when file priorities are updated
    • fix issue where set_piece_hashes() would not propagate file errors
    • add missing python binding for event_t
    • add work-around for systems without fseeko() (such as Android)
    • add convenience header libtorrent/libtorrent.hpp
    • increase default max_allowed_in_request_queue
    • fix loading non-ascii filenames on windows with torrent_info constructor (2.0 regression)
    • add std::hash<> specialization for info_hash_t
    • fix integer overflow in hash_picker and properly restrict max file sizes in torrents
    • strengthen SSRF mitigation for web seeds
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-2.0.3.tar.gz(4.09 MB)
  • v1.2.13(Mar 28, 2021)

    Changes since the previous 1.2.x release:

    • Use /etc/ssl/cert.pem to validate HTTPS connections on MacOS
    • allow no-interest timeouts of peer connections before all connections slots are full
    • fix issue where a DHT message would count as an incoming connection
    • fix issue when failing to parse outgoing_interfaces setting
    • fix super-seeding issue that could cause a segfault
    • fix data race in python binding of session::get_torrent_status()
    • fix need_save_resume_data() for renaming files, share-mode, upload-mode, disable- pex, lsd, and dht.
    • fix incoming TCP connections when using tracker-only proxy
    • fix issue with paths starting with ./
    • fix integer overflow when setting a high DHT upload rate limit
    • improve Path MTU discovery logic in uTP
    • fix overflow issue when rlimit_nofile is set to infinity
    • fix issue in python binding interpreting int settings > INT_MAX
    • Fix cxxflags and linkflags injection via environment variables
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-1.2.13.tar.gz(3.96 MB)
  • v2.0.2(Jan 7, 2021)

    Changes to the 2.0 branch:

    • add v1() and v2() functions to torrent_info
    • fix piece_layers() to work for single-piece files
    • fix python binding regression in session constructor flags
    • fix unaligned piece requests in mmap_storage
    • improve client_data_t ergonomics
    • fix issue with concurrent access to part files

    Changes merged from the 1.2 branch:

    • fix loading of DHT node ID from previous session on startup
    • use getrandom(), when available, and fall back to /dev/urandom
    • fix python binding for "value" in dht put alerts
    • fix bug in python binding for dht_put_mutable_item
    • fix uTP issue acking FIN packets
    • validate HTTPS certificates by default (trackers and web seeds)
    • load SSL certificates from windows system certificate store, to authenticate trackers
    • introduce mitigation for Server Side Request Forgery in tracker and web seed URLs
    • fix error handling for pool allocation failure
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-2.0.2.tar.gz(4.07 MB)
  • v1.2.12(Jan 5, 2021)

    • fix loading of DHT node ID from previous session on startup
    • use getrandom(), when available, and fall back to /dev/urandom
    • fix python binding for "value" in dht put alerts
    • fix bug in python binding for dht_put_mutable_item
    • fix uTP issue acking FIN packets
    • validate HTTPS certificates by default (trackers and web seeds)
    • load SSL certificates from windows system certificate store, to authenticate trackers
    • introduce mitigation for Server Side Request Forgery in tracker and web seed URLs
    • fix error handling for pool allocation failure
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-1.2.12.tar.gz(3.95 MB)
  • v2.0.1(Nov 15, 2020)

    Fixes since libtorrent 2.0:

    • fix attribute in single-file v2 torrent creation
    • fix padding for empty files in v2 torrent creation
    • add function to ask a file_storage whether it's v2 or not
    • fix mtime field when creating single-file v2 torrents
    • fix performance regression in checking files
    • disable use of SetFileValidData() by default (windows). A new setting allows enabling it
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-2.0.1.tar.gz(4.05 MB)
  • v1.2.11(Nov 15, 2020)

    Fixes since the 1.2.10 release:

    • fix issue with moving the session object
    • deprecate torrent_status::allocating. This state is no longer used
    • fix bug creating torrents with symbolic links
    • remove special case to save metadata in resume data unconditionally when added throught magnet link
    • fix bugs in mutable-torrent support (reusing identical files from different torrents)
    • fix incorrectly inlined move-assignment of file_storage
    • add session::paused flag, and the ability to construct a session in paused mode
    • fix session-pause causing tracker announces to fail
    • fix peer-exchange flags bug
    • allow saving resume data before metadata has been downloaded (for magnet links)
    • record blocks in the disk queue as downloaded in the resume data
    • fix bug in set_piece_deadline() when set in a zero-priority piece
    • fix issue in URL parser, causing issues with certain tracker URLs
    • use a different error code than host-unreachable, when skipping tracker announces
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-1.2.11.tar.gz(3.94 MB)
  • 2.0(Sep 6, 2020)

    Changes since

    • dropped depenency on iconv
    • deprecate set_file_hash() in torrent creator, as it's superceded by v2 torrents
    • deprecate mutable access to info_section in torrent_info
    • removed deprecated lazy_entry/lazy_bdecode
    • stats_alert deprecated
    • remove bittyrant choking algorithm
    • update userdata in add_torrent_params to be type-safe and add to torrent_handle
    • add ip_filter to session_params
    • added support for wolfSSL for SHA-1 hash and HTTPS (no Torrents over SSL)
    • requires OpenSSL minimum version 1.0.0 with SNI support
    • deprecated save_state() and load_state() on session in favour of new write_session_params() and read_session_params()
    • added support for BitTorrent v2 (see docs/upgrade_to_2.0.html)
    • create_torrent() pad_file_limit parameter removed
    • create_torrent() merkle- and optimize-alignment flags removed
    • merkle_tree removed from add_torrent_params
    • announce_entry expose information per v1 and v2 info-hash announces
    • deprecated sha1_hash info_hash members on torrent_removed_alert, torrent_deleted_alert, torrent_delete_failed_alert and add_torrent_params
    • undeprecate error_file_metadata for torrent errors related to its metadata
    • remove support for adding a torrent under a UUID (used for previous RSS support)
    • remove deprecated feature to add torrents by file:// URL
    • remove deprecated feature to download .torrent file from URL
    • requires boost >= 1.66 to build
    • update networking API to networking TS compatible boost.asio
    • overhauled disk I/O subsystem to use memory mapped files (where available)
    • libtorrent now requires C++14 to build
    • added support for GnuTLS for HTTPS and torrents over SSL
    Source code(tar.gz)
    Source code(zip)
    corpus.zip(34.54 MB)
    libtorrent-rasterbar-2.0.0.tar.gz(4.02 MB)
  • libtorrent-1.2.10(Sep 3, 2020)

  • libtorrent-2.0-RC3(Aug 27, 2020)

    Major changes since 2.0 RC2:

    • restored backwards compatibility with info_hash fields (introducing the v2-compatible info_hash_t as "info_hashes" instead). This is a major fix to ease upgrade. This brings libtorrent 2.0 much closer to being fully source compatible with 1.2.x. The custom storage API is the main part whose API has changed.
    • dropped dependency on iconv
    • dropped deprecated wstring overloads of some functions
    • merged change from 1.2.x to drop Unicode-licensed code (for Debian compatibility)
    • the soname of the libtorrent library is "2.0" and will be . going forward.
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-2.0.0-RC3.tar.gz(4.02 MB)
  • libtorrent-1.2.9(Aug 20, 2020)

    1.2.9 released

    • add macro TORRENT_CXX11_ABI for clients building with C++14 against libtorrent build with C++11
    • refreshed m4 scripts for autotools
    • removed deprecated wstring overloads on non-windows systems
    • drop dependency on Unicode's ConvertUTF code (which had a license incompatible with Debian)
    • fix bugs exposed on big-endian systems
    • fix detection of hard-links not being supported by filesystem
    • fixed resume data regression for seeds with prio 0 files
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-1.2.9.tar.gz(3.93 MB)
  • libtorrent-1.2.8(Aug 4, 2020)

    Changes since the previous stable release:

    • validate UTF-8 encoding of client version strings from peers
    • don't time out tracker announces as eagerly while resolving hostnames
    • fix NAT-PMP shutdown issue
    • improve hostname lookup by merging identical lookups
    • fix network route enumeration for large routing tables
    • fixed issue where pop_alerts() could return old, invalid alerts
    • fix issue when receiving have-all message before the metadata
    • don't leave lingering part files handles open
    • disallow calling add_piece() during checking
    • fix incorrect filename truncation at multi-byte character
    • always announce listen port 1 when using a proxy
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-1.2.8.tar.gz(3.93 MB)
  • libtorrent-2.0-RC2(Jul 30, 2020)

    In this 2nd release candidate of libtorrent-2.0, a fair number of issues has been fixed in the 1.2.x branch and been merged into the 2.0 one.

    One notable update is an overhaul of the documentation, a pre-release of it can be found here.

    The updated changelog for libtorrent-2.0 is:

    • deprecate set_file_hash() in torrent creator, as it's superceded by v2 torrents
    • deprecate mutable access to info_section in torrent_info
    • removed deprecated lazy_entry/lazy_bdecode
    • stats_alert deprecated
    • remove bittyrant choking algorithm
    • update userdata in add_torrent_params to be type-safe and add to torrent_handle
    • add ip_filter to session_params
    • added support for wolfSSL for SHA-1 hash and HTTPS (no Torrents over SSL)
    • requires OpenSSL minimum version 1.0.0 with SNI support
    • deprecated save_state() and load_state() on session in favour of new write_session_params() and read_session_params()
    • added support for BitTorrent v2 (see docs/upgrade_to_2.0.html)
    • create_torrent() pad_file_limit parameter removed
    • create_torrent() merkle- and optimize-alignment flags removed
    • merkle_tree removed from add_torrent_params
    • announce_entry expose information per v1 and v2 info-hash announces
    • torrent_removed_alert, torrent_deleted_alert, torrent_delete_failed_alert: info_hash member is no longer a sha-1 hash, but (deprecated) implicitly convertible to one
    • undeprecate error_file_metadata for torrent errors related to its metadata
    • remove support for adding a torrent under a UUID (used for previous RSS support)
    • remove deprecated feature to add torrents by file:// URL
    • remove deprecated feature to download .torrent file from URL
    • requires boost >= 1.66 to build
    • update networking API to networking TS compatible boost.asio
    • overhauled disk I/O subsystem to use memory mapped files (where available)
    • libtorrent now requires C++14 to build
    • added support for GnuTLS for HTTPS and torrents over SSL

    As well as new fixes merged in from 1.2.8:

    • don't time out tracker announces as eagerly while resolving hostnames
    • fix NAT-PMP shutdown issue
    • improve hostname lookup by merging identical lookups
    • fix network route enumeration for large routing tables
    • fixed issue where pop_alerts() could return old, invalid alerts
    • fix issue when receiving have-all message before the metadata
    • don't leave lingering part files handles open
    • disallow calling add_piece() during checking
    • fix incorrect filename truncation at multi-byte character
    • always announce listen port 1 when using a proxy
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-2.0.0-RC2.tar.gz(3.95 MB)
  • libtorrent=2_0_0-RC(May 31, 2020)

    2.0 Release Candidate

    • deprecate mutable access to info_section in torrent_info
    • removed deprecated lazy_entry/lazy_bdecode
    • stats_alert deprecated
    • remove bittyrant choking algorithm
    • update userdata in add_torrent_params to be type-safe and add to torrent_handle
    • add ip_filter to session_params
    • added support for wolfSSL for SHA-1 hash and HTTPS (no Torrents over SSL)
    • requires OpenSSL minimum version 1.0.0 with SNI support
    • deprecated save_state() and load_state() on session in favour of new write_session_params() and read_session_params()
    • added support for BitTorrent v2 (see docs/upgrade_to_2.0.html)
    • create_torrent() pad_file_limit parameter removed
    • create_torrent() merkle- and optimize-alignment flags removed
    • merkle_tree removed from add_torrent_params
    • announce_entry expose information per v1 and v2 info-hash announces
    • torrent_removed_alert, torrent_deleted_alert, torrent_delete_failed_alert: info_hash member is no longer a sha-1 hash, but (deprecated) implicitly convertible to one
    • undeprecate error_file_metadata for torrent errors related to its metadata
    • remove support for adding a torrent under a UUID (used for previous RSS support)
    • remove deprecated feature to add torrents by file:// URL
    • remove deprecated feature to download .torrent file from URL
    • requires boost >= 1.66 to build
    • update networking API to networking TS compatible boost.asio
    • overhauled disk I/O subsystem to use memory mapped files (where available)
    • libtorrent now requires C++14 to build
    • added support for GnuTLS for HTTPS and torrents over SSL
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-2.0.0-RC.tar.gz(3.96 MB)
  • libtorrent_1_2_7(May 31, 2020)

    1.2.7 released

    • add set_alert_fd in python binding, to supersede set_alert_notify
    • fix bug in part files > 2 GiB
    • add function to clear the peer list for a torrent
    • fix resume data functions to save/restore more torrent flags
    • limit number of concurrent HTTP announces
    • fix queue position for force_rechecking a torrent that is not auto-managed
    • improve rate-based choker documentation, and minor tweak
    • undeprecate upnp_ignore_nonrouters (but refering to devices on our subnet)
    • increase default tracker timeout
    • retry failed socks5 server connections
    • allow UPnP lease duration to be changed after device discovery
    • fix IPv6 address change detection on Windows
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-1.2.7.tar.gz(3.91 MB)
  • libtorrent-1_2_6(Apr 19, 2020)

    1.2.6 released

    • fix peer timeout logic
    • simplify proxy handling. A proxy now overrides listen_interfaces
    • fix issues when configured to use a non-default choking algorithm
    • fix issue in reading resume data
    • revert NXDOMAIN change from 1.2.4
    • don't open any listen sockets if listen_interfaces is empty or misconfigured
    • fix bug in auto disk cache size logic
    • fix issue with outgoing_interfaces setting, where bind() would be called twice
    • add build option to disable share-mode
    • support validation of HTTPS trackers
    • deprecate strict super seeding mode
    • make UPnP port-mapping lease duration configurable
    • deprecate the bittyrant choking algorithm
    • add build option to disable streaming
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-1.2.6.tar.gz(3.95 MB)
  • libtorrent-1_2_5(Mar 9, 2020)

    1.2.5 release

    • announce port=1 instead of port=0, when there is no listen port
    • fix LSD over IPv6
    • support TCP_NOTSENT_LOWAT on Linux
    • fix correct interface binding of local service discovery multicast
    • fix issue with knowing which interfaces to announce to trackers and DHT
    • undeprecate settings_pack::dht_upload_rate_limit
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-1.2.5.tar.gz(3.94 MB)
  • libtorrent-1_2_4(Feb 9, 2020)

    Changes since previous release:

    • fix binding TCP and UDP sockets to the same port, when specifying port 0
    • fix announce_to_all_trackers and announce_to_all_tiers behavior
    • fix suggest_read_cache setting
    • back-off tracker hostname looksups resulting in NXDOMAIN
    • lower SOCKS5 UDP keepalive timeout
    • fix external IP voting for multi-homed DHT nodes
    • deprecate broadcast_lsd setting. Just use multicast
    • deprecate upnp_ignore_nonrouters setting
    • don't attempt sending event=stopped if event=start never succeeded
    • make sure &key= stays consistent between different source IPs (as mandated by BEP7)
    • fix binding sockets to outgoing interface
    • add new socks5_alert to trouble shoot SOCKS5 proxies
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-1.2.4.tar.gz(3.96 MB)
  • libtorrent-1_2_3(Dec 19, 2019)

    1.2.3 release

    • fix erroneous event=completed tracker announce when checking files
    • promote errors in parsing listen_interfaces to post listen_failed_alert
    • fix bug in protocol encryption/obfuscation
    • fix buffer overflow in SOCKS5 UDP logic
    • fix issue of rapid calls to file_priority() clobbering each other
    • clear tracker errors on success
    • optimize setting with unlimited unchoke slots
    • fixed restoring of trackers, comment, creation date and created-by in resume data
    • fix handling of torrents with too large pieces
    • fixed division by zero in anti-leech choker
    • fixed bug in torrent_info::swap
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-1.2.3.tar.gz(3.95 MB)
  • libtorrent-1_1_14(Dec 19, 2019)

    1.1.14 release

    • support building with new boost version
    • add handling on invalid piece index to torrent_handle::have_piece()
    • fix error in treatment of move_storage() flags
    • fix division by zero in anti-leech choker
    • fix chunked http header validation
    • fix use-after-free in SSL shutdown
    • fix possible leak entry when assigning from bdecode_node or lazy_entry
    • fix error handling of moving storage to a drive letter that isn't mounted
    • fix bug in python binding parsing file_priorities from add_torrent_params
    • fix target hostname in http connections using http proxy
    Source code(tar.gz)
    Source code(zip)
    libtorrent-rasterbar-1.1.14.tar.gz(3.85 MB)
  • libtorrent-1_2_2(Sep 25, 2019)

    1.2.2 release

    • fix cases where the disable_hash_checks setting was not honored
    • fix updating of is_finished torrent status, when changing piece priorities
    • fix regression in &left= reporting when adding a seeding torrent
    • fix integer overflow in http parser
    • improve sanitation of symlinks, to support more complex link targets
    • add DHT routing table affinity for BEP 42 nodes
    • add torrent_info constructor overloads to control torrent file limits
    • feature to disable DHT, PEX and LSD per torrent
    • fix issue where trackers from magnet links were not included in create_torrent()
    • make peer_info::client a byte array in python binding
    • pick contiguous pieces from peers with high download rate
    • fix error handling of moving storage to a drive letter that isn't mounted
    • fix HTTP Host header when using proxy
    Source code(tar.gz)
    Source code(zip)
    corpus.zip(27.09 MB)
    libtorrent-rasterbar-1.2.2.tar.gz(3.89 MB)
  • libtorrent-1_2_1(May 3, 2019)

    1.2.1 release

    • add dht_pkt_alert and alerts_dropped_alert to python bindings
    • fix python bindins for block_uploaded_alert
    • optimize resolving duplicate filenames in loading torrent files
    • fix python binding of dht_settings
    • tighten up various input validation checks
    • fix create_torrent python binding
    • update symlinks to conform to BEP 47
    • fix python bindings for peer_info
    • support creating symlinks, for torrents with symlinks in them
    • fix error in seed_mode flag
    • support magnet link parameters with number siffixes
    • consistently use "lt" namespace in examples and documentation
    • fix Mingw build to use native cryptoAPI
    • uPnP/NAT-PMP errors no longer set the client's advertised listen port to zero
    Source code(tar.gz)
    Source code(zip)
    corpus.zip(29.34 MB)
    libtorrent-rasterbar-1.2.1.tar.gz(3.85 MB)
  • libtorrent-1_1_13(Apr 27, 2019)

libTorrent BitTorrent library

LibTorrent Copyright (C) 2005-2014, Jari Sundell LICENSE GNU GPL, see COPYING. "libtorrent/src/utils/sha_fast.{cc,h}" is originally from the Mozil

Jari Sundell 837 Aug 5, 2022
Tool for inspecting, creating and editing BitTorrent metafiles.

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

null 104 Aug 4, 2022
Transmission is a fast, easy, and free BitTorrent client.

Official Transmission BitTorrent client repository

Transmission 7.1k Aug 10, 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.7k Aug 8, 2022
Rule Engine (RE) creates an interpretable anomaly classifier from many one-feature and two-feature decision rules

Rule Engine (RE) creates an interpretable anomaly classifier from many one-feature and two-feature decision rules

James Thomas 14 Jul 16, 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
libTorrent BitTorrent library

LibTorrent Copyright (C) 2005-2014, Jari Sundell LICENSE GNU GPL, see COPYING. "libtorrent/src/utils/sha_fast.{cc,h}" is originally from the Mozil

Jari Sundell 837 Aug 5, 2022
Tool for inspecting, creating and editing BitTorrent metafiles.

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

null 104 Aug 4, 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 Aug 7, 2022
Transmission is a fast, easy, and free BitTorrent client.

Official Transmission BitTorrent client repository

Transmission 7.1k Aug 10, 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.7k Aug 8, 2022
hessian2-codec it is a complete C++ implementation of hessian2 spec

hessian2-codec is a C++ library from Alibaba for hessian2 codec. It is a complete C++ implementation of hessian2 spec. Because it was originally intended to implement the Dubbo Filter of Envoy, it did not provide good support for serialization of user-defined types (there is only one way to implement user-defined types using ADL, but it is not very complete and does not support nested types well). At the moment it is simply deserializing content into some C++ intermediate types.

Alibaba 15 Dec 27, 2021
A lightweight but complete ECS implementation for modern C++.

ECS A lightweight but complete ECS implementation for modern C++. Features Cache friendly design implemented on top of an EnTT-like sparse set. Clean,

null 5 Jun 13, 2022
Unofficial third-party implementation of FFD (fast feature detector) published in IEEE TIP 2020.

fast_feature_detector Unofficial third-party implementation of FFD (fast feature detector) published in IEEE TIP 2020. Caution I have not got any perm

kamino410 12 Feb 17, 2022
Implementation of Sift feature detection and matching in C + +

Sift-In-CPP This is SIFT feature detection and matching implemented in C + + Environment version information: VS2017、Opencv3.4.3 Reference link: 1.htt

null 1 Nov 19, 2021
In DFS-BFS Implementation In One Program Using Switch Case I am Using an Simple And Efficient Code of DFS-BFS Implementation.

DFS-BFS Implementation-In-One-Program-Using-Switch-Case-in-C Keywords : Depth First Search(DFS), Breadth First Search(BFS) In Depth First Search(DFS),

Rudra_deep 1 Nov 17, 2021
LineaMeteoStazione is a complete weather station

LineaMeteoStazione is a complete weather station which can be interfaced with professional sensors from Sensirion as well as some Davis Instrument component (Rain Gauge, Anemometer) The project is aimed as DIY weather station but just requiring the assembly part, because the boards will already be given programmed by me as well as the complete PCB. The code will be shared Opensource for the people who wants to try to do it from the beginning or modify it!

Eugenio 14 Aug 18, 2021
SIDKick -- the first complete SID 6581/8580-drop-in-replacement that you can build yourself

.- the first complete SID-drop-in-replacement that you can build yourself -. SIDKick is a drop-in replacement for the SID sound chips used in C64s and

null 83 Aug 2, 2022
D2DX is a complete solution to make Diablo II run well on modern PCs.

D2DX D2DX is a preservation project for running classic Diablo II/LoD on modern PCs. Version 0.99.403b Mission statement Turn the game into a well beh

null 220 Aug 3, 2022
A curated list of awesome things built with the JSON processor and turing-complete functional language jq.

A curated list of awesome things built with the JSON processor and turing-complete functional language jq.

fiatjaf 528 Aug 1, 2022
Complete roadmap for your placement or intern preparation!

?? Placement-Preparation- Complete Roadmap ?? This repository consists of all the necessary Resources,questions and their solutions required for crack

Sumit Ojha 268 Aug 11, 2022
Complete introduction to size balanced trees (O(1) amortized complexity)

Size Balanced Tree A size balanced tree (SBT) is a self-balancing binary search tree (SBBST) rebalanced by examining the sizes of each node's subtrees

Jishan Shaikh 18 Jun 2, 2022
sour is a complete multiplayer Sauerbraten experience in the web delivered as a single Docker image.

sour sour is a complete multiplayer Sauerbraten experience in the web delivered as a single Docker image. Overview I have always loved playing Sauerbr

Caleb Foust 45 Jul 28, 2022
To simplify the development of ESP32 in ESP-IDF, Easyio provides a complete driver library

Easyio 开源驱动库 Easyio 是一款适配于ESP-IDF框架的开源驱动库,以支持ESP32的简便开发。目的是简化乐鑫ESP-IDF开发框架的使用难度。(真要方便的话,有现成的Arduino和Platform可以用,不过实在迫于工作要求,有的开源东西不让用,同时便于对接FAE,于是就有了 E

null 174 Aug 6, 2022
A complete unit testing framework in a header

liblittletest A complete unit testing framework in a header liblittletest is an easy to use all-in-an-header testing framework; all you have to do in

Sebastiano Merlino 13 Nov 11, 2021
Writing a basic compiler frontend following LLVM's tutorial, with complete added supports Hindi and UTF-8 in general

सारस | SARAS Started with following LLVM's tutorial In development, a hobby project only JIT is broken right now, 'jit' branch par code hai uska Compi

Aditya Gupta 4 May 1, 2022