Merge branch 'feature/split-tunneling-config' into bugfix/split-tunneling

This commit is contained in:
Mykola Baibuz 2023-10-15 15:10:05 -04:00
commit 501670bdd2
6 changed files with 48 additions and 4 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()