Remove config string dependency (#577)
Remove WG/AWG config string dependency
This commit is contained in:
parent
074562b141
commit
f640d4b5f5
4 changed files with 146 additions and 12 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue