-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to disable built-in DNS resolver & use system DNS #31
Comments
OMG! Yes, I also was about to make the same feature request! |
is this like the same request as #32 ? |
so, do you guys locally have your own dns severs ? |
should i add an option like --use-system-proxy or what kinda option would it be? |
--use-system-dns would be good for this feature |
i meant it either. just mistyped |
okay, then let me take a look on it |
A simple hack in the meantime. Replace the package doh
import (
dns "github.com/Focinfi/go-dns-resolver"
"errors"
"regexp"
)
func Init() {
dns.Config.SetTimeout(uint(5))
dns.Config.RetryTimes = uint(2)
}
func Lookup(domain string) (string, error) {
ipRegex := "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"
if r, _ := regexp.MatchString(ipRegex, domain); r {
return domain, nil
}
if results, err := dns.Exchange(domain, "127.0.0.1:53", dns.TypeA); err == nil {
if len(results) < 1 {
return "", errors.New(" couldn't resolve the domain")
}
return results[0].Content, nil
} else {
return "", err
}
} N.B. change '127.0.0.1:53' to point to your local DNS server. |
How can I disable DOH and use a local DNS server on port 53? |
Please add an option for this. I too use dnscrpyt-proxy with a custom configuration and blocklist/whitelist and I can't get this and it to work together. Something like a |
For users that already use encrypted DNS resolver like dnscrypt-proxy & stubby
The text was updated successfully, but these errors were encountered: