mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-16 21:30:06 +00:00
Disable any usage of proxy servers
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user