-
Notifications
You must be signed in to change notification settings - Fork 22
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
Partial node:dns
implementation using DOH (via fetch)
#198
Comments
node:dns
implementation using fetch over DOHnode:dns
implementation using DOH (via fetch)
Interesting! Would there be an opt-out or way to configure? or do you think this should be an opt-in? |
We probably need a runtime way of configuring behavior indeed at least for DOH server. Or are you suggesting to completely opt-out of the feature? (what concerns you have?) |
Privacy and security mainly. Some people might not be comfortable with the polyfill making outbound http calls. Maybe it's not a big deal, but it's definitely unexpected behavior from a polyfill. |
Fair enough we could make an error and show instructions on how to enable DNS. BTW the native functionality also make a network request all the time (and most of the time, hosting providers are in control of DNS) |
True. I'm not totally opposed to this, I think we should just think about the implications a bit because it's definitely unconventional. One way to work around this possible perception of controversy is for workerd to implement this natively. I suspect that most runtimes expose a native DNS API. This implementation could still be used when targeting browsers for example. |
Good point and runtime-native is always the best indeed 👍🏼 Only in that case, the edge is still completely in control of the DNS resolver as is currently in control of resolving fetch URLs so a generic concern remains... Made a poll tweet (BTW this idea is mainly something to explore i have not seen any popular libs need |
I agree that if your code runs in the cloud it doesn't really matter that much if the polyfill makes a fetch request. I was mainly thinking that having your app run locally during dev time and seeing it make these fetch calls could be considered problematic by some. |
According to the tweeter people also tend to prefer opt-in. I guess we can do it per-provider btw. Ie, Cloudflare runtime (i guess :D) already benefits 1.1.1.1 so we could default config in preset. Would it worth to initiate generic discussion about possibility of exposing DNS util from worked runtime natively @IgorMinar ? |
Currently, we fully mock
node:dns
module since it depends on an OS feature however we could implement it using DNS-over-HTTPS.The text was updated successfully, but these errors were encountered: