-
Notifications
You must be signed in to change notification settings - Fork 55
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
Create DNS resolve tool #102
Conversation
Usage: resolve [flags...] <domain> | ||
-resolver string | ||
The address of the recursive DNS resolver to use in host:port format. If the port is missing, it's assumed to be 53 | ||
-tcp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any instances where-tcp
wouldn't make sense? Like if we were to add DoH, would this become redundant? I only ask because maybe a better interface would be some kind of enum, so users can't pass in ambiguous states like -tcp -https
for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, -tcp wouldn't make sense for DoH/DoT. However, for now I'm just considering standard DNS.
I'm building up to something that can support multiple solutions. I'm trying to do it in a way that we can reuse the standard Resolver, so we can piggyback on the standard Dialer (which takes a Resolver). I'm not sure we can use DoH and reuse the standard Dialer, because Resolver is not that configurable, so we may need to reimplement a lot of the Dialer logic to use DoH.
For now, I've decided to punt on those complexities and stick to standard DNS, and we can revisit in a following step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll note, however, that this implementation supports DoT if we force TCP and add a TLS transport that allows us to set the alpn to dot
, since the plaintext wire format is the same as DNS over TCP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, so basically whatever supports DoH would effectively wrap this (as the scope is standard DNS), making my concern that the interface here could later break a non-issue.
This helps me test things in remote proxies. See the README.