feat: Handle nameserver parsing on Windows

* system default nameserver in windows

* change
This commit is contained in:
huangnauh 2021-01-20 18:02:15 +08:00 committed by GitHub
parent 250591098b
commit 3019f1cee6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 166 additions and 18 deletions

9
pkg/config/config.go Normal file
View file

@ -0,0 +1,9 @@
package config
import "net"
// the whole `FEC0::/10` prefix is deprecated.
// [RFC 3879]: https://tools.ietf.org/html/rfc3879
func isUnicastLinkLocal(ip net.IP) bool {
return len(ip) == net.IPv6len && ip[0] == 0xfe && ip[1] == 0xc0
}