Closed francislavoie closed 1 year ago
Does this fix #30, or is it just semi-related? :)
It doesn't fix that yet, no. All I did was stop A and AAAA from stepping on eachother in that function. But it still needs to be changed to return data per domain per type, and then the update procedure will need to diff them.
As per https://caddy.community/t/dynamic-dns-ipv6/19053/8, there's a distinct lack of debug logging to be able to understand what's going wrong.
Also, I rewrote the HTTP source because it had duplicated code branches and I think it would give up on trying IPv6 if a particular endpoint returned a good IPv4 but not IPv6, because of the
if len(ips) > 0
condition. Looping over the endpoints twice makes the IP versions not dependent on eachother at all, so it should be more reliable that way.Also fixed a bug with
lookupCurrentIPsFromDNS
which was only keeping one of either A or AAAA for a domain instead of both, which meant the initial load was often incorrect for servers with both IPv4 and IPv6.