cmd/cli: use powershell to set/reset DNS on Windows

Using netsh command will emit unexpected SOA queries, do not use it.

While at it, also ensure that local ipv6 will be added to nameservers
list on systems that require ipv6 local listener.
This commit is contained in:
Cuong Manh Le
2024-09-18 20:00:37 +07:00
committed by Cuong Manh Le
parent e6586fd360
commit 9cbd9b3e44
3 changed files with 41 additions and 63 deletions
+1
View File
@@ -2661,6 +2661,7 @@ func resetDnsTask(p *prog, s service.Service) task {
iface = runningIface(s)
}
if isCtrldInstalled {
mainLog.Load().Debug().Msg("restore system DNS settings")
resetDnsNoLog(p)
}
iface = oldIface