Revert "Disable system proxy support on Linux"

This reverts commit 3af646a584.
This commit is contained in:
John Preston 2024-03-13 21:19:49 +04:00
parent ddf2369774
commit 202a4064a4
2 changed files with 3 additions and 6 deletions

View File

@ -33,7 +33,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtGui/QSessionManager>
#include <QtGui/QScreen>
#include <QtGui/qpa/qplatformscreen.h>
#include <ksandbox.h>
namespace Core {
namespace {
@ -518,10 +517,8 @@ 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())
// this works stable only in sandboxed environment where it works through portal
&& (!Platform::IsLinux() || KSandbox::isInside() || cDebugMode())) {
} else if (!Core::IsAppLaunched()
|| Core::App().settings().proxy().isSystem()) {
QNetworkProxyFactory::setUseSystemConfiguration(true);
} else {
QNetworkProxy::setApplicationProxy(QNetworkProxy::NoProxy);

2
cmake

@ -1 +1 @@
Subproject commit 89c843ff6a007e08550c3d603d314a4edaae1732
Subproject commit c82faf706fd10618ad5f97a7972fb09c56843271