sledgehammer999 | 16 Oct 21:05 2014

Loading a big torrent fails.

A user of qBittorrent pointed me to a torrent that when trying to load it
qBittorrent fails with "metadata too large".

qBittorrent uses the constructor of torrent_info that takes a filepath. I
was under the impression that this constructor used lazy_bdecode under the
hood. Therefore I assumed that the particular torrent reached the default
limits of lazy_bdecode(eg depth limit).
However, upon investigating the source the constructor calls a function
named "load_file()". This function imposes a default limit of 8000000
bytes. There are some problems with this.
1. This limit isn't documented.
2. This limit contradicts the limit imposed by the default values of
lazy_bdecode(). I am refering to the docs saying "the limits are equivalent
to a 25MB torrent file."
3. There is no way to affect this limit if you want to use that particular

So now my only option is to create a custom function that will load the
file into a buffer and create a lazy_entry, and use the corresponding
torrent_info constructor.
I also observed that torrent_info::load_file() is a public but undocumented
function in 0.16.x while in 1.0.x it is private. So I can't use it anyway.

Do you have any other idea on how to overcome this?
1. How about removing the default limit of load_file() and leave it either
to the library user to filter out big files or to the lazy_bdecode() limits?
2. How about overriding these limits via extra constructor parameters? (for
both the filesize and the lazy entry limits)

(Continue reading)

Angel Leon | 16 Oct 13:35 2014

patch: docs/reference-Session.html (dht_put_item)

I think there's an important typo on the mutable `Session::dht_put_item`
documentation. (the dht_put_item function that takes a key and signature is
meant for mutable puts, right?)

Is this the way to collaborate with the project? (sending .diff files?)

It'd be awesome if we could collaborate via git/github.

A synced repo with all the svn history on is ready for you guys
to just create an official fork.

Would be so much better to collaborate and grow this wonderful project.

--- docs/reference-Session.html	2014-09-04 21:59:48.000000000 -0400
+++ docs/reference-Session.fixed.html	2014-10-16 07:22:40.000000000 -0400
 <at>  <at>  -1063,7 +1063,7  <at>  <at> 
       , boost::uint64_t&amp;, std::string const&amp;)&gt; cb
       , std::string salt = std::string());
-<p>store an immutable item. The <tt class="docutils literal">key</tt> is the public key the blob is
+<p>store a mutable item. The <tt class="docutils literal">key</tt> is the public key the blob is
 to be stored under. The optional <tt class="docutils literal">salt</tt> argument is a string that
 is to be mixed in with the key when determining where in the DHT
 the value is to be stored. The callback function is called from within
(Continue reading)

arvid | 16 Oct 08:07 2014

libtorrent 0.16.18 released

This is a maintenance release of the previous major version of 
libtorrent. It is not the latest version.
The tarball can be found here:

Changes since the previous 0.16.x release:

* fix uninitialized values in DHT DOS mitigation
* fix error handling in file::phys_offset
* fix bug in HTTP scrape response parsing
* enable TCP keepalive for socks5 connection for UDP associate
* fix python3 support
* fix bug in lt_donthave extension
* expose i2p_alert to python. cleaning up of i2p connection code
* fixed overflow and download performance issue when downloading at high 
* fixed bug in add_torrent_alert::message for magnet links
* disable optimistic disconnects when connection limit is low
* improved error handling of session::listen_on
* suppress initial 'completed' announce to trackers added with 
   after becoming a seed
* SOCKS4 fix for trying to connect over IPv6
* fix saving resume data when removing all trackers
* fix bug in udp_socket when changing socks5 proxy quickly


Arvid Norberg
(Continue reading)

Bedeho Mender | 10 Oct 14:20 2014

Building simple_client example

I am trying to build a reduced version of the simple_client example

#define WIN32 1
#define TORRENT_USE_IPV6 1
#define NDEBUG 1

#include <stdlib.h>
#include <libtorrent/entry.hpp>
#include <libtorrent/bencode.hpp>
#include <libtorrent/session.hpp>

