mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Fix to proxy settings
Added back SOCKS5 proxy support for HTTP communications
This commit is contained in:
parent
6ae49acb69
commit
296acf820c
4 changed files with 58 additions and 24 deletions
|
@ -35,6 +35,8 @@
|
|||
#include <QNetworkRequest>
|
||||
#include <QNetworkProxy>
|
||||
|
||||
enum ProxyType {HTTP=1, SOCKS5=2, HTTP_PW=3, SOCKS5_PW=4, SOCKS4=5};
|
||||
|
||||
/** Download Thread **/
|
||||
|
||||
downloadThread::downloadThread(QObject* parent) : QObject(parent) {
|
||||
|
@ -105,7 +107,7 @@ void downloadThread::applyProxySettings() {
|
|||
qDebug("Using proxy: %s", (IP+QString(":")+port).toLocal8Bit().data());
|
||||
proxy.setPort(port.toUShort());
|
||||
// Default proxy type is HTTP, we must change if it is SOCKS5
|
||||
if(intValue%2==0) {
|
||||
if(intValue == SOCKS5 || intValue == SOCKS5_PW) {
|
||||
qDebug("Proxy is SOCKS5, not HTTP");
|
||||
proxy.setType(QNetworkProxy::Socks5Proxy);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue