Feature: add dhcp type dns client (#1509)

This commit is contained in:
Kr328
2021-09-06 23:07:34 +08:00
committed by GitHub
parent a2d59d6ef5
commit a5b950a779
26 changed files with 759 additions and 288 deletions

View File

@ -488,6 +488,9 @@ func parseNameServer(servers []string) ([]dns.NameServer, error) {
clearURL := url.URL{Scheme: "https", Host: u.Host, Path: u.Path}
addr = clearURL.String()
dnsNetType = "https" // DNS over HTTPS
case "dhcp":
addr = u.Host
dnsNetType = "dhcp" // UDP from DHCP
default:
return nil, fmt.Errorf("DNS NameServer[%d] unsupport scheme: %s", idx, u.Scheme)
}