MCPcopy
hub / github.com/nextdns/nextdns / DNS

Function DNS

host/dns_darwin.go:10–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8)
9
10func DNS() []string {
11 b, err := exec.Command("ipconfig", "getoption", "", "domain_name_server").Output()
12 if err != nil {
13 return nil
14 }
15 b = bytes.TrimSpace(b)
16 if len(b) == 0 {
17 return nil
18 }
19 return []string{string(b)}
20}
21
22func SetDNS(dns string, port uint16) error {
23 if port != 53 {

Callers 2

nextdnsEndpointManagerFunction · 0.92
initMethod · 0.92

Calls 1

CommandMethod · 0.80

Tested by

no test coverage detected