mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
fix redundant WindowsDNS (#1456)
Co-authored-by: ForestL <45709305+forestl18@users.noreply.github.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/exp/slices"
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
@@ -40,6 +41,9 @@ func dnsReadConfig() (servers []string, err error) {
|
||||
// Unexpected type.
|
||||
continue
|
||||
}
|
||||
if slices.Contains(servers, ip.String()) {
|
||||
continue
|
||||
}
|
||||
servers = append(servers, ip.String())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user