TimothyYe / godns

A dynamic DNS client tool that supports AliDNS, Cloudflare, Google Domains, DNSPod, HE.net & DuckDNS & DreamHost, etc, written in Go.
https://timothyye.github.io/godns/
Apache License 2.0
1.51k stars 224 forks source link

Replaced cached IP with remote resolver #60

Closed ebastos closed 4 years ago

ebastos commented 4 years ago

When using a locally cached last known IP we can get in a situation where a DNS entry is updated outside of our script. This will lead godns to think the entry is still OK, while in reality the public internet is seeing a different address.

I proposed to use an external resolver to check the current publicly known address.

Only implemented on the Google handler for now. If you like the idea I can send a follow-up PR for the other ones.

TimothyYe commented 4 years ago

Good solution @ebastos , really appreciate it!