caddy-dynamicdns icon indicating copy to clipboard operation
caddy-dynamicdns copied to clipboard

Feature request: option to only update existing records, not create new.

Open demifiend9 opened this issue 2 years ago • 13 comments

I have only A record on ipv4.example.com and only AAAA record on ipv6.example.com but when I use this module, it creates the missing AAAA and A records for the subdomains which I didn't want.

Maybe something like update_only option which would just update existing records without creating new?

demifiend9 avatar Jan 31 '22 03:01 demifiend9

Hm, I think you actually want #6 -- which is probably a better way to frame the problem. (Closing, but feel free to continue discussion if needed.)

mholt avatar Feb 02 '22 05:02 mholt

Thanks for the reply. Yes, I did look at #6 but the linked PR that is supposed to close it looked like it was only about setting IP version for the entire module. What I wanted was to specify IP version for each domain. Perhaps an easy way to do this would be ability to specify ip sources for each domain. I'd use upnp as source for my ipv4 domains (which is working beautifully) and api6.ipify.org for ipv6 domains. (Btw, how about network interface as an ip source like this? Useful for ipv6 and combined with upnp it'd make this app completely independent from ip lookup websites.)

demifiend9 avatar Mar 08 '22 10:03 demifiend9

What I wanted was to specify IP version for each domain.

I think that would make the config pretty complicated, and would be a breaking change in the config to make it possible.

Feel free to write an alternate PR to mine, if you think you have a better solution in mind.

francislavoie avatar Mar 08 '22 11:03 francislavoie

@francislavoie I'm extremely sorry if my reply came off as demanding or disrespectful. I'm no developer and didn't know how complicated or feasible what I suggested is. I'm fine with my current workaround of using caddy to update ipv4 records and another program for ipv6.

demifiend9 avatar Mar 08 '22 11:03 demifiend9

Sorry, my intent wasn't to be dismissive either, just wanted to clarify that this sort of change isn't necessarily "easy".

For a change not to be breaking, only new config surface would need to be added, and no changes. Right now since the domains are list of strings, there's no way to configure options per domain.

We could have a separate, new config property that would be per-domain config, but then you'd probably be duplicating the domain in the config (domain written in two places just for ddns then once more for your actual site you're serving). That's not really elegant.

But yeah, a workaround would be to run two instances of Caddy, with the second not accepting any requests, just dealing with ddns for IPv6 or something.

francislavoie avatar Mar 08 '22 11:03 francislavoie

(FWIW I don't mind having breaking changes in this module at this point, it's still early days.)

mholt avatar Mar 08 '22 20:03 mholt

I'll work on implementing update_only after #16 is merged

francislavoie avatar Mar 22 '22 18:03 francislavoie

Hi, thanks for your module. Any news about this issue? I use the ovh services but I have a new entry each time (redirection) each time IP is changed

musklor avatar Sep 02 '22 19:09 musklor

@musklor It shouldn't be creating a new record every time. That might be a bug in the OVH libdns implementation.

mholt avatar Sep 02 '22 19:09 mholt

Do you think I can mix DNS ovh and dynamic DNS? Do you think I can use ovh dyndns (login/password) with your module? For the moment I use your module with api credentials.

musklor avatar Sep 02 '22 21:09 musklor

I don't know anything about OVH, sorry :(

I'd recommend filing a question or issue here: https://github.com/libdns/ovh

mholt avatar Sep 02 '22 22:09 mholt

I use your module and the ovh DNS module. Can I mix both in the Caddyfile? (For the moment, it's separate. And I use my api credentials twice)

New file (1).txt

musklor avatar Sep 03 '22 12:09 musklor

Please use markdown code blocks when posting your config. It's extremely difficult to follow because the formatting/indentation is lost.

francislavoie avatar Sep 03 '22 14:09 francislavoie