arvid | 29 Oct 19:17 2014
Picon
Picon

RFC: resume_data and add_torrent_params flags

A recent bug report pointed out that flag_use_resume_save_path had 
inverse semantics of what was intended and documented. This made me take 
a look at other flags, and it turns out how these flags interacts with 
resume data currently is a bit of a mess.

The fundamental cause is that the resume data has been extended over the 
years to not just contain which parts of the files and timestamps has 
been downloaded already. The resume data now also include added_time, 
completed_time, total uploaded/downloaded bytes etc. i.e. it has 
statistics in it, unrelated to the files on disk. It also contains 
states like paused, auto-managed, upload-mode, seed-mode etc.

These states can also be set via the flags in add_torrent_params as well 
as the resume data. When they conflict, unintuitive things happen 
(essentially save_path is taken from add_torrent_params by default, 
everything else is taken from the resume data by default).

Paused and auto-managed are considered so important to be able to 
control that they can explicitly override the resume data (with 
flag_override_resume_data), and recently the save_path could also be 
explicitly taken from the resume data.

There’s also a bug right now, when setting flag_seed_mode, the resume 
data is not used at all (because historically it was only specifying 
which parts of which files we had, and in seed mode we just assume we 
have everything). The problem with this is that states like paused, 
auto-managed, total-uploaded, time_complete etc. are thrown away.

In my mind, the long term solution to making this intuitive would be to 
separate out parsing the states out of the resume data and produce an 
(Continue reading)

Andrey Shigotarov | 23 Oct 21:39 2014

Question about flag_use_resume_save_path

Hello
One question about usage of flag_use_resume_save_path, please.
I've found, that if this flag is not set, then libtorrent uses the
save_path from fast_resume instead of the one, specified in
add_torrent_params. Please see, for example, torrent.cpp, line 1496.
        if (*!m_use_resume_save_path* && m_resume_entry.type() ==
lazy_entry::dict_t)
        {
            std::string p =
m_resume_entry.dict_find_string_value("save_path");
            if (!p.empty()) m_save_path = p;
        }
It seems that this behavior contradicts to documentation (if this flag is
set, the save path from the resume data file, if present, is honored). So
how to use this flag?
I'm using libtorrent 1.0.0.

Thanks
------------------------------------------------------------------------------
Angel Leon | 23 Oct 19:47 2014
Picon

DHT API usage question.

I've been holding out about a week to ask this question about the DHT usage
but I just can't see a way to solve my issue anymore.

Initially I thought the libtorrent dht's api would in essence allow me to
interact with it as a classic key->value store

dht.put(key, value);
value = dht.get(key)

dht.mutablePut(key, value, ed25519_public_key, ed25519_private_key)
signedValue = dht.get(key)

but once you use it, you realize it's more like:

dht.put(value) -> key out of the hashed value

dht.mutablePut(value, ed25519_public_key, ed25519_private_key) -> key

my problem is a system I was designing around a Distributed Key->Value
store highly depends on users being able to pre-calculate the value of the
key.

For instance, they could try and perform a get on a value that's mutable
previously saved on the DHT by a trusted entity which previously gave me
his public key to I could verify any signed content.

What I wanted to do for other clients was to have a protocol to create the
keys,
for example

(Continue reading)

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
constructor.

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?
Suggestions:
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
Picon

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 github.com is ready for you guys
to just create an official fork.

https://github.com/gubatron/libtorrent

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

Best,
Angel
--- 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());
 </pre>
-<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
Picon
Picon

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:

    
http://sourceforge.net/projects/libtorrent/files/libtorrent/libtorrent-rasterbar-0.16.18.tar.gz/download

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 
rates
* 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 
replace_trackers
   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
Picon

Building simple_client example

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

#define WIN32 1
#define BOOST_ASIO_SEPARATE_COMPILATION 1
#define TORRENT_USE_IPV6 1
#define NDEBUG 1
#define TORRENT_NO_DEPRECATE 1
#define TORRENT_DISABLE_GEO_IP 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
Picon

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.

-Jeff
------------------------------------------------------------------------------
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
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
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-libdir=/usr/lib/x86_64-linux-gnu/
LDFLAGS="-L/usr/lib/python3.4/config-3.4m-x86_64-linux-gnu/"
--with-boost-python=boost_python-py34 --prefix=/pyenvs/p3
--with-boost-random=libboost_random

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

import libtorrent
ImportError: /usr/lib/x86_64-linux-gnu/libtorrent-rasterbar.so.9:
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:
http://stackoverflow.com/questions/26265329/libtorrent-boost-undefined-symbol-zn5boost6random13random-deviced1ev

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

reit | 1 Oct 10:29 2014
Picon

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 
feed.

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
Picon

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
cirkator

------------------------------------------------------------------------------
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
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk

Gmane