Closed ITzhangxi closed 2 years ago
What's the use case? Why not set up your own DNS server then?
Hi, I'm glad you can reply to me, thank you. I have built a local DNS service here, which is mainly used for the development of mobile H5 projects on the computer side, and the mobile terminal accesses the project through the domain name in the local area network. The DNS service I built locally uses the lookup function in the dns module, so I want to use your cacheable-lookup to do a layer of performance optimization, but I found that your cacheable-lookup first obtains the remote IP and then obtains the IP from the local hosts. I want to get the IP from the local hosts first, and then get the IP from the remote
The DNS service I built locally uses the lookup function in the dns module,
Why lookup and not actual DNS queries?
so I want to use your cacheable-lookup to do a layer of performance optimization
If you're explicitly relying on lookup in the OS, then I don't think using cacheable-lookup
is a good idea. This was written with TTL in mind.
That's a good idea. Thank you
Thank you for your patience. Thank you
Hello, I have a requirement that the local hosts should be used first and then the IP resolved by DNS service should be used. I see in the code you wrote, queryAndCache should use _resolve4 or _resolve6 first and then Lookup. Controls which parsing mode is preferred