diff --git a/Telegram/SourceFiles/core/sandbox.cpp b/Telegram/SourceFiles/core/sandbox.cpp index 6feacdb5b..fb145f7f1 100644 --- a/Telegram/SourceFiles/core/sandbox.cpp +++ b/Telegram/SourceFiles/core/sandbox.cpp @@ -33,6 +33,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include #include +#include namespace Core { namespace { @@ -517,8 +518,10 @@ void Sandbox::refreshGlobalProxy() { || proxy.type == MTP::ProxyData::Type::Http) { QNetworkProxy::setApplicationProxy( MTP::ToNetworkProxy(MTP::ToDirectIpProxy(proxy))); - } else if (!Core::IsAppLaunched() - || Core::App().settings().proxy().isSystem()) { + } else if ((!Core::IsAppLaunched() + || 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); } else { QNetworkProxy::setApplicationProxy(QNetworkProxy::NoProxy); diff --git a/cmake b/cmake index 199ce0e7c..b875d0ae2 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 199ce0e7c8b6e6ce939491ac7ee5973129e6e2eb +Subproject commit b875d0ae2bf457ec94aaddd08431753e14ec71ac