Merge pull request #1192 from amnezia-vpn/bugfix/awg-wg-routes-vpnconnection

bugfix/removed adding routes in vpnconnection class for awg and wg protocols
This commit is contained in:
pokamest 2024-10-24 14:11:26 +01:00 committed by GitHub
commit 3bf9c10d7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,14 +56,15 @@ void VpnConnection::onConnectionStateChanged(Vpn::ConnectionState state)
{ {
#ifdef AMNEZIA_DESKTOP #ifdef AMNEZIA_DESKTOP
QString proto = m_settings->defaultContainerName(m_settings->defaultServerIndex()); auto container = m_settings->defaultContainer(m_settings->defaultServerIndex());
if (IpcClient::Interface()) { if (IpcClient::Interface()) {
if (state == Vpn::ConnectionState::Connected) { if (state == Vpn::ConnectionState::Connected) {
IpcClient::Interface()->resetIpStack(); IpcClient::Interface()->resetIpStack();
IpcClient::Interface()->flushDns(); IpcClient::Interface()->flushDns();
if (!m_vpnConfiguration.value(config_key::configVersion).toInt()) { if (!m_vpnConfiguration.value(config_key::configVersion).toInt() && container != DockerContainer::Awg
&& container != DockerContainer::WireGuard) {
QString dns1 = m_vpnConfiguration.value(config_key::dns1).toString(); QString dns1 = m_vpnConfiguration.value(config_key::dns1).toString();
QString dns2 = m_vpnConfiguration.value(config_key::dns2).toString(); QString dns2 = m_vpnConfiguration.value(config_key::dns2).toString();