iOS AWG protocol Setup

This commit is contained in:
Mykola Baibuz
2023-09-30 00:58:08 +03:00
parent 19bd94ed02
commit b7fbb84a58
4 changed files with 15 additions and 1 deletions
+12
View File
@@ -204,6 +204,9 @@ bool IosController::connectVpn(amnezia::Proto proto, const QJsonObject& configur
if (proto == amnezia::Proto::WireGuard) {
return setupWireGuard();
}
if (proto == amnezia::Proto::AmneziaWireGuard) {
return setupAmneziaWireGuard();
}
return false;
}
@@ -307,6 +310,15 @@ bool IosController::setupWireGuard()
return startWireGuard(wgConfig);
}
bool IosController::setupAmneziaWireGuard()
{
QJsonObject config = m_rawConfig[ProtocolProps::key_proto_config_data(amnezia::Proto::AmneziaWireGuard)].toObject();
QString wgConfig = config[config_key::config].toString();
return startWireGuard(wgConfig);
}
bool IosController::startOpenVPN(const QString &config)
{
qDebug() << "IosController::startOpenVPN";