added split tunneling to the config

This commit is contained in:
vladimir.kuznetsov 2023-10-13 15:45:06 +05:00
parent 7c8399ce88
commit b78bf39767
6 changed files with 63 additions and 6 deletions

View file

@ -263,6 +263,13 @@ QJsonObject ImportController::extractWireGuardConfig(const QString &data)
// return QJsonObject();
// }
auto allowedIps = configMap.value("AllowedIPs").split(",");
QJsonArray allowedIpsJsonArray;
for (const auto &allowedIp : allowedIps) {
allowedIpsJsonArray.append(allowedIp);
}
lastConfig[config_key::allowed_ips] = allowedIpsJsonArray;
QString protocolName = "wireguard";
if (!configMap.value(config_key::junkPacketCount).isEmpty()
&& !configMap.value(config_key::junkPacketMinSize).isEmpty()