mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-05-17 21:41:56 -04:00
Use Cloudflare List DNS Records API For Retrieving Record Identifier #27
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tools400 on GitHub (Apr 12, 2020).
Originally assigned to: @qdm12 on GitHub.
It was great if you could enhance your ddns-updater so that it calls the Cloudflare "List DNS Records" API for retrieving the record identifier, which is required for updating the record with the new IP address.
For sure I would create a pull request for that, if I was a more experienced Go developer. I played a bit with the following snippet, but was not able to see the response body:
You could raise an error in case that more than one record is found.
Thanks,
Thomas.
@qdm12 commented on GitHub (May 30, 2020):
Hello Thomas,
Thanks for your suggestion and the piece of code 😉
I finally had the time to plug that in (the polished piece of code 😄) in this PR. So now it first gets the identifier using the fqdn + zone identifier, so no need to query manually, thanks for noticing, I didn't even see you could automate that.
In this PR, I also added support for ipv6 for Cloudflare, but I don't have a domain at theirs;
Would you mind trying with the image
qmcgaw/ddns-updater:cloudflare-ipv6to check it works? (It's building here)Thanks!