mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
Remove config string dependency (#577)
Remove WG/AWG config string dependency
This commit is contained in:
@@ -400,9 +400,10 @@ bool IosController::setupCloak()
|
||||
bool IosController::setupWireGuard()
|
||||
{
|
||||
QJsonObject config = m_rawConfig[ProtocolProps::key_proto_config_data(amnezia::Proto::WireGuard)].toObject();
|
||||
|
||||
QString wgConfig = config[config_key::config].toString();
|
||||
|
||||
QJsonDocument doc(m_rawConfig);
|
||||
QString wgConfig(doc.toJson(QJsonDocument::Compact));
|
||||
|
||||
return startWireGuard(wgConfig);
|
||||
}
|
||||
|
||||
@@ -410,8 +411,9 @@ bool IosController::setupAwg()
|
||||
{
|
||||
QJsonObject config = m_rawConfig[ProtocolProps::key_proto_config_data(amnezia::Proto::Awg)].toObject();
|
||||
|
||||
QString wgConfig = config[config_key::config].toString();
|
||||
|
||||
QJsonDocument doc(m_rawConfig);
|
||||
QString wgConfig(doc.toJson(QJsonDocument::Compact));
|
||||
|
||||
return startWireGuard(wgConfig);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user