This script automatically updates your Cloudflare DNS record to the current IP, supporting both IPv4 (A) and IPv6 (AAAA) records.
中文 | English
To download and make the script executable:
curl https://raw.githubusercontent.com/SphenHe/cloudflare-api-ddns/dev/cf-ddns.sh > /usr/local/bin/cf-ddns.sh && chmod +x /usr/local/bin/cf-ddns.shcf-ddns.sh
-4|-6 \ # specify IPv4 or IPv6
-a cloudflare-api-token \ # specify Cloudflare API token
-u user@example.com \ # specify Cloudflare email
-h host.example.com \ # FQDN of the record you want to update
-z example.com \ # your domain (zone) -f false(default)|true \ # force DNS update, disregard local stored IPThis project is licensed under the MIT License - see the LICENSE file for details.