Skip to content

Commit

Permalink
Updated README, fixed links
Browse files Browse the repository at this point in the history
  • Loading branch information
Yzen90 committed Nov 17, 2024
1 parent 0d9b8c6 commit 38117c6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DynaFlare
## Simple IPv4 DDNS client for Cloudflare
#### Simple IPv4 DDNS client for Cloudflare. Works on the Raspberry Pi!


### 1. Obtaining DynaFlare
Expand All @@ -11,24 +11,27 @@ cd dynaflare
cargo build --release
```

#### Crate
#### Install crate
```shell
cargo install dynaflare
```

#### Pre-built binaries
- [Linux aarch64](https://github.com/Yzen90/dynaflare/releases/download/v1.0.0/dynaflare-v1.0.0-aarch64-linux.zip)
- [Linux x86_64](https://github.com/Yzen90/dynaflare/releases/download/v1.0.0/dynaflare-v1.0.0-x86_64-linux.zip)
- [Windows x86_64](https://github.com/Yzen90/dynaflare/releases/download/v1.0.0/dynaflare-v1.0.0-x86_64-windows.zip)
#### Download a pre-built binary
- [Linux aarch64](https://github.com/Yzen90/dynaflare/releases/latest/download/dynaflare-aarch64-linux.zip)
- [Linux x86_64](https://github.com/Yzen90/dynaflare/releases/latest/download/dynaflare-x86_64-linux.zip)
- [Windows x86_64](https://github.com/Yzen90/dynaflare/releases/latest/download/dynaflare-x86_64-windows.zip)


### 2. Configuration

DynaFlare looks in the current working directory for a `configuration.toml` file with the following fields:

- `interval` (Optional): If not provided, dynaflare will check and update de provided records only once and then exit. Otherwise dynaflare will keep runing and continuosly check at this interval for public ip changes and update the dns record when necessary.
- `interval` (Optional): String with one or more pairs of a positive integer immediately followed by 'days', 'h', 'min', 's', 'ms', 'μs' or 'ns'. If not provided, dynaflare will check and update de provided records only once and then exit. Otherwise dynaflare will keep runing and continuously check at this interval for public ip changes and update the dns records when necessary.

- `zone_id` (Required): ID of the Clouldflare Zone that contains the provided dns records.

- `api_token` (Required): Cloudflare API token with DNS read and edit permissions for the provided zone.

- `records` (Required): DNS records to set to the current public IP address.

#### Example `configuration.toml`
Expand All @@ -40,6 +43,7 @@ api_token = "cloudflare api token here"
records = ["dynamic.example.com"]
```


### 3. systemd service

A systemd service unit file template for DynaFlare is provided in the repository that can be used as follows to install a systemd service:
Expand All @@ -49,7 +53,7 @@ export DYNAFLARE_USER=dynaflare # User that the process will be executed as
export DYNAFLARE_WDIR=/usr/local/etc/dynaflare # Directory where configuration.toml is located
export DYNAFLARE_EXEC=/usr/local/bin/dynaflare # Path of dynaflare executable file

sudo envsubst < dynaflare.service > /etc/systemd/system/dynaflare.service
envsubst < dynaflare.service | sudo tee /etc/systemd/system/dynaflare.service

sudo systemctl start dynaflare
sudo systemctl status dynaflare
Expand All @@ -59,7 +63,7 @@ sudo systemctl enable dynaflare
#### Example systemd unit file
```ini
[Unit]
Description=DynaFlare simple DDNS client for Cloudflare
Description=DynaFlare, a simple DDNS client for Cloudflare
After=network-online.target
Wants=network-online.target

Expand Down
2 changes: 1 addition & 1 deletion dynaflare.service
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Unit]
Description=DynaFlare simple DDNS client for Cloudflare
Description=DynaFlare, a simple DDNS client for Cloudflare
After=network-online.target
Wants=network-online.target

Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ fn sync_records(client: &Agent, configuration: &Configuration) -> Result<(Vec<St

log_changes(&current_ip, new, changed);
} else {
info!("Public IP is {current_ip}. No record changes needed.")
info!("Public IP is {current_ip}. No records changes needed.")
}

Ok((records_ids, current_ip, base_url))
Expand Down

0 comments on commit 38117c6

Please sign in to comment.