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