enkore / i3pystatus

A complete replacement for i3status
https://i3pystatus.readthedocs.io/
MIT License
445 stars 188 forks source link

i3pystatus.core.util.internet doesn't work when port 53 is firewalled #718

Closed terminalmage closed 5 years ago

terminalmage commented 5 years ago

Since this attempts to connect to not only A) resolve google-public-dns-a.google.com, and B) connect to it on port 53, it does not work when DNS servers are restricted by firewall policy. I'm opening this issue to get ideas on how we can improve this check.

Is there a specific reason that port 53 is being used? If we're already resolving an outside host, why not try port 80 or 443 instead, since those are much less likely to be firewalled?

EDIT: I've changed the address tuple to ('google.com', 80) locally and it's working fine. @enkore if this is an acceptable change I can open a pull request.

enkore commented 5 years ago

Sure, firewalling google off would be less "common" I suppose

terminalmage commented 5 years ago

Yeah, doesn't have to be google, but outbound 80 and 443 are less likely to be firewalled in general.