Support DoH/DoT network settings in WireGuard profiles (#264)
This commit is contained in:
parent
17ae9793df
commit
8d0fb5c9b5
|
@ -13,9 +13,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Ukranian translations (Dmitry Chirkin). [#243](https://github.com/passepartoutvpn/passepartout-apple/pull/243)
|
||||
- Restore DNS "Domain" setting. [#260](https://github.com/passepartoutvpn/passepartout-apple/pull/260)
|
||||
- OpenVPN: Full implementation of Tunnelblick XOR patch (tmthecoder). [#245](https://github.com/passepartoutvpn/passepartout-apple/pull/245), [tunnelkit#255][https://github.com/passepartoutvpn/tunnelkit/pull/255]
|
||||
- WireGuard: DoH/DoT options. [#264](https://github.com/passepartoutvpn/passepartout-apple/pull/264)
|
||||
|
||||
### Changed
|
||||
|
||||
- Bump targets to iOS 15 / macOS 12.
|
||||
- Move Diagnostics view to Profile bottom. [#261](https://github.com/passepartoutvpn/passepartout-apple/pull/261)
|
||||
|
||||
### Fixed
|
||||
|
|
|
@ -1756,8 +1756,8 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
MACOSX_DEPLOYMENT_TARGET = 11.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
||||
MACOSX_DEPLOYMENT_TARGET = 12.0;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
|
@ -1817,8 +1817,8 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
MACOSX_DEPLOYMENT_TARGET = 11.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
||||
MACOSX_DEPLOYMENT_TARGET = 12.0;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
"repositoryURL": "https://github.com/passepartoutvpn/tunnelkit",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "e0c0cc137fbceea6970d226445afa79a7903881c",
|
||||
"revision": "7ce254be0293ba7e1eeda07a3701804de59f7490",
|
||||
"version": null
|
||||
}
|
||||
},
|
||||
|
@ -60,8 +60,8 @@
|
|||
"repositoryURL": "https://github.com/passepartoutvpn/wireguard-apple",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "d3b8f1ac6f3361d69bd3daf8aee3c43012c6ec0b",
|
||||
"version": "1.0.16"
|
||||
"revision": "73d9152fa0cb661db0348a1ac11dbbf998422a50",
|
||||
"version": null
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// swift-tools-version:5.3
|
||||
// swift-tools-version:5.5
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
|
||||
import PackageDescription
|
||||
|
@ -6,7 +6,7 @@ import PackageDescription
|
|||
let package = Package(
|
||||
name: "PassepartoutLibrary",
|
||||
platforms: [
|
||||
.iOS(.v14), .macOS(.v11)
|
||||
.iOS(.v15), .macOS(.v12)
|
||||
],
|
||||
products: [
|
||||
// Products define the executables and libraries a package produces, and make them visible to other packages.
|
||||
|
@ -24,7 +24,7 @@ let package = Package(
|
|||
// Dependencies declare other packages that this package depends on.
|
||||
// .package(url: /* package url */, from: "1.0.0"),
|
||||
// .package(name: "TunnelKit", url: "https://github.com/passepartoutvpn/tunnelkit", from: "5.0.0"),
|
||||
.package(name: "TunnelKit", url: "https://github.com/passepartoutvpn/tunnelkit", .revision("e0c0cc137fbceea6970d226445afa79a7903881c")),
|
||||
.package(name: "TunnelKit", url: "https://github.com/passepartoutvpn/tunnelkit", .revision("7ce254be0293ba7e1eeda07a3701804de59f7490")),
|
||||
// .package(name: "TunnelKit", path: "../../tunnelkit"),
|
||||
.package(url: "https://github.com/zoul/generic-json-swift", from: "2.0.0"),
|
||||
.package(url: "https://github.com/SwiftyBeaver/SwiftyBeaver", from: "1.9.0")
|
||||
|
@ -47,12 +47,18 @@ let package = Package(
|
|||
name: "PassepartoutProfiles",
|
||||
dependencies: [
|
||||
"PassepartoutProviders"
|
||||
],
|
||||
resources: [
|
||||
.process("DataModels/Profiles.xcdatamodeld")
|
||||
]),
|
||||
.target(
|
||||
name: "PassepartoutProviders",
|
||||
dependencies: [
|
||||
"PassepartoutCore",
|
||||
"PassepartoutServices"
|
||||
],
|
||||
resources: [
|
||||
.process("DataModels/Providers.xcdatamodeld")
|
||||
]),
|
||||
.target(
|
||||
name: "PassepartoutCore",
|
||||
|
|
|
@ -46,11 +46,11 @@ extension Profile.WireGuardSettings: DNSSettingsProviding {
|
|||
}
|
||||
|
||||
public var dnsHTTPSURL: URL? {
|
||||
nil
|
||||
configuration.dnsHTTPSURL
|
||||
}
|
||||
|
||||
public var dnsTLSServerName: String? {
|
||||
nil
|
||||
configuration.dnsTLSServerName
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ extension Network.DNSSettings {
|
|||
return [.plain, .https, .tls, .disabled]
|
||||
|
||||
case .wireGuard:
|
||||
return [.plain, .disabled]
|
||||
return [.plain, .https, .tls, .disabled]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,12 +104,15 @@ extension WireGuard.ConfigurationBuilder {
|
|||
}
|
||||
dnsSearchDomains = allDomains.filter { !$0.isEmpty }
|
||||
|
||||
case .https:
|
||||
dnsHTTPSURL = settings.dnsHTTPSURL
|
||||
|
||||
case .tls:
|
||||
dnsTLSServerName = settings.dnsTLSServerName
|
||||
|
||||
case .disabled:
|
||||
dnsServers = []
|
||||
dnsSearchDomains = []
|
||||
|
||||
default:
|
||||
fatalError("Invalid DNS configuration for WireGuard: \(settings.configurationType)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue