mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-12 20:31:17 +08:00
fix redundant WindowsDNS (#1456)
Co-authored-by: ForestL <45709305+forestl18@users.noreply.github.com>
This commit is contained in:
parent
ba605b693b
commit
512d188384
@ -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())
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user