You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to #736, it'd be nice if we had a dns.resolve that queries for all results.
Would the Node core maintainers be amenable to a pr that adds this functionality via c-ares, or should such an addition be delayed until after #1013 has been resolved?
Unless I'm mistaken, resolve returns an array of results for one record type (like A, AAAA, CNAME, MX, etc). I'd like to be able to do a wildcard query, supported by c-ares with the ns_t_any type.
On the other hand, there is the issue that we need to return the rrtype of the various records to the user, but we can't really change the addresses array on dns.resolve to something else. Maybe this special query should live only as resolveAny where we could return an array of objects like
On the other hand, there is the issue that we need to return the rrtype of the various records to the user, but we can't really change the addresses array on dns.resolve to something else.
Correct me if I'm wrong but dns.resolve() already returns differently shaped arrays for different query types, doesn't it? Having ANY records have a different shape doesn't look like an issue to me.
Activity
silverwind commentedon Sep 14, 2015
resolvealready returns an array of results, what's exactly the issue?skeggse commentedon Sep 14, 2015
Unless I'm mistaken,
resolvereturns an array of results for one record type (like A, AAAA, CNAME, MX, etc). I'd like to be able to do a wildcard query, supported by c-ares with thens_t_anytype.silverwind commentedon Sep 14, 2015
Oh, you're talking about the
ANYquery. Well, that'd be indeed something we should support imho.skeggse commentedon Sep 14, 2015
Thoughts on whether we should wait for #1013? Or should I put together a pr?
Edit: er... not sure how #1843 fits into this
silverwind commentedon Sep 14, 2015
Personally, I'd rather see #1843 reviewed, fixed and shipped. @mscdex's call if we should further extend c-ares now.
skeggse commentedon Sep 14, 2015
Sounds good. This isn't super critical for me atm.
mscdex commentedon Sep 14, 2015
Work is still ongoing with the js dns resolver. If it's a simple change and someone wants to add it for c-ares in the meantime, feel free to do so.
silverwind commentedon Sep 24, 2015
This shouldn't be too hard to add.
dns.resolveshould take a new rrtypeANY, and we likely want aresolveAnymethod as well.silverwind commentedon Sep 24, 2015
On the other hand, there is the issue that we need to return the rrtype of the various records to the user, but we can't really change the
addressesarray ondns.resolveto something else. Maybe this special query should live only asresolveAnywhere we could return an array of objects likekulkarniankita commentedon Sep 25, 2015
Is anyone working on adding this? If not, I can work on this. (cc: @jasnell, @silverwind )
kulkarniankita commentedon Oct 3, 2015
Working on this one now. @jasnell @mhdawson
bnoordhuis commentedon Oct 3, 2015
Correct me if I'm wrong but
dns.resolve()already returns differently shaped arrays for different query types, doesn't it? Having ANY records have a different shape doesn't look like an issue to me.25 remaining items
XadillaX commentedon May 21, 2017
@silverwind I'm working on it now at #13137.
dns: add resolveAny support
dns: add resolveAny support
dns: add resolveAny support
dns: add resolveAny support
dns: add resolveAny support