added display of wireguard configs, such a config will be displayed as raw text

This commit is contained in:
vladimir.kuznetsov 2022-11-04 23:31:39 +03:00
parent 99a6cd82b2
commit 6941b7463e
10 changed files with 142 additions and 14 deletions

View file

@ -91,11 +91,12 @@ void OpenVpnLogic::updateProtocolPage(const QJsonObject &openvpnConfig, DockerCo
auto lastConfig = openvpnConfig.value(config_key::last_config).toString();
auto lastConfigJson = QJsonDocument::fromJson(lastConfig.toUtf8()).object();
QStringList lines = lastConfigJson.value(config_key::config).toString().replace("\r", "").split("\n");
QString openVpnLastConfigText;
for (const QString &l: lines) {
m_openVpnLastConfigText.append(l + "\n");
openVpnLastConfigText.append(l + "\n");
}
emit openVpnLastConfigTextChanged(m_openVpnLastConfigText);
set_openVpnLastConfigText(m_openVpnLastConfigText);
set_isThirdPartyConfig(isThirdPartyConfig);
}