googleDNS icon indicating copy to clipboard operation
googleDNS copied to clipboard

Minor improvements to the updater.sh script

Open tytso opened this issue 1 year ago • 0 comments

Allow the user to configure the updater.sh without having to modify a git-tracked file (~/.config/googleDNS). To keep things easy for users, also look for a config file in the source directory. This is under source code control, but since it's in a separate file, it's unlikely to cause source code conflicts.

Also allow the user to override the command to get the public IP address; it turns out that if you are using a VPN, DNS-based mechanisms don't work. But using something like "curl -s https://v4.ident.me" might be easier for an attacker to spoof, and these URL's are subject to change. So leave the default to a DNS lookup of myip.opendns.com. but make it easy for the user to override.

Finally, if the IP address hasn't changed, skip sending an update to GoogleDNS. This means we won't be sending a https update to Google every five minutes.

tytso avatar Dec 17 '23 00:12 tytso