Disable any usage of proxy servers
This commit is contained in:
parent
1a5a6773ce
commit
011edfe2a0
2 changed files with 13 additions and 0 deletions
|
|
@ -10,6 +10,7 @@
|
||||||
#include <QSslKey>
|
#include <QSslKey>
|
||||||
#include <QImageReader>
|
#include <QImageReader>
|
||||||
#include <QtEndian>
|
#include <QtEndian>
|
||||||
|
#include <QNetworkProxy>
|
||||||
|
|
||||||
#define REQUEST_TIMEOUT_MS 5000
|
#define REQUEST_TIMEOUT_MS 5000
|
||||||
|
|
||||||
|
|
@ -24,6 +25,10 @@ NvHTTP::NvHTTP(QString address) :
|
||||||
m_BaseUrlHttps.setHost(address);
|
m_BaseUrlHttps.setHost(address);
|
||||||
m_BaseUrlHttp.setPort(47989);
|
m_BaseUrlHttp.setPort(47989);
|
||||||
m_BaseUrlHttps.setPort(47984);
|
m_BaseUrlHttps.setPort(47984);
|
||||||
|
|
||||||
|
// Never use a proxy server
|
||||||
|
QNetworkProxy noProxy(QNetworkProxy::NoProxy);
|
||||||
|
m_Nam.setProxy(noProxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<int>
|
QVector<int>
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
#include <QQuickStyle>
|
#include <QQuickStyle>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
#include <QNetworkProxyFactory>
|
||||||
|
|
||||||
// Don't let SDL hook our main function, since Qt is already
|
// Don't let SDL hook our main function, since Qt is already
|
||||||
// doing the same thing. This needs to be before any headers
|
// doing the same thing. This needs to be before any headers
|
||||||
|
|
@ -288,6 +289,13 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// We don't want system proxies to apply to us
|
||||||
|
QNetworkProxyFactory::setUseSystemConfiguration(false);
|
||||||
|
|
||||||
|
// Clear any default application proxy
|
||||||
|
QNetworkProxy noProxy(QNetworkProxy::NoProxy);
|
||||||
|
QNetworkProxy::setApplicationProxy(noProxy);
|
||||||
|
|
||||||
// Register custom metatypes for use in signals
|
// Register custom metatypes for use in signals
|
||||||
qRegisterMetaType<NvApp>("NvApp");
|
qRegisterMetaType<NvApp>("NvApp");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue