diff --git a/Changelog b/Changelog index 4abbc0919..82b1f506b 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,6 @@ -* Tuesday October 06 2007 - Christophe Dumez - v1.1.0 +* Unknown - Christophe Dumez - v1.1.0 - FEATURE: Web interface to control qbittorrent (Ishan Arora) + - FEATURE: Can spoof Azureus peer id to avoid ban - FEATURE: Allow to hide/show some columns in download and seeding lists - FEATURE: Option to start qBittorrent minimized in systray - FEATURE: Allow to define double-click actions in torrents lists @@ -19,7 +20,7 @@ - COSMETIC: Display tracker errors in a cleaner way - COSMETIC: Display "unpaused/total_torrent" in download/upload tabs -* Unknown - Christophe Dumez - v1.0.0 +* Fri Apr 11 2008 - Christophe Dumez - v1.0.0 - FEATURE: Based on new libtorrent v0.13 - FEATURE: Added UPnP / NAT-PMP port forwarding support - FEATURE: Added encryption support (compatible with Azureus) diff --git a/src/GUI.cpp b/src/GUI.cpp index 2fd865b93..b9e49bba1 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -940,7 +940,11 @@ void GUI::configureSession(bool deleteOptions) { BTSession->setProxySettings(proxySettings, options->useProxyForTrackers(), options->useProxyForPeers(), options->useProxyForWebseeds(), options->useProxyForDHT()); // * Session settings session_settings sessionSettings; - sessionSettings.user_agent = "qBittorrent "VERSION; + if(options->shouldSpoofAzureus()) { + sessionSettings.user_agent = "Azureus 3.0.5.2"; + } else { + sessionSettings.user_agent = "qBittorrent "VERSION; + } BTSession->setSessionSettings(sessionSettings); // Bittorrent // * Max connections limit diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 09e039d70..4d089b624 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include "bittorrent.h" #include "misc.h" @@ -46,7 +47,13 @@ bittorrent::bittorrent() : timerScan(0), DHTEnabled(false), preAllocateAll(false // To avoid some exceptions fs::path::default_name_check(fs::no_check); // Creating bittorrent session - s = new session(fingerprint("qB", VERSION_MAJOR, VERSION_MINOR, VERSION_BUGFIX, 0)); + // Check if we should spoof azureus + QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); + if(settings.value(QString::fromUtf8("AzureusSpoof"), false).toBool()) { + s = new session(fingerprint("AZ", 3, 0, 5, 2)); + } else { + s = new session(fingerprint("qB", VERSION_MAJOR, VERSION_MINOR, VERSION_BUGFIX, 0)); + } // Set severity level of libtorrent session s->set_severity_level(alert::info); // Enabling metadata plugin diff --git a/src/options.ui b/src/options.ui index e7bc085f9..e9abf7038 100644 --- a/src/options.ui +++ b/src/options.ui @@ -1361,6 +1361,13 @@ + + + + Spoof Azureus to avoid ban (requires restart) + + + diff --git a/src/options_imp.cpp b/src/options_imp.cpp index 343b00d4b..e43e45d8a 100644 --- a/src/options_imp.cpp +++ b/src/options_imp.cpp @@ -194,6 +194,7 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){ connect(checkDHT, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(checkPeX, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(checkLSD, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkAzureusSpoof, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(comboEncryption, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); connect(checkRatioLimit, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(checkRatioRemove, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); @@ -322,6 +323,7 @@ void options_imp::saveOptions(){ settings.setValue(QString::fromUtf8("DHT"), isDHTEnabled()); settings.setValue(QString::fromUtf8("PeX"), isPeXEnabled()); settings.setValue(QString::fromUtf8("LSD"), isLSDEnabled()); + settings.setValue(QString::fromUtf8("AzureusSpoof"), shouldSpoofAzureus()); settings.setValue(QString::fromUtf8("Encryption"), getEncryptionSetting()); settings.setValue(QString::fromUtf8("DesiredRatio"), getDesiredRatio()); settings.setValue(QString::fromUtf8("MaxRatio"), getDeleteRatio()); @@ -357,6 +359,10 @@ void options_imp::saveOptions(){ settings.endGroup(); } +bool options_imp::shouldSpoofAzureus() const { + return checkAzureusSpoof->isChecked(); +} + bool options_imp::isFilteringEnabled() const{ return checkIPFilter->isChecked(); } @@ -561,6 +567,7 @@ void options_imp::loadOptions(){ checkDHT->setChecked(settings.value(QString::fromUtf8("DHT"), true).toBool()); checkPeX->setChecked(settings.value(QString::fromUtf8("PeX"), true).toBool()); checkLSD->setChecked(settings.value(QString::fromUtf8("LSD"), true).toBool()); + checkAzureusSpoof->setChecked(settings.value(QString::fromUtf8("AzureusSpoof"), false).toBool()); comboEncryption->setCurrentIndex(settings.value(QString::fromUtf8("Encryption"), 0).toInt()); floatValue = settings.value(QString::fromUtf8("DesiredRatio"), -1).toDouble(); if(floatValue >= 1.) { diff --git a/src/options_imp.h b/src/options_imp.h index 9cc15c8d9..709dcdb6a 100644 --- a/src/options_imp.h +++ b/src/options_imp.h @@ -99,6 +99,7 @@ class options_imp : public QDialog, private Ui::Dialog { bool isDHTEnabled() const; bool isPeXEnabled() const; bool isLSDEnabled() const; + bool shouldSpoofAzureus() const; int getEncryptionSetting() const; float getDesiredRatio() const; float getDeleteRatio() const;