caddy: v2.10.0-beta.2: unable to publish ECH data to cloudflare HTTPS DNS record
I’m trying to configure ECH with Cloudflare as DNS provider, and using the second-level domain as ECH public name.
tls = {
dns = {
name = "cloudflare";
api_token = "{env.CF_API_TOKEN}";
zone_token = "{env.CF_ZONE_TOKEN}";
};
encrypted_client_hello.configs = [
{
public_name = "nyaw.xyz";
}
];
};
My related caddy JSON config(in nix). And all these domains are resolved to the machine.
Experiencing the error below (formatted):
{
"level": "error",
"ts": 1741433454.0890296,
"logger": "tls",
"msg": "unable to publish ECH data to HTTPS DNS record",
"domain": "nyaw.xyz",
"error": "got error status: HTTP 400: [{Code:9000 Message:DNS name is invalid. ErrorChain:[]}]"
}
And it successfully published all other domains’ (3rd/4rd-level domains) ech config except 2nd level domain.
FWIW I’m using wildcard certificate for all *.nyaw.xyz , and the 2nd-lvl domain is configured to request a standalone certificate. and certificates are all successfully obtained.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (8 by maintainers)
I’ve opened a new issue and added some extra info, hope this helps! https://github.com/caddyserver/caddy/issues/6895
Thanks! I tested with 39262f86632401ae4915600b042ef5a28141d3d5, the HTTPS record for the second-level domain was successfully added, and ECH for this site works fine now, but the issue mentioned in https://github.com/caddyserver/caddy/issues/6887#issuecomment-2708830316 about wildcard cert with ECH still exists.
I tried beta2 but same issue.
With the config above, I’ve tested the ECH working status with curl, and found that there may be some issue with the wildcard certificate working with ECH.
Here is part of the log, TLDR, 2nd level domain (
nyaw.xyz) and all its subdomains*.nyaw.xyz(that are using wildcard certificate) has ech status ofnot configured(even if the HTTPS record for*existed), while the others which obtain certificate standalone is working fine:Please let me know if there’s any additional information I can provide to assist with debugging.
Here is my full config and log, Reproduction steps below:
Delete ALL former set HTTPS record in Cloudflare dashboard.
Start caddy with (ech) config: https://gist.github.com/oluceps/fac343718317ef531061180c0cd96824
The log, after start about 10s, HTTPS records except 2nd-level domain’s published: https://gist.github.com/oluceps/d8c0fc2eadd938ed859fe9d7fac87bf1
It does have benefits since it makes middlebox unable to differentiate between traffic to it and its subdomains. (even if this does not affect me)