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

Specify nameservers directly #18

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

ardigan6
Copy link

Radically faster than using a local resolver in most cases.

Note: this should really be set per-provider, but looks like the minimal change is just to pass through to the resolver class.

self.host = host
self.ns = ns
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As i understand there is no effect of specifying ns for Provider in the scope of this PR?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this was used in other code not included.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still cant figure out how ns affects resolver

@@ -101,7 +103,7 @@ def __init__(self, providers=BASE_PROVIDERS, timeout=5,
asyncio.set_event_loop(self._loop)
else:
self._loop = loop
self._resolver = aiodns.DNSResolver(timeout=timeout, tries=tries, loop=self._loop)
self._resolver = aiodns.DNSResolver(timeout=timeout, tries=tries, loop=self._loop, nameservers=ns)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine, but there is questions on the other part of this PR

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 this pull request may close these issues.

2 participants