1 parent
cefe165e20
commit
40dfc09560
2 files changed
+105
-19
No files matched your search
@@ -7,22 +7,18 @@ jobs:
|
|||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout
|
||||||
name: Login to Docker Hub
|
uses: actions/checkout@v4
|
||||||
uses: docker/login-action@v4
|
- name: Install Buildah
|
||||||
with:
|
run: |
|
||||||
registry: git.dswd73.duckdns.org
|
sudo apt update -y
|
||||||
username: ${{ vars.LOCAL_REPO_USER }}
|
sudo apt install -y buildah
|
||||||
password: ${{ secrets.LOCAL_REPO_TOKEN }}
|
- name: Build with Buildah
|
||||||
-
|
run: |
|
||||||
name: Set up QEMU
|
buildah bud -t my-image:latest .
|
||||||
uses: docker/setup-qemu-action@v4
|
- name: Login to Registry
|
||||||
-
|
run: |
|
||||||
name: Set up Docker Buildx
|
buildah login --username ${{ vars.LOCAL_REPO_USER }} --password ${{ secrets.LOCAL_REPO_TOKEN }} ${{ vars.LOCAL_REPO_URL }}
|
||||||
uses: docker/setup-buildx-action@v4
|
- name: Push to Registry
|
||||||
-
|
run: |
|
||||||
name: Build and push
|
buildah push my-image:latest docker://${{ vars.LOCAL_REPO_URL }}/${{ gitea.repository }}:latest
|
||||||
uses: docker/build-push-action@v7
|
|
||||||
with:
|
|
||||||
push: true
|
|
||||||
tags: git.dswd73.duckdns.org/dswd/dyndns-updater:latest
|
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
# DynDNS Updater
|
||||||
|
|
||||||
|
A dynamic DNS updater service that automatically updates DNS records with your current IP address.
|
||||||
|
|
||||||
|
## Configuration (config.json)
|
||||||
|
|
||||||
|
The `config.json` file contains all settings for the updater. Here's a detailed explanation of each option:
|
||||||
|
|
||||||
|
### Root Level Options
|
||||||
|
|
||||||
|
#### `ip_lookup` (required)
|
||||||
|
Specifies the services used to discover your public IP addresses.
|
||||||
|
|
||||||
|
```json
|
||||||
|
"ip_lookup": {
|
||||||
|
"ipv4": ["https://api.ipify.org", "..."],
|
||||||
|
"ipv6": ["https://api6.ipify.org", "..."]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- **`ipv4`** (array of URLs): List of services to query for your IPv4 address. Services are tried in random order until one succeeds.
|
||||||
|
- **`ipv6`** (array of URLs): List of services to query for your IPv6 address. Services are tried in random order until one succeeds.
|
||||||
|
|
||||||
|
#### `domains` (required)
|
||||||
|
Dictionary containing the active domain configurations to update. Each key is a domain name, and each value is a domain configuration object (see below).
|
||||||
|
|
||||||
|
```json
|
||||||
|
"domains": {
|
||||||
|
"example.com": { ... },
|
||||||
|
"another.com": { ... }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### `interval` (optional)
|
||||||
|
How frequently (in seconds) to check for IP changes and update domains. Defaults to `600` (10 minutes).
|
||||||
|
|
||||||
|
```json
|
||||||
|
"interval": 300
|
||||||
|
```
|
||||||
|
|
||||||
|
### Domain Configuration Format
|
||||||
|
|
||||||
|
Each entry in the `domains` dictionary has the following structure:
|
||||||
|
|
||||||
|
```json
|
||||||
|
"example.com": {
|
||||||
|
"modes": ["ipv4", "ipv6"],
|
||||||
|
"url": "https://api.example.com/update",
|
||||||
|
"method": "GET",
|
||||||
|
"params": {
|
||||||
|
"token": "your-token",
|
||||||
|
"domain": "${DOMAIN}",
|
||||||
|
"ip": "${IPV4}"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"Authorization": "Bearer token-value"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Domain Options
|
||||||
|
|
||||||
|
- **`modes`** (array, optional): Which IP versions to update. Options are `"ipv4"` and/or `"ipv6"`. Defaults to `["ipv4"]`.
|
||||||
|
|
||||||
|
- **`url`** (string, required): The endpoint URL of your DNS service provider's update API.
|
||||||
|
|
||||||
|
- **`method`** (string, optional): HTTP method to use for the update request. Defaults to `"GET"`. Other options: `"POST"`, `"PUT"`, etc.
|
||||||
|
|
||||||
|
- **`params`** (object, optional): Query parameters (for GET/HEAD requests) or request body parameters to send with the update request. Supports variable substitution.
|
||||||
|
|
||||||
|
- **`headers`** (object, optional): HTTP headers to include in the request. Supports variable substitution. Use for authentication headers like `Authorization` or `X-API-Key`.
|
||||||
|
|
||||||
|
#### Variable Substitution
|
||||||
|
|
||||||
|
These variables are automatically replaced in `params` and `headers` values:
|
||||||
|
|
||||||
|
- `${DOMAIN}`: The domain name being updated
|
||||||
|
- `${IPV4}`: Your current IPv4 address
|
||||||
|
- `${IPV6}`: Your current IPv6 address
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
1. Create or edit `config.json` with:
|
||||||
|
- Configure `ip_lookup` with services to detect your public IPs
|
||||||
|
- Add your domain configurations to the `domains` section
|
||||||
|
- Replace placeholder values with your actual API tokens and credentials
|
||||||
|
- Specify which IP versions to update in `modes` for each domain
|
||||||
|
- (Optional) Adjust `interval` if needed
|
||||||
|
|
||||||
|
2. Run the updater to start keeping your DNS records current
|
||||||
Reference in new issue
Block a user