Open Geal opened 7 years ago
depends on #257 and #258
RFC 7540 for HTTP/2: http://httpwg.org/specs/rfc7540.html RFC 7541 for HPACK (header compression): http://httpwg.org/specs/rfc7541.html
Parsing and generating the different frames should not be too hard. Handling the ALPN dance will be ok too. The stream state machine is well defined (there are still lots of details and failure cases to handle correctly). The complex part appears to be in flow control and stream priorities. About half the mentions of proxy specific behaviour are around the CONNECT HTTP method, which may not be really interesting to handle for now.
Parts of https://github.com/carllerche/h2 might be reusable. https://github.com/mlalic/hpack-rs is not really maintained. https://github.com/carllerche/bytes would be interesting for buffer handling, since it can work correctly with multiple subsets of the data: https://carllerche.github.io/bytes/bytes/struct.Bytes.html
development has started in the h2 branch. It is only plugged into the HTTPS Openssl proxy for now.
cf https://blog.cloudflare.com/tools-for-debugging-testing-and-using-http-2/
curl --http2 -kv http://lolcatho.st:8443/
~/.go/bin/h2c connect lolcatho.st:8443
~/.go/bin/h2c get /
We will need to test with h2spec
Current version is using the hpack crate, we might need to write a new one at some point
Related issues:
some things to keep in mind for this implementation: https://github.com/Netflix/security-bulletins/blob/master/advisories/third-party/2019-002.md
With HTTP/3 coming, it’s high time to support http/2, isn’t it? Any idea when this support will be available?
In gitlab by @Geal on Jan 11, 2017, 11:15
right now, the proxy supports HTTP, HTTPS, TCP, and Websockets. It can upgrade a connection between protocols, but the condition is always that the protocol is the same for client<->proxy and proxy<->backend connections.
With HTTP/2, we want to support different use cases, like:
And this should be working with protocol upgrades as well.
First thoughts:
Plan (for now):