Revert "Add DoH/DoT options"

This reverts commit 73d9152fa0.
This commit is contained in:
Davide De Rosa 2024-04-16 08:35:39 +02:00
parent c15350fab6
commit 7bebd0c8a0
No known key found for this signature in database
GPG Key ID: A48836171C759F5E
2 changed files with 2 additions and 20 deletions

View File

@ -11,8 +11,6 @@ public struct InterfaceConfiguration {
public var mtu: UInt16?
public var dns = [DNSServer]()
public var dnsSearch = [String]()
public var dnsHTTPSURL: URL?
public var dnsTLSServerName: String?
public init(privateKey: PrivateKey) {
self.privateKey = privateKey
@ -29,8 +27,6 @@ extension InterfaceConfiguration: Equatable {
lhs.listenPort == rhs.listenPort &&
lhs.mtu == rhs.mtu &&
lhs.dns == rhs.dns &&
lhs.dnsSearch == rhs.dnsSearch &&
lhs.dnsHTTPSURL == rhs.dnsHTTPSURL &&
lhs.dnsTLSServerName == rhs.dnsTLSServerName
lhs.dnsSearch == rhs.dnsSearch
}
}

View File

@ -85,25 +85,11 @@ class PacketTunnelSettingsGenerator {
if !tunnelConfiguration.interface.dnsSearch.isEmpty || !tunnelConfiguration.interface.dns.isEmpty {
let dnsServerStrings = tunnelConfiguration.interface.dns.map { $0.stringRepresentation }
let dnsSettings: NEDNSSettings
if let dnsHTTPSURL = tunnelConfiguration.interface.dnsHTTPSURL {
let dohSettings = NEDNSOverHTTPSSettings(servers: dnsServerStrings)
dohSettings.serverURL = dnsHTTPSURL
dnsSettings = dohSettings
} else if let dnsTLSServerName = tunnelConfiguration.interface.dnsTLSServerName {
let dotSettings = NEDNSOverTLSSettings(servers: dnsServerStrings)
dotSettings.serverName = dnsTLSServerName
dnsSettings = dotSettings
} else {
dnsSettings = NEDNSSettings(servers: dnsServerStrings)
}
let dnsSettings = NEDNSSettings(servers: dnsServerStrings)
dnsSettings.searchDomains = tunnelConfiguration.interface.dnsSearch
if !tunnelConfiguration.interface.dns.isEmpty {
dnsSettings.matchDomains = [""] // All DNS queries must first go through the tunnel's DNS
}
networkSettings.dnsSettings = dnsSettings
}