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

DNS lookup attempts for IP hostnames #488

Open
JustAnotherArchivist opened this issue Aug 21, 2024 · 0 comments
Open

DNS lookup attempts for IP hostnames #488

JustAnotherArchivist opened this issue Aug 21, 2024 · 0 comments
Labels

Comments

@JustAnotherArchivist
Copy link
Contributor

When fetching from an IP URL, wpull still performs a DNS lookup. This can be seen in the verbose log output (Lookup address):

$ wpull --debug --tries 1 http://127.0.0.1/
[...]
INFO Fetching ‘http://127.0.0.1/’.
DEBUG Client fetch request <Request(GET, http://127.0.0.1/, HTTP/1.1)>.
DEBUG Check out ('127.0.0.1', 80, False)
DEBUG Lookup address 127.0.0.1.
DEBUG Get item from source
DEBUG Resolved addresses: [_AddressInfo(ip_address='127.0.0.1', family=<AddressFamily.AF_INET: 2>, flow_info=None, scope_id=None)].
[...]

Notably, this appears to attempt an actual lookup over the network with dnspython. I only noticed this because I happened to be on a network where most traffic was being dropped (not refused or similar, just silently dropped, à la iptables DROP policy), including DNS. This caused wpull to hang on the DNS lookup until the timeout failed the retrieval.

wpull should obviously not be doing DNS lookups for IPs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant