go-proxyproto
go-proxyproto copied to clipboard
Example HTTP server code doesn't support HTTP/2 upgrade
net/http
can't access PP2_TYPE_ALPN
which is necessary for the HTTP/2 upgrade.
Some manual logic is necessary to handle HTTP/2 upgrades, e.g. https://git.sr.ht/~emersion/kimchi/tree/master/item/server.go#L175
Would it be desirable to host this glue code in go-proxyproto so that users can easily fire up an HTTP server with HTTP/2 upgrade support?
Would it be enough to introduce a new example app in the examples
folder?
The boilerplate is annoying to type, so I'd prefer to have it in the lib somehow.
Maybe we create a new package helper/http2
? As we move forward, we can even deprecate some specific code for cloud-providers and move to the helper
package, ie helper/aws
, WDYT?