Issue #3: Fixed DoH server URL. Moved settings creation to BlocklistOption.
This commit is contained in:
parent
6ca509f7fb
commit
807176f0b5
2 changed files with 10 additions and 17 deletions
|
|
@ -41,23 +41,7 @@ class ViewModel: NSObject, ObservableObject {
|
|||
func toggleDns() {
|
||||
Task {
|
||||
if isDnsEnabled {
|
||||
do {
|
||||
try await manager.loadFromPreferences()
|
||||
}
|
||||
catch {
|
||||
log.error("Error loading preferences: \(error)")
|
||||
|
||||
delayedToggle(false)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
let settings = NEDNSOverHTTPSSettings(servers: [blocklist.ipv4, blocklist.ipv6])
|
||||
settings.serverURL = URL(string: "https://\(blocklist.server)")
|
||||
settings.matchDomains = [""]
|
||||
|
||||
|
||||
manager.dnsSettings = settings
|
||||
manager.dnsSettings = blocklist.settings
|
||||
manager.localizedDescription = blocklist.description
|
||||
|
||||
do {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue