From 0e23b3a1ac077aaf0913cbf7a45f8c76fc0dafd3 Mon Sep 17 00:00:00 2001 From: Mykola Baibuz Date: Wed, 25 Oct 2023 22:19:07 +0300 Subject: [PATCH] Allow traffic to Amezia DNS for all OS --- client/mozilla/localsocketcontroller.cpp | 8 -------- client/vpnconnection.cpp | 5 +++++ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/client/mozilla/localsocketcontroller.cpp b/client/mozilla/localsocketcontroller.cpp index db9f9663..56178eeb 100644 --- a/client/mozilla/localsocketcontroller.cpp +++ b/client/mozilla/localsocketcontroller.cpp @@ -199,14 +199,6 @@ void LocalSocketController::activate(const QJsonObject &rawConfig) { jsAllowedIPAddesses.append(range); } } - - // Allow access to Amnezia DNS - QJsonObject range_ipv4; - range_ipv4.insert("address", amnezia::protocols::dns::amneziaDnsIp); - range_ipv4.insert("range", 32); - range_ipv4.insert("isIpv6", false); - jsAllowedIPAddesses.append(range_ipv4); - } } diff --git a/client/vpnconnection.cpp b/client/vpnconnection.cpp index 878a1cde..dea40f24 100644 --- a/client/vpnconnection.cpp +++ b/client/vpnconnection.cpp @@ -375,6 +375,11 @@ void VpnConnection::appendSplitTunnelingConfig() sitesJsonArray.append(site); } + // Allow traffic to Amezia DNS + if (routeMode == Settings::VpnOnlyForwardSites){ + sitesJsonArray.append(amnezia::protocols::dns::amneziaDnsIp); + } + m_vpnConfiguration.insert(config_key::splitTunnelType, routeMode); m_vpnConfiguration.insert(config_key::splitTunnelSites, sitesJsonArray); }