merged ban_web_seed setting patch from RC_0_16
This commit is contained in:
parent
bd046bbf4a
commit
9f0e892228
|
@ -4301,6 +4301,8 @@ struct session_settings
|
|||
int ssl_listen;
|
||||
|
||||
int tracker_backoff;
|
||||
|
||||
bool ban_web_seeds;
|
||||
};
|
||||
</pre>
|
||||
<p><tt class="docutils literal"><span class="pre">version</span></tt> is automatically set to the libtorrent version you're using
|
||||
|
@ -5047,6 +5049,8 @@ delay = 5 + 5 * x / 100 * fails^2</blockquote>
|
|||
<p>It defaults to 250.</p>
|
||||
<p>This setting may be useful to make libtorrent more or less aggressive in hitting
|
||||
trackers.</p>
|
||||
<p><tt class="docutils literal"><span class="pre">ban_web_seeds</span></tt> enables banning web seeds. By default, web seeds that send
|
||||
corrupt data are banned.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="pe-settings">
|
||||
|
@ -6258,7 +6262,7 @@ struct peer_disconnected_alert: peer_alert
|
|||
<div class="section" id="invalid-request-alert">
|
||||
<h2>invalid_request_alert</h2>
|
||||
<p>This is a debug alert that is generated by an incoming invalid piece request.
|
||||
<tt class="docutils literal"><span class="pre">ìp</span></tt> is the address of the peer and the <tt class="docutils literal"><span class="pre">request</span></tt> is the actual incoming
|
||||
<tt class="docutils literal"><span class="pre">Ïp</span></tt> is the address of the peer and the <tt class="docutils literal"><span class="pre">request</span></tt> is the actual incoming
|
||||
request from the peer.</p>
|
||||
<pre class="literal-block">
|
||||
struct invalid_request_alert: peer_alert
|
||||
|
@ -7845,13 +7849,13 @@ std::string error_code_to_string(boost::system::error_code const& ec)
|
|||
static const char const* swedish[] =
|
||||
{
|
||||
"inget fel",
|
||||
"en fil i torrenten kolliderar med en fil från en annan torrent",
|
||||
"en fil i torrenten kolliderar med en fil frÂn en annan torrent",
|
||||
"hash check misslyckades",
|
||||
"torrent filen är inte en dictionary",
|
||||
"'info'-nyckeln saknas eller är korrupt i torrentfilen",
|
||||
"'info'-fältet är inte en dictionary",
|
||||
"'piece length' fältet saknas eller är korrupt i torrentfilen",
|
||||
"torrentfilen saknar namnfältet",
|
||||
"torrent filen ‰r inte en dictionary",
|
||||
"'info'-nyckeln saknas eller ‰r korrupt i torrentfilen",
|
||||
"'info'-f‰ltet ‰r inte en dictionary",
|
||||
"'piece length' f‰ltet saknas eller ‰r korrupt i torrentfilen",
|
||||
"torrentfilen saknar namnf‰ltet",
|
||||
"ogiltigt namn i torrentfilen (kan vara en attack)",
|
||||
// ... more strings here
|
||||
};
|
||||
|
|
|
@ -4558,6 +4558,8 @@ session_settings
|
|||
int ssl_listen;
|
||||
|
||||
int tracker_backoff;
|
||||
|
||||
bool ban_web_seeds;
|
||||
};
|
||||
|
||||
``version`` is automatically set to the libtorrent version you're using
|
||||
|
@ -5455,6 +5457,9 @@ It defaults to 250.
|
|||
This setting may be useful to make libtorrent more or less aggressive in hitting
|
||||
trackers.
|
||||
|
||||
``ban_web_seeds`` enables banning web seeds. By default, web seeds that send
|
||||
corrupt data are banned.
|
||||
|
||||
pe_settings
|
||||
===========
|
||||
|
||||
|
|
|
@ -927,6 +927,9 @@ namespace libtorrent
|
|||
// determines how fast the back-off happens. Default
|
||||
// is 250
|
||||
int tracker_backoff;
|
||||
|
||||
// when true, web seeds sending bad data will be banned
|
||||
bool ban_web_seeds;
|
||||
};
|
||||
|
||||
#ifndef TORRENT_DISABLE_DHT
|
||||
|
|
|
@ -564,6 +564,10 @@ namespace libtorrent
|
|||
INVARIANT_CHECK;
|
||||
|
||||
TORRENT_ASSERT(p->in_use);
|
||||
|
||||
if (!m_torrent->settings().ban_web_seeds && p->web_seed)
|
||||
return;
|
||||
|
||||
if (is_connect_candidate(*p, m_finished))
|
||||
--m_num_connect_candidates;
|
||||
|
||||
|
|
|
@ -1277,6 +1277,7 @@ namespace libtorrent
|
|||
, lock_files(false)
|
||||
, ssl_listen(4433)
|
||||
, tracker_backoff(250)
|
||||
, ban_web_seeds(true)
|
||||
{}
|
||||
|
||||
session_settings::~session_settings() {}
|
||||
|
|
Loading…
Reference in New Issue