WG/AWG Desktop AllowedIP from plain WG config
This commit is contained in:
parent
32c304dc1b
commit
414a47e2f2
2 changed files with 57 additions and 33 deletions
|
@ -263,11 +263,8 @@ QJsonObject ImportController::extractWireGuardConfig(const QString &data)
|
|||
// return QJsonObject();
|
||||
// }
|
||||
|
||||
auto allowedIps = configMap.value("AllowedIPs").split(",");
|
||||
QJsonArray allowedIpsJsonArray;
|
||||
for (const auto &allowedIp : allowedIps) {
|
||||
allowedIpsJsonArray.append(allowedIp);
|
||||
}
|
||||
QJsonArray allowedIpsJsonArray = QJsonArray::fromStringList(configMap.value("AllowedIPs").split(","));
|
||||
|
||||
lastConfig[config_key::allowed_ips] = allowedIpsJsonArray;
|
||||
|
||||
QString protocolName = "wireguard";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue