mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
iOS AWG protocol Setup
This commit is contained in:
+1
-1
Submodule client/3rd-prebuilt updated: e8795854a5...6f0d654a24
@@ -186,6 +186,7 @@ bool ContainerProps::isSupportedByCurrentPlatform(DockerContainer c)
|
||||
switch (c) {
|
||||
case DockerContainer::WireGuard: return true;
|
||||
case DockerContainer::OpenVpn: return true;
|
||||
case DockerContainer::AmneziaWireGuard: return true;
|
||||
case DockerContainer::Cloak:
|
||||
return true;
|
||||
// case DockerContainer::ShadowSocks: return true;
|
||||
|
||||
@@ -62,6 +62,7 @@ private:
|
||||
bool setupOpenVPN();
|
||||
bool setupCloak();
|
||||
bool setupWireGuard();
|
||||
bool setupAmneziaWireGuard();
|
||||
|
||||
bool startOpenVPN(const QString &config);
|
||||
bool startWireGuard(const QString &jsonConfig);
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user