From 551e57dcd70850ae3a73362957f04a129d8d0d4f Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Thu, 11 Feb 2021 17:39:07 +0100 Subject: [PATCH] Fix missing DNS servers fields in DoH Also fix servers list not saved in DoH/DoT in general. Fixes #171 --- Passepartout/App/iOS/CHANGELOG.md | 6 ++++++ .../App/iOS/Scenes/NetworkSettingsViewController.swift | 8 +------- Passepartout/App/macOS/CHANGELOG.md | 6 ++++++ .../Scenes/Service/Customization/DNSViewController.swift | 6 ++---- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Passepartout/App/iOS/CHANGELOG.md b/Passepartout/App/iOS/CHANGELOG.md index eb5aaa32..0dc1a7c8 100644 --- a/Passepartout/App/iOS/CHANGELOG.md +++ b/Passepartout/App/iOS/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Fixed + +- No way to set DNS servers when using DNS over HTTPS. [#171](https://github.com/passepartoutvpn/passepartout-apple/issues/171) + ## 1.15.0 (2021-02-09) ### Added diff --git a/Passepartout/App/iOS/Scenes/NetworkSettingsViewController.swift b/Passepartout/App/iOS/Scenes/NetworkSettingsViewController.swift index 538e0da2..6d1208e0 100644 --- a/Passepartout/App/iOS/Scenes/NetworkSettingsViewController.swift +++ b/Passepartout/App/iOS/Scenes/NetworkSettingsViewController.swift @@ -79,13 +79,7 @@ class NetworkSettingsViewController: UITableViewController { } if networkChoices.dns != .server { sections.append(.manualDNSProtocol) - switch networkSettings.dnsProtocol { - case .https: - break - - default: - sections.append(.manualDNSServers) - } + sections.append(.manualDNSServers) sections.append(.manualDNSDomains) } if networkChoices.proxy != .server { diff --git a/Passepartout/App/macOS/CHANGELOG.md b/Passepartout/App/macOS/CHANGELOG.md index dc01a79a..460d37b5 100644 --- a/Passepartout/App/macOS/CHANGELOG.md +++ b/Passepartout/App/macOS/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Fixed + +- No way to set DNS servers when using DNS over HTTPS. [#171](https://github.com/passepartoutvpn/passepartout-apple/issues/171) + ## 1.15.0 (2021-02-09) ### Added diff --git a/Passepartout/App/macOS/Scenes/Service/Customization/DNSViewController.swift b/Passepartout/App/macOS/Scenes/Service/Customization/DNSViewController.swift index ec92e947..ff1be4ee 100644 --- a/Passepartout/App/macOS/Scenes/Service/Customization/DNSViewController.swift +++ b/Passepartout/App/macOS/Scenes/Service/Customization/DNSViewController.swift @@ -162,8 +162,9 @@ class DNSViewController: NSViewController, ProfileCustomization { networkSettings.dnsTLSServerName = textDNSCustom.stringValue default: - networkSettings.dnsServers = tableDNSAddresses.rows + break } + networkSettings.dnsServers = tableDNSAddresses.rows networkSettings.dnsSearchDomains = tableDNSDomains.rows delegate?.profileCustomization(self, didUpdateDNS: .manual, withManualSettings: networkSettings) @@ -209,17 +210,14 @@ class DNSViewController: NSViewController, ProfileCustomization { textDNSCustom.placeholderString = isManual ? AppConstants.Placeholders.dohURL : "" textDNSCustom.stringValue = networkSettings.dnsHTTPSURL?.absoluteString ?? "" textDNSCustom.isHidden = false - viewDNSAddresses.isHidden = true case .tls: textDNSCustom.placeholderString = isManual ? AppConstants.Placeholders.dotServerName : "" textDNSCustom.stringValue = networkSettings.dnsTLSServerName ?? "" textDNSCustom.isHidden = false - viewDNSAddresses.isHidden = false default: textDNSCustom.isHidden = true - viewDNSAddresses.isHidden = false } } }