mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-21 03:10:24 +08:00
Merge pull request #589 from Qv2ray/dev-refactor-system-proxy
Giving up on attempt to fix Deepin.
This commit is contained in:
commit
a6ac091cc3
@ -232,7 +232,7 @@ namespace Qv2ray::components::proxy
|
||||
QStringList actions;
|
||||
actions << QString("gsettings set org.gnome.system.proxy mode '%1'").arg("manual");
|
||||
bool isKDE = qEnvironmentVariable("XDG_SESSION_DESKTOP") == "KDE";
|
||||
bool isDDE = isKDE ? false : qEnvironmentVariable("XDG_SESSION_DESKTOP") == "deepin";
|
||||
bool isDDE = isKDE ? false : qEnvironmentVariable("XDG_CURRENT_DESKTOP").toLower() == "deepin";
|
||||
const auto configPath = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
|
||||
|
||||
// Configure HTTP Proxies for HTTP, FTP and HTTPS
|
||||
@ -315,16 +315,16 @@ namespace Qv2ray::components::proxy
|
||||
|
||||
const auto deepinWarnTitle = QObject::tr("Deepin Detected");
|
||||
const auto deepinWarnMessage =
|
||||
QObject::tr("Deepin plays smart and sets you the wrong HTTPS_PROXY environment variable. ") + NEWLINE + //
|
||||
QObject::tr("The original scheme should be http://, but he will replace with https://, causing the problem. ") + NEWLINE + //
|
||||
QObject::tr("Qv2ray will help you change it back and make things work again. ");
|
||||
QObject::tr("Deepin plays smart and sets you the wrong HTTPS_PROXY, FTP_PROXY environment variable.") + NEWLINE + //
|
||||
QObject::tr("The origin scheme http is wrongly replaced by https and ftp, causing the problem.") + NEWLINE + //
|
||||
QObject::tr("Qv2ray cannot help you change them back. Please don't blame us if things go wrong."); //
|
||||
QvMessageBoxWarn(nullptr, deepinWarnTitle, deepinWarnMessage);
|
||||
}
|
||||
|
||||
// set them back!
|
||||
const auto httpProxyURL = QString("http://%1:%2").arg(address, QSTRN(httpPort)).toStdString();
|
||||
setenv("https_proxy", httpProxyURL.c_str(), true);
|
||||
setenv("ftp_proxy", httpProxyURL.c_str(), true);
|
||||
// set them back! - NOPE. setenv only works within your little program.
|
||||
// const auto httpProxyURL = QString("http://%1:%2").arg(address, QSTRN(httpPort)).toStdString();
|
||||
// setenv("https_proxy", httpProxyURL.c_str(), true);
|
||||
// setenv("ftp_proxy", httpProxyURL.c_str(), true);
|
||||
}
|
||||
|
||||
#else
|
||||
|
@ -2114,15 +2114,15 @@ For example, for updating subscriptions.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deepin plays smart and sets you the wrong HTTPS_PROXY environment variable. </source>
|
||||
<source>Deepin plays smart and sets you the wrong HTTPS_PROXY, FTP_PROXY environment variable.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The original scheme should be http://, but he will replace with https://, causing the problem. </source>
|
||||
<source>The origin scheme http is wrongly replaced by https and ftp, causing the problem.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Qv2ray will help you change it back and make things work again. </source>
|
||||
<source>Qv2ray cannot help you change them back. Please don't blame us if things go wrong.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -2919,15 +2919,27 @@ For example, for updating subscriptions.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deepin plays smart and sets you the wrong HTTPS_PROXY environment variable. </source>
|
||||
<translation>Deepinのバカ、間違ったHTTPS_PROXY環境変数を設定します。</translation>
|
||||
<translation type="vanished">Deepinのバカ、間違ったHTTPS_PROXY環境変数を設定します。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The original scheme should be http://, but he will replace with https://, causing the problem. </source>
|
||||
<translation>本来のスキームは http:// であるべきなのですが、彼は https:// に置き換えて問題を引き起こします。</translation>
|
||||
<translation type="vanished">本来のスキームは http:// であるべきなのですが、彼は https:// に置き換えて問題を引き起こします。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Qv2ray will help you change it back and make things work again. </source>
|
||||
<translation>Qv2rayはそれを元に戻して、またうまくいくようにしてくれます。</translation>
|
||||
<translation type="vanished">Qv2rayはそれを元に戻して、またうまくいくようにしてくれます。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deepin plays smart and sets you the wrong HTTPS_PROXY, FTP_PROXY environment variable.</source>
|
||||
<translation>Deepinのバカ、間違ったHTTPS_PROXYとFTP_PROXYの環境変数を設定します。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The origin scheme http is wrongly replaced by https and ftp, causing the problem.</source>
|
||||
<translation>元のスキームのhttpがhttpsとftpに間違って置き換えられてしまい、問題が発生しています。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Qv2ray cannot help you change them back. Please don't blame us if things go wrong.</source>
|
||||
<translation>Qv2rayでは元に戻すことはできません。何かあっても私たちのせいにしないでください。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -2801,15 +2801,15 @@ For example, for updating subscriptions.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deepin plays smart and sets you the wrong HTTPS_PROXY environment variable. </source>
|
||||
<source>Deepin plays smart and sets you the wrong HTTPS_PROXY, FTP_PROXY environment variable.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The original scheme should be http://, but he will replace with https://, causing the problem. </source>
|
||||
<source>The origin scheme http is wrongly replaced by https and ftp, causing the problem.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Qv2ray will help you change it back and make things work again. </source>
|
||||
<source>Qv2ray cannot help you change them back. Please don't blame us if things go wrong.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -2497,15 +2497,27 @@ For example, for updating subscriptions.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deepin plays smart and sets you the wrong HTTPS_PROXY environment variable. </source>
|
||||
<translation>默认情况下,Deepin 自作聪明,会给你设置错误的 HTTPS_PROXY 环境变量。</translation>
|
||||
<translation type="vanished">默认情况下,Deepin 自作聪明,会给你设置错误的 HTTPS_PROXY 环境变量。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The original scheme should be http://, but he will replace with https://, causing the problem. </source>
|
||||
<translation>原 scheme 应为 http://,但 Deepin 将其替换成了 https://,导致 HTTPS 代理无法正常使用。</translation>
|
||||
<translation type="vanished">原 scheme 应为 http://,但 Deepin 将其替换成了 https://,导致 HTTPS 代理无法正常使用。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Qv2ray will help you change it back and make things work again. </source>
|
||||
<translation>Qv2ray 会尝试帮你改回去,以期解决此问题。</translation>
|
||||
<translation type="vanished">Qv2ray 会尝试帮你改回去,以期解决此问题。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Deepin plays smart and sets you the wrong HTTPS_PROXY, FTP_PROXY environment variable.</source>
|
||||
<translation>Deepin可能自作聪明,为你设置了错误的 HTTPS_PROXY 和 FTP_PROXY 环境变量。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The origin scheme http is wrongly replaced by https and ftp, causing the problem.</source>
|
||||
<translation>原来正确的 http:// 可能被错误地替换为 https:// 和 ftp://,导致这个问题。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Qv2ray cannot help you change them back. Please don't blame us if things go wrong.</source>
|
||||
<translation>Qv2ray 很遗憾无法帮你改回来。若因此遇到问题,请勿指责吾等。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
Loading…
Reference in New Issue
Block a user