Disable any usage of proxy servers

This commit is contained in:
Cameron Gutman
2018-11-04 14:13:56 -08:00
parent 1a5a6773ce
commit 011edfe2a0
2 changed files with 13 additions and 0 deletions

View File

@@ -10,6 +10,7 @@
#include <QSslKey>
#include <QImageReader>
#include <QtEndian>
#include <QNetworkProxy>
#define REQUEST_TIMEOUT_MS 5000
@@ -24,6 +25,10 @@ NvHTTP::NvHTTP(QString address) :
m_BaseUrlHttps.setHost(address);
m_BaseUrlHttp.setPort(47989);
m_BaseUrlHttps.setPort(47984);
// Never use a proxy server
QNetworkProxy noProxy(QNetworkProxy::NoProxy);
m_Nam.setProxy(noProxy);
}
QVector<int>

View File

@@ -5,6 +5,7 @@
#include <QQuickStyle>
#include <QMutex>
#include <QtDebug>
#include <QNetworkProxyFactory>
// Don't let SDL hook our main function, since Qt is already
// doing the same thing. This needs to be before any headers
@@ -288,6 +289,13 @@ int main(int argc, char *argv[])
}
#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
qRegisterMetaType<NvApp>("NvApp");