From e075ba6a76ccfa0cc667a58933fb124c95c1f33d Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Mon, 25 Apr 2022 21:46:16 +0200 Subject: [PATCH] Make DNS servers optional in DoT like in DoH Domain name can actually by an IP address and not require a DNS server to resolve. --- .../TunnelKitOpenVPNAppExtension/OpenVPNTunnelProvider.swift | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Sources/TunnelKitOpenVPNAppExtension/OpenVPNTunnelProvider.swift b/Sources/TunnelKitOpenVPNAppExtension/OpenVPNTunnelProvider.swift index ab654a4..a035f5b 100644 --- a/Sources/TunnelKitOpenVPNAppExtension/OpenVPNTunnelProvider.swift +++ b/Sources/TunnelKitOpenVPNAppExtension/OpenVPNTunnelProvider.swift @@ -661,10 +661,7 @@ extension OpenVPNTunnelProvider: OpenVPNSessionDelegate { log.info("\tHTTPS URL: \(serverURL.maskedDescription)") case .tls: - guard let dnsServers = cfg.configuration.dnsServers else { - session?.shutdown(error: OpenVPNProviderError.dnsFailure) - return - } + dnsServers = cfg.configuration.dnsServers ?? [] guard let serverName = cfg.configuration.dnsTLSServerName else { break }