-
released this
2025-10-05 21:21:52 +00:00 | 1 commits to main since this releaseForgot to remove -H "X-Auth-Email: $CLOUDFLARE_EMAIL" from script so the curl requests would fail.
Downloads
-
released this
2025-10-05 21:09:33 +00:00 | 2 commits to main since this release1. Error Handling for Mullvad IP Fetch:
- Adds || { log "[!] Failed to fetch IP from Mullvad"; exit 1; } immediately after the curl command to catch curl failures explicitly.
2. Cloudflare Authentication Method:
- Switches to using Authorization: Bearer $CLOUDFLARE_API_KEY header for authentication, which is the preferred modern approach.
3. Required Environment Variables:
- Only requires ZONE_ID, DNS_NAME, and CLOUDFLARE_API_KEY. CLOUDFLARE_EMAIL is no longer mandatory for missing variable checks, but it's still used in some API calls.
4. Curl Exit Code Checks:
- Checks curl exit codes explicitly after each API call (GET, POST, and PATCH) and logs errors when curl fails.
5. Curl Headers Ordering and Content:
- The Authorization: Bearer header replaces X-Auth-Key in all API calls except the POST and PATCH, where both X-Auth-Email and Authorization coexist.
6. Curl Data Payload Ordering and Content:
- The order of fields in JSON payload has changed slightly (e.g., "name" before "ttl"), and the comment for creation and update changed from "Created via script"/"Updated via script" to "Domain verification record".
7. Additional Logging on Curl Failures:
- Adds detailed logging of curl failure responses and exit codes.
8. General Code Formatting and Minor Style Tweaks:
-
Minor changes in spacing and ordering of JSON fields.
-
Removal of some unnecessary blank lines.
-
Slight restructuring of error continuation logic.
Downloads
-
1.2 Stable
released this
2025-10-05 20:11:01 +00:00 | 3 commits to main since this releaseRelease Notes / Commit Message
Improvements:
Enhanced error handling and script robustness:
-
Added set -euo pipefail for stricter error handling and detection of undefined variables and pipeline failures.
-
Validates presence of required CLI tools (curl and jq) before execution.
-
Checks for the presence of .env files before processing to avoid errors if none are found.
-
Validates Mullvad API JSON response more robustly to detect missing or invalid IP information.
Improved environment variable management:
-
Switched from sourcing DNS_RECORD_ID to dynamically fetching the DNS record ID via Cloudflare API based on DNS_NAME.
-
Clearly logs missing required environment variables per .env file, specifying exactly which are missing.
Cloudflare API usage improvements:
-
Updated DNS record creation with POST request including correct headers (X-Auth-Email and X-Auth-Key).
-
Changed DNS record updates to use PATCH method instead of PUT, as per Cloudflare best practices.
-
Added support to create DNS records if they do not already exist, improving automation and flexibility.
-
Uses JSON data strings consistently and safely with proper quoting.
Logging enhancements:
-
Improved log messages for clarity on each step, including when no updates are needed.
-
Logs Cloudflare API responses on failure for easier debugging.
Downloads
-
-
v1.1 Stable
released this
2025-10-05 19:23:19 +00:00 | 4 commits to main since this releaseDynamic DNS Updater for Cloudflare with Mullvad IP
This script updates A records in Cloudflare with your current public IP as reported by Mullvad's IP check service. It supports:
- Multiple domains/zones via
.envfiles - Secure API access using Cloudflare API Tokens
- Smart updates: only changes DNS if your IP has changed
- Daily logging to
./logs/
Features
- Fetches current public IP from Mullvad API (
https://ipv4.am.i.mullvad.net/json) - Uses
.envfiles to manage multiple Cloudflare DNS records - Supports API Tokens (safer than global keys)
- Skips unnecessary updates if IP hasn't changed
- Logs every run to
logs/update_YYYY-MM-DD.log
Downloads
- Multiple domains/zones via