byobu icon indicating copy to clipboard operation
byobu copied to clipboard

Use OpenDNS instead of the slow ipv6-test.com API

Open MechMK1 opened this issue 5 years ago • 7 comments

Grabbing my external IPv4 address didn't work for me with the default setup, because IPv4 was horrendously slow (causing it to timeout every time), whereas OpenDNS was near-instant.

MechMK1 avatar Sep 24 '19 09:09 MechMK1

doesn't seem to always answer. tried in 3 places, 2 of them failed.

glensc avatar Nov 16 '19 20:11 glensc

doesn't seem to always answer. tried in 3 places, 2 of them failed.

It's weird, I had that problem with ipv6-test.com, and opendns worked fine for me. It could be a temprary outage as well?

MechMK1 avatar Nov 16 '19 20:11 MechMK1

it does not seem temporary problem. home dsl works 100%, other permenent line connections fail 100%, also i think may have more firewall related issues than http. because direct connection to dns servers are not always not allowed. your command forces to use resolver1.opendns.com udp/53

examples:

➔ time timeout 1 dig myip.opendns.com @resolver1.opendns.com +short
x.y.z.c

real	0m0.065s
user	0m0.004s
sys	0m0.009s
➔ time dig myip.opendns.com @resolver1.opendns.com +short

real    0m0.018s
user    0m0.003s
sys     0m0.007s
$ time dig myip.opendns.com @resolver1.opendns.com +short

; <<>> DiG 9.14.6 <<>> myip.opendns.com @resolver1.opendns.com +short
;; global options: +cmd
;; connection timed out; no servers could be reached

real    0m18.011s
user    0m0.006s
sys     0m0.005s

glensc avatar Nov 16 '19 21:11 glensc

It never occured to me that direct communication to DNS servers could be an issue, but that is indeed troublesome.

I guess the best way would be to implement several ways and iterate through them, picking the best possible method, but that's way outside the scope of my PR.

MechMK1 avatar Nov 16 '19 21:11 MechMK1

Thanks for this. But I think we're going to need something more robust...

dustinkirkland avatar Nov 29 '19 21:11 dustinkirkland

I understand. I didn't expect DNS queries to be a problem. Perhaps offering it as an alternative via a config option could work? I'll see what I can do

MechMK1 avatar Nov 30 '19 08:11 MechMK1

If it's useful, Cloudflare DNS is a solid option, reliable and fast. Resolvers:

1.1.1.1
1.0.0.1
2606:4700:4700::1111
2606:4700:4700::1001

paulocoghi avatar Nov 11 '21 17:11 paulocoghi