2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Support tg://proxy links.

This commit is contained in:
John Preston
2018-04-27 20:16:50 +04:00
parent dc9483e07a
commit 8e99135f37
7 changed files with 45 additions and 10 deletions

View File

@@ -838,7 +838,11 @@ bool Messenger::openLocalUrl(const QString &url) {
}
} else if (auto socksMatch = regex_match(qsl("^socks/?\\?(.+)(#|$)"), command, matchOptions)) {
auto params = url_parse_params(socksMatch->captured(1), UrlParamNameTransform::ToLower);
ConnectionBox::ShowApplyProxyConfirmation(params);
ConnectionBox::ShowApplyProxyConfirmation(ProxyData::Type::Socks5, params);
return true;
} else if (auto proxyMatch = regex_match(qsl("^proxy/?\\?(.+)(#|$)"), command, matchOptions)) {
auto params = url_parse_params(proxyMatch->captured(1), UrlParamNameTransform::ToLower);
ConnectionBox::ShowApplyProxyConfirmation(ProxyData::Type::Mtproto, params);
return true;
}
return false;