HorlogeSkynet / archey4

:computer: Maintained fork of the original Archey (Linux) system tool
https://git.io/archey4
GNU General Public License v3.0
291 stars 37 forks source link

[WAN_IP] Fall back to HTTP properly on DNS connection errors #134

Closed ingrinder closed 1 year ago

ingrinder commented 1 year ago

Description

This is just a small change so that if dig returns a nonzero exit code, then we don't immediately return None as the IP.

Reason and / or context

For example on my home network I block outgoing port 53: image As you see in this case archey fails to get the IP with the default settings and doesn't fall back to the configured HTTP URL :frowning_face:

How has this been tested ?

It now gets my IP and passes the additional test case I added

Types of changes :

Checklist :