cloudflare-sync icon indicating copy to clipboard operation
cloudflare-sync copied to clipboard

Tries to update AAAA record with IPv4

Open DesertCookie opened this issue 5 years ago • 5 comments
trafficstars

Event though I have set type to AAAA in my config file, cloudflare-sync attempts to send an IPv4 to CloudFlare (which my PC does not have), thus resulting in a failure to update.

Are IPv6 records even supported by cloudflare-sync?

DesertCookie avatar Jan 18 '20 11:01 DesertCookie

@DesertCookie currently they are not supported since I didn't use it at the time I wrote it (and still don't), but I could add support for it if it's a blocker for usage.

Sorry, it was a very basic MVP I wrote, mostly for myself, but if you have a need, I can totally do it, might take a bit though.

siennathesane avatar Jan 19 '20 00:01 siennathesane

Support for AAAA records would indeed be great. Don't hustle yourself though - maybe I'm quicker writing a program myself. But since IPv6 is the default since 2012 an the industry is slowly but surely transitioning, I think future-proofing your application is always a good idea.

DesertCookie avatar Jan 20 '20 06:01 DesertCookie

I'll take a look and see how hard it would be to implement. :)

siennathesane avatar Jan 22 '20 16:01 siennathesane

@DesertCookie I updated it to support AAAA records, but I can't test it because my ISP doesn't provide IPv6 addresses without some hassle. Can you test the latest commit and provide some feedback?

siennathesane avatar Jan 28 '20 16:01 siennathesane

After messing around for a while and solving several problems that caused errors to be thrown, this is the one I cannot get past: cannot unmarshal production configuration file.
My configuration file looks like this (reducted):

{
  "zone_id": "...",
  "zone_name": "domain.ext",
  "api_token": "...",
  "frequency": "30",
  "records": [
    {
      "type": "AAAA",
      "name": "sub.domain.ext",
      "proxied": true,
      "ttl": 120,
      "priority": 1
    }
  ]
}

DesertCookie avatar Feb 02 '20 09:02 DesertCookie