undici
undici copied to clipboard
Feature request: allow a custom dns lookup function to be supplied
The http
built-in module can have a custom lookup
function defined, which is great as it enables applications to decide if they want to implement a dns-caching system or something else.
Do we think it is a good idea to also implement such a feature for undici?
Sure, would you like to send a PR?
Would this be the correct change?
Make these net.connect
calls take a custom lookup function and default to dns.lookup otherwise?
https://github.com/nodejs/undici/blob/2b56a548083d9bc44f89962459ee6325c38742d5/lib/core/client.js#L871
Are these other places that would need to be updated also?
I think this could be resolved through https://github.com/nodejs/undici/issues/852