From ff64ef79f16cb0379c0a7e68b254955b550b89d6 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Fri, 23 Nov 2018 13:04:55 +0530 Subject: [PATCH] NE: All DNS queries must first go through the VPN's DNS servers --- .../PacketTunnelSettingsGenerator.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WireGuard/WireGuardNetworkExtension/PacketTunnelSettingsGenerator.swift b/WireGuard/WireGuardNetworkExtension/PacketTunnelSettingsGenerator.swift index d26d802..4007196 100644 --- a/WireGuard/WireGuardNetworkExtension/PacketTunnelSettingsGenerator.swift +++ b/WireGuard/WireGuardNetworkExtension/PacketTunnelSettingsGenerator.swift @@ -75,7 +75,9 @@ class PacketTunnelSettingsGenerator { // DNS let dnsServerStrings = tunnelConfiguration.interface.dns.map { $0.stringRepresentation() } - networkSettings.dnsSettings = NEDNSSettings(servers: dnsServerStrings) + let dnsSettings = NEDNSSettings(servers: dnsServerStrings) + dnsSettings.matchDomains = [""] // All DNS queries must first go through the VPN's DNS + networkSettings.dnsSettings = dnsSettings // MTU