Use config key for DNS config setting.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
aa92fd7dfc
commit
fc72697d82
|
@ -48,7 +48,7 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
|
||||||
let newSettings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: "149.248.160.60")
|
let newSettings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: "149.248.160.60")
|
||||||
newSettings.ipv4Settings = ipv4Settings
|
newSettings.ipv4Settings = ipv4Settings
|
||||||
newSettings.tunnelOverheadBytes = 80
|
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)}
|
var splitDnsEntries = dns.split(separator: ",").map {String($0)}
|
||||||
let dnsSettings = NEDNSSettings(servers: splitDnsEntries)
|
let dnsSettings = NEDNSSettings(servers: splitDnsEntries)
|
||||||
newSettings.dnsSettings = dnsSettings
|
newSettings.dnsSettings = dnsSettings
|
||||||
|
|
Loading…
Reference in New Issue