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.
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:
- The A-Record "test.mydomain.net" will be updated (if it exists)
- All AAAA-Records of the zone will be updated
-
Configuration file structure:
Name Type ipv4_serviceoptional url ipv6_serviceoptional url zoneslist of ZoneNotes: Atleast one of ipv4_service and ipv6_service must be set and zones must have atleast one entry
-
Zone:
Name Type identifierstring authAuthenticationsearchlist of Rule -
Authentication (either of):
- Using Bearer Authentication:
Name Type BearerAuthstring - Using ApiKey Authentication: todo
- Using Bearer Authentication:
-
Rule:
Name Type commentoptional StringMatchcontentoptional string matchoptional Matchnameoptional string proxiedoptional bool searchoptional string tagoptional StringMatchtag_matchoptional Matchtypeoptional string -
StringMatch:
Name Type exactoptional string absentoptional bool containsoptional string endswithoptional string presentoptional bool startswithoptional string -
Match (either of):
"any""all"