Add an optional query param to pin Cloudflare proxy state on DDNS updates #226
noelruault
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The worker preserves the
proxiedflag that is already on the record. That works when nothing else writes to it, but the native UniFi Cloudflare DDNS client running alongside this worker can flip records back to DNS only between runs. Anything relying on Cloudflare TLS via the orange cloud then stops working until someone flips it back in the dashboard.The worker already runs on every DDNS update and holds the record context, so it looks like the right place to pin the state from.
Proposed API
An opt in query string parameter.
?proxied=trueor?proxied=1forces the record proxied.?proxied=falseor?proxied=0forces DNS only.Omitting the parameter, or passing any other value, preserves the current state (today’s behaviour).
Values are trimmed and case insensitive. The override applies to every record in an update that passes multiple hostnames (comma separated).
Example:
Backwards compatibility
Fully opt in. Existing DDNS URLs without the parameter behave exactly as before, so no one is affected by default.
Would you accept a PR?
I have this implemented and tested on a fork: around 15 lines of handler logic, 7 new vitest specs covering the truthy, falsy, alias, unrecognised value and multiple hostname cases, plus README and FAQ updates. Happy to open a PR if this direction works for you, or to adjust first if you would prefer a different shape (for example a different parameter name, or a worker env setting instead of a per request flag).
Beta Was this translation helpful? Give feedback.
All reactions