int main(int argc, char* argv[])
return 0;

The configuration options are the same as those used during building,
however, when compiling with msvc10, I get linker errors

1>main.obj : error LNK2001: unresolved external symbol "unsigned long
__cdecl boost::asio::detail::win_tss_ptr_create(void)"
(?win_tss_ptr_create <at> detail <at> asio <at> boost <at>  <at> YAKXZ)
1>main.obj : error LNK2001: unresolved external symbol "protected: static
void __cdecl boost::asio::detail::winsock_init_base::throw_on_error(struct
boost::asio::detail::winsock_init_base::data &)"
(?throw_on_error <at> winsock_init_base <at> detail <at> asio <at> boost <at>  <at> KAXAAUdata <at> 1234 <at>  <at> Z)
1>main.obj : error LNK2001: unresolved external symbol "protected: static
(Continue reading)

Jeff Waller | 9 Oct 21:43 2014

Piece Picker API?

The default piece picker is rarest first unless set to sequential, but I didn’t find a call to set the 
strategy directly.  There’s some documentation about the effect of priority 0 setting the 
likelihood of picking a piece to 0, but I didn’t find a call to set the priority of each piece.

There may such a thing already, but I’d like to set the piece priority in such a way that assumes
that 2 or more co-peers always exist (this can be a pre-configured thing) and the price priority
(especially at first) is set so that the likelihood of each of these co-peers picking the same piece
is very low.

Then at some point (40%? assuming 2 co-peers) I’d like to set it back to rarest first.

Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
Sergey Pashinin | 9 Oct 05:12 2014

Installing libtorrent from source

Hello, I want to install libtorrent on Ubuntu and have Python bindings
in my VirtuelEnv with Python 3.4.

It is simple if I didn't use a virtual env (just install a system
package for either 2 or 3 python). But I need it in a py3.4 VE.
So I'm installing from source. Is there a better way? I didn't find
anything like for "pip ..."

Now a command:

./configure --enable-python-binding
--with-boost-python=boost_python-py34 --prefix=/pyenvs/p3

I can even compile it and "make install". But have this:

import libtorrent
ImportError: /usr/lib/x86_64-linux-gnu/
undefined symbol: _ZN5boost6random13random_deviceD1Ev

Ubuntu 14.04, tried 2 versions of libboost that are in system repos.
Don't know how to fix this. Pls help.

Question is also here:

Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
(Continue reading)

reit | 1 Oct 10:29 2014

RSS over DHT

Since we now have the capacity to put mutable values using DHT store, it 
should now be possible to build fully decentralized update mechanisms, 
and a decentralized RSS sounds like the most straightforward first 
option. A possible implementation would allow the user to paste in a 
public key rather than an HTTP url into the RSS feed reader:

- If such a public key is entered, system attempts to mutable get the 
value stored at that address
- This value (an info-hash) is added as an unlisted torrent and started
- Upon completion, pass RSS feed contained within that torrent through 
the existing RSS pipeline
- Continue checking key at standard intervals, if updated version is 
found remove old version and begin process again with new version

The RSS torrent would continue to be seeded in the background, which I 
think would be acceptable to the user given the small file size of a 

This would be the approach to bake the functionality into a client, but 
we can also go one step further. Having implemented the above, we could 
proceed to package it into a self-contained program capable of 
interoperating with ANY existing client, without modification:

- Simple webserver is started, begins monitoring for requests on some 
custom port
- When a request is received (of the form 
http://localhost:12345/[public-key].rss), parse out the public key and 
add that internally as a feed to monitor
- Next time that feed is requested, return associated RSS file

(Continue reading)

Stefan | 30 Sep 13:55 2014

Enable DHT with Proxy, anonymous?

Hi, I have read on different forums that since Deluge uses Rasterbars
lib, it *should* be secure to enable DHT with a proxy. Apparently the
connection in Rasterbars lib is encrypted, even when i enable DHT.

Is that true? Am I staying anonymous when i force the proxy and enable DHT?
Can I enable LSD and peer exchange aswell?

Looking for some clarification from the dev here : )

