()
| 8 | ) |
| 9 | |
| 10 | func 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 | |
| 22 | func SetDNS(dns string, port uint16) error { |
| 23 | if port != 53 { |
no test coverage detected