From 013a75eda6fa3a5d7087832763cec06920c4718e Mon Sep 17 00:00:00 2001 From: Jeroen Leenarts Date: Mon, 13 Aug 2018 13:48:43 +0200 Subject: [PATCH] Use config key for DNS config setting. --- WireGuardNetworkExtension/PacketTunnelProvider.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WireGuardNetworkExtension/PacketTunnelProvider.swift b/WireGuardNetworkExtension/PacketTunnelProvider.swift index ccbf120..a86bad2 100644 --- a/WireGuardNetworkExtension/PacketTunnelProvider.swift +++ b/WireGuardNetworkExtension/PacketTunnelProvider.swift @@ -48,7 +48,7 @@ class PacketTunnelProvider: NEPacketTunnelProvider { let newSettings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: "149.248.160.60") newSettings.ipv4Settings = ipv4Settings newSettings.tunnelOverheadBytes = 80 - if let dns = config.providerConfiguration?["dns"] as? String { + if let dns = config.providerConfiguration?[PCKeys.dns.rawValue] as? String { var splitDnsEntries = dns.split(separator: ",").map {String($0)} let dnsSettings = NEDNSSettings(servers: splitDnsEntries) newSettings.dnsSettings = dnsSettings