mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
fix redundant WindowsDNS (#1456)
Some checks are pending
Trigger CMFA Update / trigger-CMFA-update (push) Waiting to run
Some checks are pending
Trigger CMFA Update / trigger-CMFA-update (push) Waiting to run
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