caddy icon indicating copy to clipboard operation
caddy copied to clipboard

HTTPS dns records should include alpn and optional ipv4hint

Open N4CH723HR3R opened this issue 11 months ago • 7 comments

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

N4CH723HR3R avatar Dec 19 '25 08:12 N4CH723HR3R

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?

mholt avatar Dec 29 '25 04:12 mholt

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

N4CH723HR3R avatar Jan 03 '26 19:01 N4CH723HR3R

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 alpn when Caddy is already managing/publishing the HTTPS RR seems worth discussing
  • automatic ipv4hint / ipv6hint would need a much clearer source-of-truth story first

steadytao avatar Apr 14 '26 19:04 steadytao

I think I agree with that approach, @steadytao .

mholt avatar Apr 14 '26 23:04 mholt

Will look into the cleanest way to implement this.

steadytao avatar Apr 14 '26 23:04 steadytao

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.

steadytao avatar Apr 14 '26 23:04 steadytao

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.

ok, thanks i understand your concern

N4CH723HR3R avatar Apr 29 '26 01:04 N4CH723HR3R