mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 07:57:22 -06:00
Add support for anonymous mode
This mode was added in libtorrent v0.16 and should be used in addition to a SOCKS5 proxy.
This commit is contained in:
@@ -249,6 +249,10 @@ void EventManager::setGlobalPreferences(QVariantMap m) const {
|
||||
pref.setLSDEnabled(m["lsd"].toBool());
|
||||
if(m.contains("encryption"))
|
||||
pref.setEncryptionSetting(m["encryption"].toInt());
|
||||
#if LIBTORRENT_VERSION_MINOR >= 16
|
||||
if(m.contains("anonymous_mode"))
|
||||
pref.enableAnonymousMode(m["anonymous_mode"].toBool());
|
||||
#endif
|
||||
// Proxy
|
||||
if(m.contains("proxy_type"))
|
||||
pref.setProxyType(m["proxy_type"].toInt());
|
||||
@@ -362,6 +366,9 @@ QVariantMap EventManager::getGlobalPreferences() const {
|
||||
data["pex"] = pref.isPeXEnabled();
|
||||
data["lsd"] = pref.isLSDEnabled();
|
||||
data["encryption"] = pref.getEncryptionSetting();
|
||||
#if LIBTORRENT_VERSION_MINOR >= 16
|
||||
data["anonymous_mode"] = pref.isAnonymousModeEnabled();
|
||||
#endif
|
||||
// Proxy
|
||||
data["proxy_type"] = pref.getProxyType();
|
||||
data["proxy_ip"] = pref.getProxyIp();
|
||||
|
||||
Reference in New Issue
Block a user