Add protocol name to json connection config
This commit is contained in:
parent
344d23bad1
commit
d275702080
2 changed files with 4 additions and 1 deletions
|
@ -24,6 +24,7 @@ constexpr char containers[] = "containers";
|
||||||
constexpr char container[] = "container";
|
constexpr char container[] = "container";
|
||||||
constexpr char defaultContainer[] = "defaultContainer";
|
constexpr char defaultContainer[] = "defaultContainer";
|
||||||
|
|
||||||
|
constexpr char protocol[] = "protocol";
|
||||||
constexpr char protocols[] = "protocols";
|
constexpr char protocols[] = "protocols";
|
||||||
|
|
||||||
constexpr char remote[] = "remote";
|
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;
|
return vpnConfiguration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,7 +251,6 @@ ErrorCode VpnConnection::connectToVpn(int serverIndex,
|
||||||
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
Protocol proto = ContainerProps::defaultProtocol(container);
|
|
||||||
AndroidVpnProtocol *androidVpnProtocol = new AndroidVpnProtocol(proto, m_vpnConfiguration);
|
AndroidVpnProtocol *androidVpnProtocol = new AndroidVpnProtocol(proto, m_vpnConfiguration);
|
||||||
androidVpnProtocol->initialize();
|
androidVpnProtocol->initialize();
|
||||||
m_vpnProtocol.reset(androidVpnProtocol);
|
m_vpnProtocol.reset(androidVpnProtocol);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue