v4.12.5
Hello DNSControl fans!
This is another bugfix release. Only CLOUDFLAREAPI
is affected, and only the CF_REDIRECT
/CF_TEMP_REDIRECT
/CF_SINGLE_REDIRECT
commands are affected.
Some non-functional improvements are included in this release too. @cafferata contributed code that automatically generates the OWNERS
file, @nikolamilekic and @svenluijten fixed documentation bugs.
Cloudflare-related improvements:
- Bug fixed:
CF_SINGLE_REDIRECT
rule name was not propagating to Cloudflare correctly. #3049 - Bug fixed:
CF_REDIRECT
/CF_TEMP_REDIRECT
rule name generated in conversion mode was long and ugly; now they are short and easier to identify. They are in the (1,302,when,then) format seen inpreview
output. - New feature: Log the
CF_SINGLE_REDIRECT
statements generated whenCF_REDIRECT
/CF_TEMP_REDIRECT
is in conversion mode.
Explanation of the new feature:
Suppose dnsconfig.js
includes a statement like:
D("example.com", ...
CF_TEMP_REDIR("https://example.com/*", "https://replacement.example.com/$1),
In the old days, CF_TEMP_REDIR
would generate a Cloudflare "page rule". However page rules are going away. Therefore, these will now be silently translated into CF_SINGLE_REDIRECT
statements when the manage_single_redirects
meta feature is set to true. A log of these translations can be generated by setting the transcode_log
variable:
var DSP_CLOUDFLARE = NewDnsProvider("cloudflare", {
"manage_single_redirects": true,
"transcode_log": "transcode.log",
});
Once set, any such translations will be appended to the filename transcode.log.
In this example, the log will look like this:
D("example.com", ...
CF_SINGLE_REDIRECT("1,302,https://example.com/*,https://replacement.example.com/$1",
302,
'http.host eq "example.com"',
'concat("https://replacement.example.com", http.request.uri.path)'
),
Replacing the old CF_TEMP_REDIR
statement with the above CF_SINGLE_REDIRECT
statement requires manual cutting and pasting.
While the CF_REDIRECT
/CF_TEMP_REDIRECT
statements are not going away, it is recommended that you convert to CF_SINGLE_REDIRECT
since they are more flexible and officially supported by Cloudflare.
This feature is documented in https://docs.dnscontrol.org/provider/cloudflareapi#old-style-vs-new-style-redirects
Changelog
Provider-specific changes:
- 0869052: CLOUDFLAREAPI: CF_SINGLE_REDIRECT improvements: fix bugs, log translated redirects (#3051) (@tlimoncelli)
Documentation:
- 1d348de: DOCS: Fix M365_BUILDER examples (#3009) (@nikolamilekic)
- cf49ec8: DOCS: Fix markdown links in Cloudflare provider docs (#3046) (@svenluijten)
CI/CD:
- 8fa1a8d: BUILD: Generate OWNERS files (#2997) (@cafferata)
Other changes and improvements:
- 95c7a70: REFACTOR: Pave args (not validate) (#3045) (@tlimoncelli)
- d160b82: fmt helpers.js (#3048) (@tlimoncelli)
Deprecation warnings
Warning
- REV() will switch from RFC2317 to RFC4183 in v5.0. This is a breaking change. Warnings are output if your configuration is affected. No date has been announced for v5.0. See https://docs.dnscontrol.org/language-reference/top-level-functions/revcompat
- MSDNS maintainer needed! Without a new volunteer, this DNS provider will lose support after April 2025. See #2878
- NAMEDOTCOM and SOFTLAYER need maintainers! These providers have no maintainer. Maintainers respond to PRs and fix bugs in a timely manner, and try to stay on top of protocol changes.
- get-certs/ACME support is frozen and will be removed without notice between now and July 2025. It has been unsupported since December 2022. If you don't use this feature, do not start. If you do use this feature, migrate ASAP. See discussion in issues/1400
Install
macOS and Linux
Install with Homebrew (recommended)
brew install dnscontrol
Using with Docker
You can use the Docker image from Docker hub or GitHub Container Registry.
docker run --rm -it -v "$(pwd):/dns" ghcr.io/stackexchange/dnscontrol preview
Anywhere else
Alternatively, you can install the latest binary (or the apt/rpm/deb/archlinux package) from this page.
Or, if you have Go installed, you can install the latest version of DNSControl with the following command:
go install github.com/StackExchange/dnscontrol/v4@main
Update
Update to the latest version depends on how you choose to install dnscontrol
on your machine.
Update with Homebrew
brew upgrade dnscontrol
Alternatively, you can grab the latest binary (or the apt/rpm/deb package) from this page.