added a plugin 'smart_ban' that can ban peers sending bad data with higher accuracy

This commit is contained in:
Arvid Norberg
2007-12-18 06:04:54 +00:00
parent 456f8f8677
commit 9aa2ddec80
11 changed files with 447 additions and 22 deletions

View File

@@ -712,18 +712,37 @@ object that is called with a <tt class="docutils literal"><span class="pre">torr
<dd>Allows peers to download the metadata (.torren files) from the swarm
directly. Makes it possible to join a swarm with just a tracker and
info-hash.</dd>
</dl>
<pre class="literal-block">
#include &lt;libtorrent/extensions/metadata_transfer.hpp&gt;
ses.add_extension(&amp;libtorrent::create_metadata_plugin);
</pre>
<dl class="docutils">
<dt>uTorrent metadata</dt>
<dd>Same as <tt class="docutils literal"><span class="pre">metadata</span> <span class="pre">extension</span></tt> but compatible with uTorrent.</dd>
</dl>
<pre class="literal-block">
#include &lt;libtorrent/extensions/ut_metadata.hpp&gt;
ses.add_extension(&amp;libtorrent::create_ut_metadata_plugin);
</pre>
<dl class="docutils">
<dt>uTorrent peer exchange</dt>
<dd>Exchanges peers between clients.</dd>
</dl>
<p>To use these, imclude <tt class="docutils literal"><span class="pre">&lt;libtorrent/extensions/metadata_transfer.hpp&gt;</span></tt>
or <tt class="docutils literal"><span class="pre">&lt;libtorrent/extensions/ut_pex.hpp&gt;</span></tt>. The functions to pass in to
<tt class="docutils literal"><span class="pre">add_extension()</span></tt> are <tt class="docutils literal"><span class="pre">libtorrent::create_metadata_plugin</span></tt> and
<tt class="docutils literal"><span class="pre">libtorrent::create_ut_pex_plugin</span></tt> respectively.</p>
<p>e.g.</p>
<pre class="literal-block">
ses.add_extension(&amp;libtorrent::create_metadata_plugin);
#include &lt;libtorrent/extensions/ut_pex.hpp&gt;
ses.add_extension(&amp;libtorrent::create_ut_pex_plugin);
</pre>
<dl class="docutils">
<dt>smart ban plugin</dt>
<dd>A plugin that, with a small overhead, can ban peers
that sends bad data with very high accuracy. Should
eliminate most problems on poisoned torrents.</dd>
</dl>
<pre class="literal-block">
#include &lt;libtorrent/extensions/smart_ban.hpp&gt;
ses.add_extension(&amp;libtorrent::create_smart_ban_plugin);
</pre>
</div>
<div class="section">
<h2><a id="set-settings-set-pe-settings" name="set-settings-set-pe-settings">set_settings() set_pe_settings()</a></h2>

View File

@@ -565,21 +565,38 @@ metadata extension
directly. Makes it possible to join a swarm with just a tracker and
info-hash.
uTorrent peer exchange
Exchanges peers between clients.
::
To use these, imclude ``<libtorrent/extensions/metadata_transfer.hpp>``
or ``<libtorrent/extensions/ut_pex.hpp>``. The functions to pass in to
``add_extension()`` are ``libtorrent::create_metadata_plugin`` and
``libtorrent::create_ut_pex_plugin`` respectively.
#include <libtorrent/extensions/metadata_transfer.hpp>
ses.add_extension(&libtorrent::create_metadata_plugin);
e.g.
uTorrent metadata
Same as ``metadata extension`` but compatible with uTorrent.
::
ses.add_extension(&libtorrent::create_metadata_plugin);
#include <libtorrent/extensions/ut_metadata.hpp>
ses.add_extension(&libtorrent::create_ut_metadata_plugin);
uTorrent peer exchange
Exchanges peers between clients.
::
#include <libtorrent/extensions/ut_pex.hpp>
ses.add_extension(&libtorrent::create_ut_pex_plugin);
smart ban plugin
A plugin that, with a small overhead, can ban peers
that sends bad data with very high accuracy. Should
eliminate most problems on poisoned torrents.
::
#include <libtorrent/extensions/smart_ban.hpp>
ses.add_extension(&libtorrent::create_smart_ban_plugin);
.. _`libtorrent plugins`: libtorrent_plugins.html
set_settings() set_pe_settings()