mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Reapply "Disable system proxy support on Linux"
This reverts commit 202a4064a4
.
This commit is contained in:
parent
393f330d15
commit
55b2b04e2e
1 changed files with 5 additions and 2 deletions
|
@ -33,6 +33,7 @@ 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 {
|
||||
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue