mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Re-apply "Disable system proxy support on Linux".
This reverts commit c71c24a6bc
.
This commit is contained in:
@@ -33,6 +33,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
#include <QtGui/QSessionManager>
|
#include <QtGui/QSessionManager>
|
||||||
#include <QtGui/QScreen>
|
#include <QtGui/QScreen>
|
||||||
#include <QtGui/qpa/qplatformscreen.h>
|
#include <QtGui/qpa/qplatformscreen.h>
|
||||||
|
#include <ksandbox.h>
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
namespace {
|
namespace {
|
||||||
@@ -517,8 +518,10 @@ void Sandbox::refreshGlobalProxy() {
|
|||||||
|| proxy.type == MTP::ProxyData::Type::Http) {
|
|| proxy.type == MTP::ProxyData::Type::Http) {
|
||||||
QNetworkProxy::setApplicationProxy(
|
QNetworkProxy::setApplicationProxy(
|
||||||
MTP::ToNetworkProxy(MTP::ToDirectIpProxy(proxy)));
|
MTP::ToNetworkProxy(MTP::ToDirectIpProxy(proxy)));
|
||||||
} else if (!Core::IsAppLaunched()
|
} else if ((!Core::IsAppLaunched()
|
||||||
|| Core::App().settings().proxy().isSystem()) {
|
|| Core::App().settings().proxy().isSystem())
|
||||||
|
// this works stable only in sandboxed environment where it works through portal
|
||||||
|
&& (!Platform::IsLinux() || KSandbox::isInside() || cDebugMode())) {
|
||||||
QNetworkProxyFactory::setUseSystemConfiguration(true);
|
QNetworkProxyFactory::setUseSystemConfiguration(true);
|
||||||
} else {
|
} else {
|
||||||
QNetworkProxy::setApplicationProxy(QNetworkProxy::NoProxy);
|
QNetworkProxy::setApplicationProxy(QNetworkProxy::NoProxy);
|
||||||
|
2
cmake
2
cmake
Submodule cmake updated: 199ce0e7c8...b875d0ae2b
Reference in New Issue
Block a user