mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 09:55:55 +00:00
- A lot of improvement in proxy code
This commit is contained in:
parent
f36052351c
commit
93bc6dca95
@ -1075,14 +1075,26 @@ void bittorrent::setSessionSettings(session_settings sessionSettings) {
|
|||||||
// Set Proxy
|
// Set Proxy
|
||||||
void bittorrent::setProxySettings(proxy_settings proxySettings, bool trackers, bool peers, bool web_seeds, bool dht) {
|
void bittorrent::setProxySettings(proxy_settings proxySettings, bool trackers, bool peers, bool web_seeds, bool dht) {
|
||||||
qDebug("Set Proxy settings");
|
qDebug("Set Proxy settings");
|
||||||
|
proxy_settings ps_null;
|
||||||
|
ps_null.type = proxy_settings::none;
|
||||||
if(trackers)
|
if(trackers)
|
||||||
s->set_tracker_proxy(proxySettings);
|
s->set_tracker_proxy(proxySettings);
|
||||||
|
else
|
||||||
|
s->set_tracker_proxy(ps_null);
|
||||||
|
|
||||||
if(peers)
|
if(peers)
|
||||||
s->set_peer_proxy(proxySettings);
|
s->set_peer_proxy(proxySettings);
|
||||||
|
else
|
||||||
|
s->set_peer_proxy(ps_null);
|
||||||
if(web_seeds)
|
if(web_seeds)
|
||||||
s->set_web_seed_proxy(proxySettings);
|
s->set_web_seed_proxy(proxySettings);
|
||||||
if(DHTEnabled && dht) {
|
else
|
||||||
s->set_dht_proxy(proxySettings);
|
s->set_web_seed_proxy(ps_null);
|
||||||
|
if(DHTEnabled) {
|
||||||
|
if(dht)
|
||||||
|
s->set_dht_proxy(proxySettings);
|
||||||
|
else
|
||||||
|
s->set_dht_proxy(ps_null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user