Skip to content
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

Allow providing a custom DNS resolver #26

Open
gnuletik opened this issue Nov 17, 2023 · 1 comment · May be fixed by #27
Open

Allow providing a custom DNS resolver #26

gnuletik opened this issue Nov 17, 2023 · 1 comment · May be fixed by #27

Comments

@gnuletik
Copy link

gnuletik commented Nov 17, 2023

A new resolver is created at the start of the LookupIP and LookupASN functions.

var r net.Resolver

Would it be possible to provide a custom resolver in the following way?

client := ipisp.NewClient(&net.Resolver{})
client.LookupIP(...)
client.LookupASN(...)
@ammario
Copy link
Owner

ammario commented Nov 17, 2023

I see the value in that. We could follow suit of net/http and have package-level methods that use a DefaultDNSClient but then give users the ability to specify their own. Unfortunately I don't have time to work on this right now but I welcome contributions.

@babariviere babariviere linked a pull request Nov 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants