merged back encryption branch to trunk
This commit is contained in:
@@ -206,6 +206,24 @@ logging of the DHT protocol traffic.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td><tt class="docutils literal"><span class="pre">zlib</span></tt></td>
|
||||
<td><ul class="first last simple">
|
||||
<li><tt class="docutils literal"><span class="pre">system</span></tt> - links against the zlib supplied
|
||||
with your operating system.</li>
|
||||
<li><tt class="docutils literal"><span class="pre">shipped</span></tt> - links against the zlib bundled
|
||||
with the libtorrent package.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td><tt class="docutils literal"><span class="pre">pe-support</span></tt></td>
|
||||
<td><ul class="first last simple">
|
||||
<li><tt class="docutils literal"><span class="pre">on</span></tt> - turns on support for encrypted
|
||||
connections. requires openssl (libcrypto)</li>
|
||||
<li><tt class="docutils literal"><span class="pre">off</span></tt> - turns off support for encrypted
|
||||
connections. openssl is not linked in.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td><tt class="docutils literal"><span class="pre">link</span></tt></td>
|
||||
<td><ul class="first last simple">
|
||||
<li><tt class="docutils literal"><span class="pre">static</span></tt> - builds libtorrent as a static
|
||||
@@ -273,7 +291,8 @@ boost.program-options symbols.</p>
|
||||
sure all build variants will actually compile), you can invoke this command:</p>
|
||||
<pre class="literal-block">
|
||||
bjam debug release link=shared link=static logging=verbose logging=default \
|
||||
logging=none dht-support=on dht-support=logging dht-support=off
|
||||
logging=none dht-support=on dht-support=logging dht-support=off pe-support=on \
|
||||
pe-support=off zlib=shipped zlib=system
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -208,6 +208,16 @@ Build features:
|
||||
| | logging of the DHT protocol traffic. |
|
||||
| | * ``off`` - build without DHT support. |
|
||||
+------------------------+----------------------------------------------------+
|
||||
| ``zlib`` | * ``system`` - links against the zlib supplied |
|
||||
| | with your operating system. |
|
||||
| | * ``shipped`` - links against the zlib bundled |
|
||||
| | with the libtorrent package. |
|
||||
+------------------------+----------------------------------------------------+
|
||||
| ``pe-support`` | * ``on`` - turns on support for encrypted |
|
||||
| | connections. requires openssl (libcrypto) |
|
||||
| | * ``off`` - turns off support for encrypted |
|
||||
| | connections. openssl is not linked in. |
|
||||
+------------------------+----------------------------------------------------+
|
||||
| ``link`` | * ``static`` - builds libtorrent as a static |
|
||||
| | library (.a / .lib) |
|
||||
| | * ``shared`` - builds libtorrent as a shared |
|
||||
@@ -261,7 +271,9 @@ To build all possible variants of libtorrent (good for testing when making
|
||||
sure all build variants will actually compile), you can invoke this command::
|
||||
|
||||
bjam debug release link=shared link=static logging=verbose logging=default \
|
||||
logging=none dht-support=on dht-support=logging dht-support=off
|
||||
logging=none dht-support=on dht-support=logging dht-support=off pe-support=on \
|
||||
pe-support=off zlib=shipped zlib=system openssl=on openssl=off \
|
||||
character-set=ansi character-set=unicode
|
||||
|
||||
building with autotools
|
||||
-----------------------
|
||||
@@ -472,6 +484,12 @@ defines you can use to control the build.
|
||||
| ``TORRENT_DHT_VERBOSE_LOGGING`` | This will enable verbose logging of the DHT |
|
||||
| | protocol traffic. |
|
||||
+---------------------------------+-------------------------------------------------+
|
||||
| ``TORRENT_DISABLE_ENCRYPTION`` | This will disable any encryption support and |
|
||||
| | the openssl dependency that comes with it. |
|
||||
| | Encryption support is the peer connection |
|
||||
| | encrypted supported by clients such as |
|
||||
| | uTorrent, Azureus and KTorrent. |
|
||||
+---------------------------------+-------------------------------------------------+
|
||||
|
||||
|
||||
If you experience that libtorrent uses unreasonable amounts of cpu, it will
|
||||
|
@@ -19,11 +19,11 @@
|
||||
<td>Arvid Norberg, <a class="last reference" href="mailto:arvid@rasterbar.com">arvid@rasterbar.com</a></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="section" id="mainline-dht-extensions">
|
||||
<h1>Mainline DHT extensions</h1>
|
||||
<div class="section">
|
||||
<h1><a id="mainline-dht-extensions" name="mainline-dht-extensions">Mainline DHT extensions</a></h1>
|
||||
<p>libtorrent implements a few extensions to the Mainline DHT protocol.</p>
|
||||
<div class="section" id="client-identification">
|
||||
<h2>client identification</h2>
|
||||
<div class="section">
|
||||
<h2><a id="client-identification" name="client-identification">client identification</a></h2>
|
||||
<p>In each DHT packet, an extra key is inserted named "v". This is a string
|
||||
describing the client and version used. This can help alot when debugging
|
||||
and finding errors in client implementations. The string is encoded as four
|
||||
@@ -51,8 +51,8 @@ as a binary number describing the client version.</p>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="section" id="ipv6-support">
|
||||
<h2>IPv6 support</h2>
|
||||
<div class="section">
|
||||
<h2><a id="ipv6-support" name="ipv6-support">IPv6 support</a></h2>
|
||||
<p>The DHT messages that don't support IPv6 are the <tt class="docutils literal"><span class="pre">nodes</span></tt> replies.
|
||||
They encode all the contacts as 6 bytes packed together in sequence in a
|
||||
string. The problem is that IPv6 endpoints cannot be encoded as 6 bytes, but
|
||||
|
@@ -20,16 +20,16 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="contents topic" id="table-of-contents">
|
||||
<p class="topic-title first">Table of contents</p>
|
||||
<p class="topic-title first"><a name="table-of-contents">Table of contents</a></p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference" href="#introduction" id="id4">introduction</a></li>
|
||||
<li><a class="reference" href="#features" id="id5">features</a></li>
|
||||
<li><a class="reference" href="#portability" id="id6">portability</a></li>
|
||||
<li><a class="reference" href="#license" id="id7">license</a></li>
|
||||
<li><a class="reference" href="#introduction" id="id6" name="id6">introduction</a></li>
|
||||
<li><a class="reference" href="#features" id="id7" name="id7">features</a></li>
|
||||
<li><a class="reference" href="#portability" id="id8" name="id8">portability</a></li>
|
||||
<li><a class="reference" href="#license" id="id9" name="id9">license</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="introduction">
|
||||
<h1>introduction</h1>
|
||||
<div class="section">
|
||||
<h1><a id="introduction" name="introduction">introduction</a></h1>
|
||||
<p>libtorrent is a C++ library that aims to be a good alternative to all the
|
||||
other bittorrent implementations around. It is a
|
||||
library and not a full featured client, although it comes with a working
|
||||
@@ -41,8 +41,8 @@ example client.</p>
|
||||
<li>to be very easy to use</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="features">
|
||||
<h1>features</h1>
|
||||
<div class="section">
|
||||
<h1><a id="features" name="features">features</a></h1>
|
||||
<p>libtorrent is still being developed, however it is stable. It is an ongoing
|
||||
project (including this documentation). The current state includes the
|
||||
following features:</p>
|
||||
@@ -67,7 +67,7 @@ as well as all local peers in a separate fast-resume file.</li>
|
||||
This means it can download parts of the same piece from different peers.
|
||||
It will also prefer to download whole pieces from single peers if the
|
||||
download speed is high enough from that particular peer.</li>
|
||||
<li>supports the <a class="reference" href="udp_tracker_protocol.html">udp-tracker protocol</a> by Olaf van der Spek.</li>
|
||||
<li>supports the <a class="reference" href="extension_protocol.html">udp-tracker protocol</a> by Olaf van der Spek.</li>
|
||||
<li>queues torrents for file check, instead of checking all of them in parallel.</li>
|
||||
<li>supports http proxies and basic proxy authentication</li>
|
||||
<li>gzipped tracker-responses</li>
|
||||
@@ -76,7 +76,7 @@ unchoked peers</li>
|
||||
<li>implements fair trade. User settable trade-ratio, must at least be 1:1,
|
||||
but one can choose to trade 1 for 2 or any other ratio that isn't unfair
|
||||
to the other party.</li>
|
||||
<li>supports an <a class="reference" href="extension_protocol.html">extension protocol</a>. See <a class="reference" href="manual.html#extensions">extensions</a>.</li>
|
||||
<li>supports an <a class="reference" href="udp_tracker_protocol.html">extension protocol</a>. See <a class="reference" href="manual.html#extensions">extensions</a>.</li>
|
||||
<li>supports the <tt class="docutils literal"><span class="pre">no_peer_id=1</span></tt> extension that will ease the load off trackers.</li>
|
||||
<li>possibility to limit the number of connections.</li>
|
||||
<li>delays have messages if there's no other outgoing traffic to the peer, and
|
||||
@@ -91,8 +91,8 @@ want to download.</li>
|
||||
being connected</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="portability">
|
||||
<h1>portability</h1>
|
||||
<div class="section">
|
||||
<h1><a id="portability" name="portability">portability</a></h1>
|
||||
<p>libtorrent is portable at least among Windows, MacOS X and other UNIX-systems.
|
||||
It uses Boost.Thread, Boost.Filesystem, Boost.Date_time and various other
|
||||
boost libraries as well as <a class="reference" href="http://www.zlib.org">zlib</a> (shipped) and <a class="reference" href="http://asio.sf.net">asio</a> (shipped). At least version
|
||||
@@ -114,8 +114,8 @@ epoll on linux and kqueue on MacOS X and BSD.</p>
|
||||
<li>msvc6</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="license">
|
||||
<h1>license</h1>
|
||||
<div class="section">
|
||||
<h1><a id="license" name="license">license</a></h1>
|
||||
<p>libtorrent is released under the <a class="reference" href="http://www.opensource.org/licenses/bsd-license.php">BSD-license</a>.</p>
|
||||
<p>This means that you can use the library in your project without having to
|
||||
release its source code. The only requirement is that you give credit
|
||||
|
836
docs/manual.html
836
docs/manual.html
File diff suppressed because it is too large
Load Diff
@@ -92,8 +92,8 @@ The ``session`` class has the following synopsis::
|
||||
torrent_handle find_torrent(sha_hash const& ih);
|
||||
std::vector<torrent_handle> get_torrents() const;
|
||||
|
||||
void set_settings(
|
||||
session_settings const& settings);
|
||||
void set_settings(session_settings const& settings);
|
||||
void set_pe_settings(pe_settings const& settings);
|
||||
|
||||
void set_upload_rate_limit(int bytes_per_second);
|
||||
int upload_rate_limit() const;
|
||||
@@ -250,9 +250,9 @@ about the torrent's progress, its peers etc. It is also used to abort a torrent.
|
||||
The second overload that takes a tracker url and an info-hash instead of metadata
|
||||
(``torrent_info``) can be used with torrents where (at least some) peers support
|
||||
the metadata extension. For the overload to be available, libtorrent must be built
|
||||
with extensions enabled (``TORRENT_ENABLE_EXTENSIONS`` defined). It also takes an
|
||||
optional ``name`` argument. This may be 0 in case no name should be assigned to the
|
||||
torrent. In case it's not 0, the name is used for the torrent as long as it doesn't
|
||||
with extensions enabled (``TORRENT_DISABLE_EXTENSIONS`` must not be defined). It also
|
||||
takes an optional ``name`` argument. This may be 0 in case no name should be assigned
|
||||
to the torrent. In case it's not 0, the name is used for the torrent as long as it doesn't
|
||||
have metadata. See ``torrent_handle::name``.
|
||||
|
||||
remove_torrent() find_torrent() get_torrents()
|
||||
@@ -515,6 +515,19 @@ e.g.
|
||||
|
||||
.. _`libtorrent plugins`: libtorrent_plugins.html
|
||||
|
||||
set_settings() set_pe_settings()
|
||||
--------------------------------
|
||||
|
||||
::
|
||||
|
||||
void set_settings(session_settings const& settings);
|
||||
void set_pe_settings(pe_settings const& settings);
|
||||
|
||||
Sets the session settings and the packet encryption settings respectively.
|
||||
See session_settings_ and pe_settings_ for more information on available
|
||||
options.
|
||||
|
||||
|
||||
set_peer_proxy() set_web_seed_proxy() set_tracker_proxy() set_dht_proxy()
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
@@ -556,6 +569,7 @@ These functions returns references to their respective current settings.
|
||||
|
||||
The ``dht_proxy`` is not available when DHT is disabled.
|
||||
|
||||
|
||||
start_dht() stop_dht() set_dht_settings() dht_state()
|
||||
-----------------------------------------------------
|
||||
|
||||
@@ -2310,6 +2324,66 @@ Default is 10 minutes
|
||||
all trackers in its tracker list has failed. Either by an explicit error
|
||||
message or a time out.
|
||||
|
||||
pe_settings
|
||||
===========
|
||||
|
||||
The ``pe_settings`` structure is used to control the settings related
|
||||
to peer protocol encryption::
|
||||
|
||||
struct pe_settings
|
||||
{
|
||||
pe_settings();
|
||||
|
||||
enum enc_policy
|
||||
{
|
||||
forced,
|
||||
enabled,
|
||||
disabled
|
||||
};
|
||||
|
||||
enum enc_level
|
||||
{
|
||||
plaintext,
|
||||
rc4,
|
||||
both
|
||||
};
|
||||
|
||||
enc_policy out_enc_policy;
|
||||
enc_policy in_enc_policy;
|
||||
enc_level allowed_enc_level;
|
||||
bool prefer_rc4;
|
||||
};
|
||||
|
||||
|
||||
``in_enc_policy`` and ``out_enc_policy`` control the settings for incoming
|
||||
and outgoing connections respectively. The settings for these are:
|
||||
|
||||
* ``forced`` - Only encrypted connections are allowed. Incoming connections
|
||||
that are not encrypted are closed and if the encrypted outgoing connection
|
||||
fails, a non-encrypted retry will not be made.
|
||||
|
||||
* ``enabled`` - encrypted connections are enabled, but non-encrypted
|
||||
connections are allowed. An incoming non-encrypted connection will
|
||||
be accepted, and if an outgoing encrypted connection fails, a non-
|
||||
encrypted connection will be tried.
|
||||
|
||||
* ``disabled`` - only non-encrypted connections are allowed.
|
||||
|
||||
``allowed_enc_level`` determines the encryption level of the
|
||||
connections. This setting will adjust which encryption scheme is
|
||||
offered to the other peer, as well as which encryption scheme is
|
||||
selected by the client. The settings are:
|
||||
|
||||
* ``plaintext`` - only the handshake is encrypted, the bulk of the traffic
|
||||
remains unchanged.
|
||||
|
||||
* ``rc4`` - the entire stream is encrypted with RC4
|
||||
|
||||
* ``both`` - both RC4 and plaintext connections are allowed.
|
||||
|
||||
``prefer_rc4`` can be set to true if you want to prefer the RC4 encrypted stream.
|
||||
|
||||
|
||||
proxy_settings
|
||||
==============
|
||||
|
||||
|
Reference in New Issue
Block a user