mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 16:53:08 -07:00
- Supports SOCKS5 proxies as well as HTTP ones
- Allow to use Proxy for Trackers / Peers / Web seeds / DHT connections - Redesigned Proxy options a little (for new features)
This commit is contained in:
parent
2985fa921a
commit
2196fcc911
7 changed files with 219 additions and 10 deletions
17
src/GUI.cpp
17
src/GUI.cpp
|
@ -1219,16 +1219,27 @@ void GUI::configureSession(bool deleteOptions){
|
|||
}
|
||||
// Apply Proxy settings
|
||||
if(options->isProxyEnabled()){
|
||||
switch(options->getProxyType()){
|
||||
case HTTP_PW:
|
||||
proxySettings.type = proxy_settings::http_pw;
|
||||
break;
|
||||
case SOCKS5:
|
||||
proxySettings.type = proxy_settings::socks5;
|
||||
break;
|
||||
case SOCKS5_PW:
|
||||
proxySettings.type = proxy_settings::socks5_pw;
|
||||
break;
|
||||
default:
|
||||
proxySettings.type = proxy_settings::http;
|
||||
}
|
||||
proxySettings.hostname = options->getProxyIp().toStdString();
|
||||
proxySettings.port = options->getProxyPort();
|
||||
proxySettings.type = proxy_settings::http;
|
||||
if(options->isProxyAuthEnabled()){
|
||||
proxySettings.username = options->getProxyUsername().toStdString();
|
||||
proxySettings.password = options->getProxyPassword().toStdString();
|
||||
proxySettings.type = proxy_settings::http_pw;
|
||||
}
|
||||
}
|
||||
BTSession.setProxySettings(proxySettings);
|
||||
BTSession.setProxySettings(proxySettings, options->useProxyForTrackers(), options->useProxyForPeers(), options->useProxyForWebseeds(), options->useProxyForDHT());
|
||||
sessionSettings.user_agent = "qBittorrent "VERSION;
|
||||
BTSession.setSessionSettings(sessionSettings);
|
||||
// Scan dir stuff
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue