File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed
PassepartoutLibrary/Sources/PassepartoutVPN/Extensions Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -94,8 +94,23 @@ extension WireGuard.ConfigurationBuilder {
94
94
break
95
95
96
96
case . manual:
97
+ let isDNSEnabled = settings. configurationType != . disabled
98
+
97
99
switch settings. configurationType {
98
100
case . plain:
101
+ break
102
+
103
+ case . https:
104
+ dnsHTTPSURL = settings. dnsHTTPSURL
105
+
106
+ case . tls:
107
+ dnsTLSServerName = settings. dnsTLSServerName
108
+
109
+ case . disabled:
110
+ break
111
+ }
112
+
113
+ if isDNSEnabled {
99
114
dnsServers = settings. dnsServers ?? [ ]
100
115
var allDomains : [ String ] = [ ]
101
116
if let domain = settings. dnsDomain {
@@ -105,14 +120,7 @@ extension WireGuard.ConfigurationBuilder {
105
120
allDomains. append ( contentsOf: searchDomains)
106
121
}
107
122
dnsSearchDomains = allDomains. filter { !$0. isEmpty }
108
-
109
- case . https:
110
- dnsHTTPSURL = settings. dnsHTTPSURL
111
-
112
- case . tls:
113
- dnsTLSServerName = settings. dnsTLSServerName
114
-
115
- case . disabled:
123
+ } else {
116
124
dnsServers = [ ]
117
125
dnsSearchDomains = [ ]
118
126
}
You can’t perform that action at this time.
0 commit comments