HTTPS dns records should include alpn and optional ipv4hint
Issue Details
caddy can set ECH keys in the HTTPS record via caddy-dns. it does NOT however set alpn, ipv4hint or ipv6hint which providers like cloudflare do set:
user@host$ dig cloudflare-quic.com HTTPS +short
1 . alpn="h3,h2" ipv4hint=104.18.26.14,104.18.27.14 ech=AEX+DQBBugAgACAiYYf+HF97Lk/MKNI6G/rDmZ8QZiVRfonRYjNDbXPnLwAEAAEAAQASY2xvdWRmbGFyZS1lY2guY29tAAA= ipv6hint=2606:4700::6812:1a0e,2606:4700::6812:1b0e
Assistance Disclosure
AI not used
If AI was used, describe the extent to which it was used.
No response
To clarify, we don't create them, but we also preserve them if they already exist.
Setting these other values correctly can be a little trickier. Are you noticing a particular problem without them?
To clarify, we don't create them, but we also preserve them if they already exist.
oh ok, thanks for the info, i didnt know that
Setting these other values correctly can be a little trickier. Are you noticing a particular problem without them?
the alpn is used in chrome/chromium to use http3 directly while the ipv(4|6)hint is used as a shortcut ( not by chromium it seems )
my main goal was to set up my server as http3 only or if needed h3 with h2 fallback
This seems like a reasonable feature request to me but I think alpn and the IP hints should probably be treated differently.
alpn feels like the strongest case because it is directly tied to protocol advertisement and is the part most relevant to HTTP/3-first / HTTP/3-only use cases.
ipv4hint / ipv6hint seem weaker as automatic defaults. They are only hints, and getting them right is trickier if Caddy is not the authoritative source of the service IP topology.
So my inclination would be:
- adding
alpnwhen Caddy is already managing/publishing the HTTPS RR seems worth discussing - automatic
ipv4hint/ipv6hintwould need a much clearer source-of-truth story first
I think I agree with that approach, @steadytao .
Will look into the cleanest way to implement this.
Scoped this to alpn only. That fits Caddy because it is derived from Caddy's own effective protocol configuration for the HTTPS RR it is already managing. I have intentionally not included automatic ipv4hint / ipv6hint since Caddy usually is not a reliable source of truth for client-facing IP hints across NAT, CDNs, load balancers, ingress and split-DNS setups.
Scoped this to
alpnonly. That fits Caddy because it is derived from Caddy's own effective protocol configuration for the HTTPS RR it is already managing. I have intentionally not included automaticipv4hint/ipv6hintsince Caddy usually is not a reliable source of truth for client-facing IP hints across NAT, CDNs, load balancers, ingress and split-DNS setups.
ok, thanks i understand your concern