mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Re-apply "Disable system proxy support on Linux".
This reverts commit c71c24a6bc
.
This commit is contained in:
parent
8cbb1abff2
commit
1e6fb202f0
2 changed files with 6 additions and 3 deletions
|
@ -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
|
@ -1 +1 @@
|
||||||
Subproject commit 199ce0e7c8b6e6ce939491ac7ee5973129e6e2eb
|
Subproject commit b875d0ae2bf457ec94aaddd08431753e14ec71ac
|
Loading…
Add table
Reference in a new issue