joshuaavalon/SynologyCloudflareDDNS

[Feature] IPv6 Support with "dynamic switch"

Closed this issue · 2 comments

This: https://github.com/Hedrauta/SynologyCloudflareDDNS
actually is a good fork from @Hedrauta but there is still a problem I think:

  1. IPv6 is not provided from Synology (at least for me)
  2. if both (IPv4 & IPv6) are set and just one of them changes and the other will be removed this should be projected to Cloudflares DNS and remove the (for example) IPv4

I think this example from @Hedrauta should be paired with this one: https://github.com/lifehome/systemd-cfddns/blob/master/src/cfupdater-dualstack

which would make this a very stable and good solution. Also for DS-Lite users it would be awesome to be able to set the script in "IPv6Only" Mode as the IPv4 on DS-Lite users are shared among more users and thats why most things will not work on IPv4 for DS-Lite Users then.

Also I think IPs should not even be obtained from Synologys-DDNS service, but resolved itself with:

  1. curl -4 https://icanhazip.com/ OR curl -s https://ipv4.icanhazip.com/
  2. curl -6 https://icanhazip.com/ OR curl -s https://ipv6.icanhazip.com/

and then valideted with your validation and then be:

  1. created (if missing)
  2. updated (if existing but changed)
  3. deleted (if existing on Cloudflare but not on device anymore)

Just wanted to drop these infos here and hope that @Hedrauta may sees them and implements them in his script, as he did not allow us to create issues.

Ha... Had written that one a really long time ago 😅.
Will try to re-read and so on.... Just, let me get some time...
Reallife's Work is hard right now 🙃

I don't plan to add a external network request as this project goal is only is only uses what given by Synology.

If you want to uses an external source, there is no need to use this script. You can just use a script with a script. May be you want to ask Synology support to fix its IPv6.

I also have another project that uses Docker and supports more features.