caddyhttp: use the new http.Protocols to handle h1, h2 and h2c requests
Golang 1.24 introduced a new type that can be used to specify the versions of http caddy can handle. Now caddy can support h2/h2c without h1.
This new mechanism also means graceful shutdown for h2 is easier and we no longer need to track the number of h2 connections. It does require another hack to prevent unintentional h2c request handling, but that hack is minimal.
H2c via protocol upgrade is no longer supported. As far as I know, only curl with use this upgrade if --http2-prior-knowledge is not specified.
Can you link the relevant Go PRs/commits? Curious to see how that evolved.
Is there anything in reverseproxy that can be simplified with the new h2c stuff? Or did they only improve the server side but not client side?
I want to wait until 6955 is merged to work on the reverse proxy protocol stuff.
This is still in draft state; would you like another review?