Skip to content
This repository was archived by the owner on Aug 24, 2022. It is now read-only.

Improper DIG Error Handling For IPv4 #92

@Perplex

Description

@Perplex

Running the following DIG commands from getPublicIpAddress() results in connection time out errors:

$dig +short @1.1.1.1 ch txt whoami.cloudflare +time=3
;; connection timed out; no servers could be reached

$dig +short myip.opendns.com @resolver1.opendns.com +time=3
;; connection timed out; no servers could be reached

Which then translates into update errors:

ERROR: Failed to update CloudFlare DNS record <example>.com from <OLD> to ;; connection timed out; no servers could be reached

The timeouts aren't related to this repo but the error handling does appear to be faulty. After failing the two DIG commands it should fall back to curl -sf4 https://ipinfo.io | jq -r '.ip' (which does work still), but never does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions