favonia / cloudflare-ddns Goto Github PK
View Code? Open in Web Editor NEW๐ A small, feature-rich, and robust Cloudflare DDNS updater
License: Apache License 2.0
๐ A small, feature-rich, and robust Cloudflare DDNS updater
License: Apache License 2.0
any way to get it to build on osx?
kernel.org/pub/linux/libs/security/libcap/cap
../../go/pkg/mod/kernel.org/pub/linux/libs/security/libcap/[email protected]/syscalls.go:16:10: undefined: psx.Syscall3
../../go/pkg/mod/kernel.org/pub/linux/libs/security/libcap/[email protected]/syscalls.go:17:10: undefined: psx.Syscall6
../../go/pkg/mod/kernel.org/pub/linux/libs/security/libcap/[email protected]/cap.go:229:29: undefined: syscall.SYS_PRCTL
../../go/pkg/mod/kernel.org/pub/linux/libs/security/libcap/[email protected]/cap.go:241:29: undefined: syscall.SYS_PRCTL
../../go/pkg/mod/kernel.org/pub/linux/libs/security/libcap/[email protected]/cap.go:253:29: undefined: syscall.SYS_PRCTL
../../go/pkg/mod/kernel.org/pub/linux/libs/security/libcap/[email protected]/cap.go:266:29: undefined: syscall.SYS_PRCTL
../../go/pkg/mod/kernel.org/pub/linux/libs/security/libcap/[email protected]/cap.go:279:22: undefined: syscall.SYS_CAPGET
../../go/pkg/mod/kernel.org/pub/linux/libs/security/libcap/[email protected]/cap.go:346:37: undefined: syscall.SYS_CAPGET
../../go/pkg/mod/kernel.org/pub/linux/libs/security/libcap/[email protected]/cap.go:366:29: undefined: syscall.SYS_CAPSET
../../go/pkg/mod/kernel.org/pub/linux/libs/security/libcap/[email protected]/convenience.go:277:25: undefined: sysSetGroupsVariant
../../go/pkg/mod/kernel.org/pub/linux/libs/security/libcap/[email protected]/convenience.go:277:25: too many errors
bash-5.1$
The current template system is working but does not seem to be well-engineered.
TTL
currently supports templates (for fun), but that is probably overkill.PROXIED
, only Boolean expressions are needed. No need to support variables, template inclusion, looping, etc.TTL
should not support templates.PROXIED
should support only very restricted templates as a Boolean expression
consisting ofstrconv.ParseBool
&&
, ||
, !
is(a, b, c)
sub(a, b, c)
: subdomains of a.b.c
(not including a.b.c
itself)is(a.org) || is(b.org)
sub(org) && !sub(favonia.org)
Heya!
I was using your container to update my ipv4 and 6 for my own domain from my pi using this template:
https://github.com/novaspirit/pi-hosted/blob/d3d7e5de51d3296568c29a0f10ee334a040df943/template/portainer-v2-arm64.json#L616
But i saw in my logs that it is having some troubles with detecting my ipv6 adres:
๐ Detected the IPv4 address: my.correct.public.ip
๐คท The A records of "mydomain.ext" are already up to date
๐ Failed to send HTTP(S) request to "https://[2606:4700:4700::1111]/cdn-cgi/trace": Get "https://[2606:4700:4700::1111]/cdn-cgi/trace": dial tcp [2606:4700:4700::1111]:443: connect: cannot assign requested address
๐ Failed to detect the IPv6 address
โฐ Checking the IP addresses in about 5m0s . . .
Outside the container doing a curl to that adres works, also on my own machine.
But i can't go into the container to test and see what the error exactly is.
Do you have any suggestions what i might have wrong? I didn't touched the TZ variable but have set it to my local timezone to see if that might change something. But sadly this also didn't fix the error i'm having.
Now the server always returns 0.0.0.0
. For example,
dog --class=CH --type=TXT -H @https://1.1.1.1/dns-query whoami.cloudflare.
shows 0.0.0.0
. Workaround: use cloudflare.trace
(after #102) or ipify
.
I am getting following error while it is trying to update the IP address, but in CF, ip getting updated successfully.
๐ Detected the IPv4 address: X.X.X.X
๐ Failed to update a stale A record of "home.domain.fqdn" (ID: 294fcde3fbf00433d8c36b6cf47125d9): operation aborted during backoff: context deadline exceeded
๐ Failed to delete a stale A record of "home.domain.fqdn" (ID: 294fcde3fbf00433d8c36b6cf47125d9): operation aborted during backoff: context deadline exceeded
๐ Failed to add a new A record of "home.domain.fqdn": operation aborted during backoff: context deadline exceeded
๐ Failed to (fully) update A records of "home.domain.fqdn"
๐ Failed to retrieve records of "domain.fqdn": operation aborted during backoff: context deadline exceeded
๐ Failed to (fully) update A records of "domain.fqdn"
๐ Failed to send HTTP(S) request to "https://[2606:4700:4700::1111]/cdn-cgi/trace": Get "https://[2606:4700:4700::1111]/cdn-cgi/trace": dial tcp [2606:4700:4700::1111]:443: connect: cannot assign requested address
๐ Failed to detect the IPv6 address
Are you using the new per-domain proxy settings PROXIED_DOMAINS
and NON_PROXIED_DOMAINS
? Please help me come up with a good design by sharing your case. ๐
It is possible to set up access control so that members of certain groups are explicitly forbidden to access certain resources, and thus dropping supplementary groups is not always desirable.
It might be useful update SPF records that contain IP addresses.
After golang/go#51833, we can re-implement the IPv6 case in ipnet.NormalizeIP
in a better way:
It is possible to factor out the caching, especially when the tool starts to support other DDNS services (which it does not).
This will provide per-domain settings without using new environment variables.
Completing #76 should automatically fix this bug.
The idea is to update the subnet masks and prefixes but keep the rest of the IP addresses. Difficulty: no way to (re)create those DNS records from scratch.
Possible settings
WEBHOOK_ENDPOINT=
WEBHOOK_HEADERS=
WEBHOOK_BODY=
WEBHOOK_BODY_FILE=
All parameters support template, with getenv
functions getting the string from environment variables.
It was implemented, but is disabled until cloudflare/cloudflare-go#674 is merged and released. A small value of UPDATE_TIMEOUT
would easily trigger the deadlock bug described in the pull request.
The major difficulty is that testing the Linux capabilities seems complicated. We can test the mocking itself, but that might not be super useful.
Hi, thanks for your work.
I have a domain in another registrar and the NS's pointing to Cloudflare. I'd set these up as websites rather than as a managed domain.
I'm expecting that that's the reason why I get the following messages.
Failed to find the zone of "domain.com"
Failed to (fully) update A records of "domain.com"
Is there a method to work with Cloudflare Websites instead of Domains ?
Thanks!
๐คท
https://healthchecks.io provides a very simple status updating mechanism with lots of hooks available
It seems something about the timezone has been changed. The code still works, but perhaps the TZ
environment variable and/or timezone data in the Ubuntu images used by GitHub Actions have been modified, causing the mismatch between the expected output and the real one. More investigations are needed.
https://github.com/patrickmn/go-cache is no longer maintained and should be replaced.
Hi, what an awesome service you have created!
I've a minor thing as I can't seem to figure out how to fully disable ipv6 using docker-compose. Hence my logs are full of
๐ Failed to send HTTP(S) request to "https://[REMOVED]/cdn-cgi/trace": Get "https://[REMOVED]/cdn-cgi/trace": dial tcp [REMOVED]:443: connect: cannot assign requested address
๐ Failed to detect the IPv6 address
๐ง If you are using Docker, Kubernetes, or other frameworks, IPv6 networks often require additional setups.
๐ง Read more about IPv6 networks in the README at https://github.com/favonia/cloudflare-ddns
Under highlights it says "Ability to enable or disable IPv4 and IPv6 individually." I've tried to disable ipv6 by adding the following to the env in docker-compose: - IP6_PROVIDER=none
If I set IP4_POLICY=none
which is listed as a valid value in the readme I get:
๐ธ Use default IP4_POLICY=cloudflare.trace
๐ก Failed to parse "none": not a valid policy
I've tried both the bridge and host methods. Both only pull the machine ipv6 address. Thanks
I should also mention that I set it up in portainer.
A guide for Kubernetes like the one for Docker Compose.
The development of https://github.com/robfig/cron seems to be stopped and thus it should probably be replaced.
DOMAINS
: both IP4 and IP6IP4_DOMAINS
: only IP4IP6_DOMAINS
: only IP6Currently, signals are checked between each round of updates. We could use asynchronous goroutines to enable cancellation while waiting for responses from Cloudflare.
Because why not? This now makes even more sense as MIPS is adopting RISC-V now.
Cloudflare seems to be very permissive about the (sub)domain names one can use.
This would be a breaking change.
I can't seem to find this information in the readme page.
What's the right way to tell the script to proxy the domain foo.bar and not proxy the subdomain test.foo.bar with docker compose?
And while i'm at it. What about the TTL?
Also, if i write *.foo.bar , will the script update every single subdomain?
Thanks in advance.
tzdata
), which I think will increase the Docker image size to ~5MBip=
in the output of https://1.1.1.1/cdn-cgi/trace
whoami.cloudflare
with class ch
and type txt
via https://1.1.1.1/dns-query
(DoH)whoami.cloudflare
.Now the DNS message generator/parser has been isolated and can be easily tested.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.