mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-05-08 14:33:23 +00:00
Add protocol name to json connection config
This commit is contained in:
@@ -24,6 +24,7 @@ constexpr char containers[] = "containers";
|
||||
constexpr char container[] = "container";
|
||||
constexpr char defaultContainer[] = "defaultContainer";
|
||||
|
||||
constexpr char protocol[] = "protocol";
|
||||
constexpr char protocols[] = "protocols";
|
||||
|
||||
constexpr char remote[] = "remote";
|
||||
|
||||
@@ -211,6 +211,9 @@ QJsonObject VpnConnection::createVpnConfiguration(int serverIndex,
|
||||
|
||||
}
|
||||
|
||||
Protocol proto = ContainerProps::defaultProtocol(container);
|
||||
vpnConfiguration[config_key::protocol] = ProtocolProps::protoToString(proto);
|
||||
|
||||
return vpnConfiguration;
|
||||
}
|
||||
|
||||
@@ -248,7 +251,6 @@ ErrorCode VpnConnection::connectToVpn(int serverIndex,
|
||||
|
||||
|
||||
#else
|
||||
Protocol proto = ContainerProps::defaultProtocol(container);
|
||||
AndroidVpnProtocol *androidVpnProtocol = new AndroidVpnProtocol(proto, m_vpnConfiguration);
|
||||
androidVpnProtocol->initialize();
|
||||
m_vpnProtocol.reset(androidVpnProtocol);
|
||||
|
||||
Reference in New Issue
Block a user