Crates.io | cloudflare_dyndns |
lib.rs | cloudflare_dyndns |
version | 0.1.6 |
source | src |
created_at | 2023-12-02 01:30:41.281736 |
updated_at | 2024-02-02 12:38:57.499763 |
description | DynDNS client for Cloudflare |
homepage | |
repository | https://github.com/LordOsslor/cloudflare_dyndns |
max_upload_size | |
id | 1055801 |
size | 74,095 |
Gets your current public ip address (IPv4/IPv6) and updates the specified cloudflare dns records.
Configuration of the client is done via a toml
config file.
By default, the client will load its config from config.toml
in the working directory, however this can be changed by providing the -c <PATH TO CONFIG>
command line argument.
config.toml
:ipv4_service = "https://api.ipify.org" # Api that returns the current ipv4 address
ipv6_service = "https://api64.ipify.org" # Api that returns the current ipv6 address
[[zones]]
identifier = "<YOUR ZONE ID HERE>"
[zones.auth]
BearerAuth = "<YOUR ZONE AUTHENTICATION HERE>"
# There can be multiple search rules. All records matching any of the rules will be changed
[[zones.search]]
type = "A"
name = "test.mydomain.net"
[[zones.search]] # Updates any AAAA-type record
type = "AAAA"
As any record matching either of the two search rules in example above is updated, this would result in:
Configuration file structure:
Name | Type |
---|---|
ipv4_service |
optional url |
ipv6_service |
optional url |
zones |
list of Zone |
Notes: Atleast one of ipv4_service and ipv6_service must be set and zones must have atleast one entry
Zone:
Name | Type |
---|---|
identifier |
string |
auth |
Authentication |
search |
list of Rule |
Authentication (either of):
Name | Type |
---|---|
BearerAuth |
string |
Rule:
Name | Type |
---|---|
comment |
optional StringMatch |
content |
optional string |
match |
optional Match |
name |
optional string |
proxied |
optional bool |
search |
optional string |
tag |
optional StringMatch |
tag_match |
optional Match |
type |
optional string |
StringMatch:
Name | Type |
---|---|
exact |
optional string |
absent |
optional bool |
contains |
optional string |
endswith |
optional string |
present |
optional bool |
startswith |
optional string |
Match (either of):
"any"
"all"