Repository navigation
Add native HTTP/2 proxy support with TLS ALPN and isolated CONNECT streams - #2
Merged
Merged
Conversation
Add opt-in h2c, bounded stream/request resources, independent per-stream idle and cancellation lifetimes, tracked H2 drivers, and local TLS/H2 regressions. Preserve HTTP1 forwarding and end-to-end origin TLS in CONNECT.
Use a bounded H2-only relay that observes upgrade writer reset errors without inserting bytes or disturbing valid half-close. Correct the stream-limit regression to assert actual wire dispatch, not h2 readiness.
Remove the temporary feature-branch preparation workflow; retain only read-only checks. Add a TLS configuration example and ignore deployment private keys. Run all regressions, Clippy, release build and config checks.
Owner
Author
|
Verified final head All jobs passed:
The temporary branch preparation workflow is absent from this final tree; retained CI has read-only contents permission. No deployment certificates or private keys were committed. PR remains unmerged; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add native client-to-proxy HTTP/2, not just opaque HTTP/2 bytes inside an HTTP/1 CONNECT tunnel. Retain HTTP/1 compatibility and keep deployment to one executable with optional PEM certificate/key files.
Protocol support
h2/http/1.1, HTTP/1 fallback without ALPN, bounded TLS handshake deadline, and disabled TLS early data.AllowH2C; fragmented prefaces have a total deadline and sniffed bytes are preserved. No h2c Upgrade support.Resource and lifecycle controls
MaxConcurrentStreams(default 32) per H2 connection andMaxInflightRequests(default 256) across the process. Requests beyond application capacity receive 503 rather than entering an unbounded queue.Verification
scripts/test_curl_proxy.py: real curl interoperability against local HTTP/HTTPS origins, with generated throwaway certificates and full verification. No public Internet origin or insecure TLS bypass.config/http2-tls.conf.exampleand exclude deployment keys/certificates from Git tracking.Scope / limitations
HeaderTimeoutcovers HTTP/1 request headers and initial H2 preface detection, not a separate deadline for every fragmented H2 HEADERS/CONTINUATION block after negotiation. Resource/reset limits are not a complete DoS defense.Manual use
Supply a certificate valid for the proxy hostname and matching PEM private key, then validate/run the TLS example. With an HTTP/2-enabled curl 8.1+:
--proxy-http2negotiates the proxy hop;--http2concerns the origin. See the updated README for exact supported hops, secure defaults, configuration and known limitations.