mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
- Added support for 2 new extensions (uTorrent metadata and smart ban plugin)
- Removed option to disable uTorrent Peer eXchange (PeX) -> always ON
This commit is contained in:
parent
8b40e43432
commit
9618056b4e
6 changed files with 9 additions and 35 deletions
|
@ -29,9 +29,10 @@
|
|||
#include "misc.h"
|
||||
#include "downloadThread.h"
|
||||
#include "filterParserThread.h"
|
||||
|
||||
#include <libtorrent/extensions/metadata_transfer.hpp>
|
||||
#include <libtorrent/extensions/ut_metadata.hpp>
|
||||
#include <libtorrent/extensions/ut_pex.hpp>
|
||||
#include <libtorrent/extensions/smart_ban.hpp>
|
||||
#include <libtorrent/extensions/metadata_transfer.hpp>
|
||||
#include <libtorrent/entry.hpp>
|
||||
#include <libtorrent/bencode.hpp>
|
||||
#include <libtorrent/identify_client.hpp>
|
||||
|
@ -58,8 +59,11 @@ bittorrent::bittorrent() : timerScan(0), DHTEnabled(false), preAllocateAll(false
|
|||
s->set_alert_mask(alert::error_notification | alert::peer_notification | alert::port_mapping_notification | alert::storage_notification | alert::tracker_notification | alert::status_notification | alert::ip_block_notification);
|
||||
// Load previous state
|
||||
loadSessionState();
|
||||
// Enabling metadata plugin
|
||||
// Enabling plugins
|
||||
s->add_extension(&create_metadata_plugin);
|
||||
s->add_extension(&create_ut_metadata_plugin);
|
||||
s->add_extension(&create_ut_pex_plugin);
|
||||
s->add_extension(&create_smart_ban_plugin);
|
||||
timerAlerts = new QTimer();
|
||||
connect(timerAlerts, SIGNAL(timeout()), this, SLOT(readAlerts()));
|
||||
timerAlerts->start(3000);
|
||||
|
@ -1134,12 +1138,6 @@ void bittorrent::saveTrackerFile(QString hash) {
|
|||
tracker_file.close();
|
||||
}
|
||||
|
||||
// Add uT PeX extension to bittorrent session
|
||||
void bittorrent::enablePeerExchange() {
|
||||
qDebug("Enabling Peer eXchange");
|
||||
s->add_extension(&create_ut_pex_plugin);
|
||||
}
|
||||
|
||||
// Set DHT port (>= 1000)
|
||||
void bittorrent::setDHTPort(int dht_port) {
|
||||
if(dht_port >= 1000) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue