|
|
@ -245,7 +245,7 @@ Session::Session(QObject *parent) |
|
|
|
, m_isLSDEnabled(BITTORRENT_SESSION_KEY("LSDEnabled"), true) |
|
|
|
, m_isLSDEnabled(BITTORRENT_SESSION_KEY("LSDEnabled"), true) |
|
|
|
, m_isPeXEnabled(BITTORRENT_SESSION_KEY("PeXEnabled"), true) |
|
|
|
, m_isPeXEnabled(BITTORRENT_SESSION_KEY("PeXEnabled"), true) |
|
|
|
, m_isTrackerExchangeEnabled(BITTORRENT_SESSION_KEY("TrackerExchangeEnabled"), false) |
|
|
|
, m_isTrackerExchangeEnabled(BITTORRENT_SESSION_KEY("TrackerExchangeEnabled"), false) |
|
|
|
, m_isFilteringEnabled(BITTORRENT_SESSION_KEY("FilteringEnabled"), false) |
|
|
|
, m_isIPFilteringEnabled(BITTORRENT_SESSION_KEY("IPFilteringEnabled"), false) |
|
|
|
, m_isTrackerFilteringEnabled(BITTORRENT_SESSION_KEY("TrackerFilteringEnabled"), false) |
|
|
|
, m_isTrackerFilteringEnabled(BITTORRENT_SESSION_KEY("TrackerFilteringEnabled"), false) |
|
|
|
, m_IPFilterFile(BITTORRENT_SESSION_KEY("IPFilter")) |
|
|
|
, m_IPFilterFile(BITTORRENT_SESSION_KEY("IPFilter")) |
|
|
|
, m_announceToAllTrackers(BITTORRENT_SESSION_KEY("AnnounceToAllTrackers"), true) |
|
|
|
, m_announceToAllTrackers(BITTORRENT_SESSION_KEY("AnnounceToAllTrackers"), true) |
|
|
@ -417,7 +417,7 @@ Session::Session(QObject *parent) |
|
|
|
, Log::INFO); |
|
|
|
, Log::INFO); |
|
|
|
|
|
|
|
|
|
|
|
m_nativeSession->set_ip_filter({}); |
|
|
|
m_nativeSession->set_ip_filter({}); |
|
|
|
if (isFilteringEnabled()) |
|
|
|
if (isIPFilteringEnabled()) |
|
|
|
enableIPFilter(); |
|
|
|
enableIPFilter(); |
|
|
|
// Add the banned IPs
|
|
|
|
// Add the banned IPs
|
|
|
|
processBannedIPs(); |
|
|
|
processBannedIPs(); |
|
|
@ -923,7 +923,7 @@ void Session::configure() |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
if (m_IPFilteringChanged) { |
|
|
|
if (m_IPFilteringChanged) { |
|
|
|
if (isFilteringEnabled()) |
|
|
|
if (isIPFilteringEnabled()) |
|
|
|
enableIPFilter(); |
|
|
|
enableIPFilter(); |
|
|
|
else |
|
|
|
else |
|
|
|
disableIPFilter(); |
|
|
|
disableIPFilter(); |
|
|
@ -2347,15 +2347,15 @@ void Session::setAdditionalTrackers(const QString &trackers) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool Session::isFilteringEnabled() const |
|
|
|
bool Session::isIPFilteringEnabled() const |
|
|
|
{ |
|
|
|
{ |
|
|
|
return m_isFilteringEnabled; |
|
|
|
return m_isIPFilteringEnabled; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void Session::setFilteringEnabled(bool enabled) |
|
|
|
void Session::setIPFilteringEnabled(bool enabled) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (enabled != m_isFilteringEnabled) { |
|
|
|
if (enabled != m_isIPFilteringEnabled) { |
|
|
|
m_isFilteringEnabled = enabled; |
|
|
|
m_isIPFilteringEnabled = enabled; |
|
|
|
m_IPFilteringChanged = true; |
|
|
|
m_IPFilteringChanged = true; |
|
|
|
configureDeferred(); |
|
|
|
configureDeferred(); |
|
|
|
} |
|
|
|
} |
|
|
|