Thanks in advance

Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
Jing Vergara | 29 Sep 19:56 2014

SSL torrents with HTTPS tracker


Has anyone successfully used SSL torrents with an HTTPS tracker?

I've setup an HTTPS tracker and the openssl s_client test works
successfully with it. However, the libtorrent client_test fails when the
tracker sends back the announcement response.

Here's the announcement response from the HTTPS tracker (from the SSL debug

Padded plaintext before ENCRYPTION: len = 96
0000: 32 94 3E AC 79 4A C7 6E B6 45 ED 01 E9 AB B8 BA 2.>.yJ.n.E......
0010: 64 38 3A 63 6F 6D 70 6C 65 74 65 69 30 65 31 30 d8:completei0e10
0020: 3A 69 6E 63 6F 6D 70 6C 65 74 65 69 31 65 38 3A :incompletei1e8:
0030: 69 6E 74 65 72 76 61 6C 69 31 30 65 35 3A 70 65 intervali10e5:pe
0040: 65 72 73 30 3A 65 35 A3 40 21 A9 E7 22 31 21 3F ers0:e5. <at> !.."1!?
0050: 80 A6 83 76 02 6C 3F 8B E2 37 05 05 05 05 05 05 ...v.l?..7......
Dispatcher: Thread-23, WRITE: TLSv1.1 Application Data, length = 54
[Raw write (bb)]: length = 101
0000: 17 03 02 00 60 E7 91 7F FC 04 F8 9A EB BA 84 E1 ....`...........
0010: 72 0D CC 14 F4 73 AC 1B 67 F8 39 90 30 BD 3A 8D r....s..g.9.0.:.
0020: 5F 63 4B 2F 03 AF 4B 6C 53 62 CF 9D B0 40 1F 46 _cK/..KlSb... <at> .F
0030: 2F F0 70 8E 8B 8C B6 82 BB BC 24 E5 C2 35 78 51 /.p.......$..5xQ
0040: 61 E6 76 A0 54 91 9D D6 3C 94 5F 38 B2 9D 18 99 a.v.T...<._8....
0050: CC 50 E3 03 EA 35 25 CA AA 3D 6B F8 06 10 6A 9F .P...5%..=k...j.
0060: F4 68 90 8D 82 .h...

Here's the log from BitTorrent's client_test:

(Continue reading)

Bedeho Mender | 29 Sep 11:34 2014

Fwd: Building libtorrent on Windows

-Forgot to hit reply to all

---------- Forwarded message ----------
From: Bedeho Mender <bedeho.mender <at>>
Date: 29 September 2014 11:33
Subject: Re: [libtorrent] Building libtorrent on Windows
To: arvid <arvid <at>>


thanks for the amazing support, I downloaded the new version, and the error
went away!

However, I got a new error

error: Unable to find file or target named
error:     '/boost/chrono//boost_chrono'
error: referred from project at
error:     '.'

Some boost wizards informed me that I likely missed chrono, since I was
using version 1.36, however
your docs mention 1.34 as a cutoff version. Am I doing something wrong, or
are the docs dated on this point?


On 28 September 2014 22:01, arvid <arvid <at>> wrote:

(Continue reading)

Bedeho Mender | 27 Sep 15:27 2014

Building libtorrent on Windows


I am trying to build libtorrent on Win 7 64bit using Microsoft Visual
Studios 2010 (msvc10.0). I am following the building with BBv2 steps, and I
get to the step where I run

bjam msvc-10.0 link=static runtime-link=static boost=source

but the compiling and linking ends with this output which indicates that
the final lib file was not built.

...failed compile-c-c++
reading-multi>libtorrent.lib for lack of
...failed updating 1 target...
...skipped 1 target...

Sorry to have to post this given how great the docs are on building, but I
am not sure where to go next at this point.

 Bedeho Mender
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
(Continue reading)