DNS Resolver options

111 views
Skip to first unread message

Pushkar

unread,
Oct 11, 2017, 4:45:38 PM10/11/17
to golang-nuts
Hello,
I would like to control the dns lookup timeout, the number of retries and also the ability to use TCP for the DNS resolution.
I am from the C/C++ world and c-ares has options to control these.
I am not findiing either of these as options in the go net package.
Am I not looking in the right place or is there a package that I should use.
Thanks,
pushkar

Dave Cheney

unread,
Oct 11, 2017, 4:58:47 PM10/11/17
to golang-nuts

Pushkar

unread,
Oct 11, 2017, 5:32:07 PM10/11/17
to golang-nuts
Thanks Dave. I am aware of that repo but it doesn't provide an abstraction of the resolver functionality.
I found https://github.com/bogdanovich/dns_resolver which is written using miekg/dns. It is lacking some of the options that libraries like c-ares have (using TCP and controlling timeout).
I think I can extend it by figuring out how to force a TCP query and timeout the query, but wanted to check with the group if I am overlooking something.

On Wednesday, October 11, 2017 at 1:58:47 PM UTC-7, Dave Cheney wrote:
Try https://github.com/miekg/dns
Reply all
Reply to author
Forward
0 new messages