Updated README
This commit is contained in:
1 parent
e8527be64f
commit
87a4484d63
1 file changed
+15
-15
@@ -1,4 +1,4 @@
|
||||
# 🔁 Dynamic DNS Updater for Cloudflare with Mullvad IP
|
||||
# Dynamic DNS Updater for Cloudflare with Mullvad IP
|
||||
|
||||
This script updates A records in Cloudflare with your current public IP as reported by [Mullvad](https://mullvad.net)'s IP check service. It supports:
|
||||
|
||||
@@ -9,17 +9,17 @@ This script updates A records in Cloudflare with your current public IP as repor
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Features
|
||||
## Features
|
||||
|
||||
- ✅ Fetches current public IP from Mullvad API (`https://ipv4.am.i.mullvad.net/json`)
|
||||
- ✅ Uses `.env` files 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`
|
||||
- Fetches current public IP from Mullvad API (`https://ipv4.am.i.mullvad.net/json`)
|
||||
- Uses `.env` files 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`
|
||||
|
||||
---
|
||||
|
||||
## 📁 Project Structure
|
||||
## Project Structure
|
||||
```
|
||||
.
|
||||
├── update_cloudflare_ip.sh # Main script
|
||||
@@ -33,7 +33,7 @@ This script updates A records in Cloudflare with your current public IP as repor
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ Configuration
|
||||
## Configuration
|
||||
|
||||
1. Create a `zones/` folder (already included in repo).
|
||||
2. Add one `.env` file per domain/zone, named descriptively. Example:
|
||||
@@ -49,10 +49,10 @@ DNS_NAME="subdomain.domain.com"
|
||||
|
||||
---
|
||||
|
||||
## ✅ Use Cloudflare API Tokens with permission:
|
||||
## Use Cloudflare API Tokens with permission:
|
||||
Zone → DNS → Edit for the required zone.
|
||||
|
||||
🧪 Usage
|
||||
Usage
|
||||
|
||||
Make the script executable:
|
||||
```
|
||||
@@ -71,7 +71,7 @@ cat logs/update_$(date +%F).log
|
||||
|
||||
---
|
||||
|
||||
## 🕒 Automation (Cron Example)
|
||||
## Automation (Cron Example)
|
||||
|
||||
To run the script every 10 minutes, edit your crontab:
|
||||
```
|
||||
@@ -91,7 +91,7 @@ Or, if you want to keep logs automatically:
|
||||
|
||||
---
|
||||
|
||||
## ✅ Requirements
|
||||
## Requirements
|
||||
|
||||
* bash (scripted for Linux/macOS)
|
||||
* curl
|
||||
@@ -108,7 +108,7 @@ brew install jq
|
||||
|
||||
---
|
||||
|
||||
## 🔐 Security Tip
|
||||
## Security Tip
|
||||
|
||||
Never share your .env files or commit them to public repositories. They contain sensitive credentials.
|
||||
|
||||
@@ -122,7 +122,7 @@ logs/
|
||||
|
||||
---
|
||||
|
||||
## 🙋 FAQ
|
||||
## FAQ
|
||||
|
||||
Q: What happens if the IP hasn't changed?
|
||||
A: The script detects it and skips the update.
|
||||
|
||||
Reference in new issue
Block a user