Add h2c origin support#2
Closed
mannie-exe wants to merge 6 commits into
Closed
Conversation
- Add t.Parallel() to TestHTTPResponseAdapterAddTrailerLogs and subtests - Add t.Parallel() to TestHttp2OriginWithHTTPSchemeWarning and subtests - Replace ignored error with explicit require.Error assertion for the https+http2Origin case where TLS cert loading fails as expected
Author
|
Superseded by #3 from |
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
originRequest.h2cOriginand--h2c-originfor HTTP/2 cleartext origin connections.http2.Transport{AllowHTTP: true}forhttp://origins when h2c origin mode is enabled.h2cOriginconfigurations withhttps://origins or simultaneoushttp2Origin.http2Originis configured for a cleartexthttp://origin, where Go falls back to HTTP/1.1.--protocol http2for gRPC trailer support.Scope
This does not implement full gRPC support or QUIC trailer transport. It only adds the h2c origin transport path and related warnings.
Fixes cloudflare#1304.
Refs cloudflare#682.
Testing
git diff --checkgo test -mod=vendor ./config ./ingress ./connectiongo test -mod=vendor ./cmd/cloudflared/tunnelHOME="$(mktemp -d)" make test lintgo run -mod=vendor ./cmd/cloudflared tunnel --help | rg "h2c-origin"go run -mod=vendor ./cmd/cloudflared tunnel --h2c-origin --helpcloudflared tunnel ingress validatesmoke tests for validh2cOriginand invalidh2cOrigin + http2Origin