feat(dns): use system nameservers from /etc/resolv.conf as fallback
When no forwarder or dns metadata is configured, the DNS handler now reads system nameservers from /etc/resolv.conf (Unix) before falling back to the hardcoded 127.0.0.1:53 default. This makes the DNS proxy work out-of-the-box without requiring explicit DNS server configuration. Fixes go-gost/gost#89
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package dns
|
||||
|
||||
// systemNameservers returns nil on Windows because reading the system DNS
|
||||
// configuration requires the Windows IP Helper API. Callers should fall
|
||||
// back to the hardcoded default when this returns nil.
|
||||
func systemNameservers() []string {
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user