Skip to content

upstream: force h1 for websocket upgrades when allow_connect is false on auto_config clusters#44317

Open
AdamEAnderson wants to merge 5 commits intoenvoyproxy:mainfrom
AdamEAnderson:aa/alpn-h1-websocket-upgrade
Open

upstream: force h1 for websocket upgrades when allow_connect is false on auto_config clusters#44317
AdamEAnderson wants to merge 5 commits intoenvoyproxy:mainfrom
AdamEAnderson:aa/alpn-h1-websocket-upgrade

Conversation

@AdamEAnderson
Copy link
Copy Markdown
Contributor

Commit Message: upstream: force h1 for websocket upgrades when allow_connect is false on auto_config clusters

Additional Description:

When a cluster uses http_protocol_options auto_config (for ALPN-based codec selection)
and the upstream supports both h1 and h2, websocket upgrade requests that originated downstream
as h1 upgrades are proxied to the upstream as HTTP/2 connections over extended CONNECT even when the
http2_protocol_options allow_connect flag is disabled.

These upgrades should be proxied as-is to the upstream as h1 websocket upgrade requests
when connect is flagged as supported by the upstream. This matches the docs for
allow_connect: Allows proxying Websocket and other upgrades over H2 connect.

This patch makes h1 websocket upgrades always use the h1 pool with ALPN-based pool selection
when allow_connect is not enabled. Non-ALPN-based clusters, clusters with allow_connect enabled,
non-websocket-upgrade-requests, etc are not changed.

Risk Level: medium: chance of breaking existing users who depend on these off-spec upgrades
Testing: included
Docs Changes: n/a
Release Notes: included
Platform Specific Features: n/a

(claude code assisted with parts of the changes)

… on auto_config clusters

Signed-off-by: Adam Anderson <6754028+AdamEAnderson@users.noreply.github.com>
Signed-off-by: Adam Anderson <6754028+AdamEAnderson@users.noreply.github.com>
Signed-off-by: Adam Anderson <6754028+AdamEAnderson@users.noreply.github.com>
Signed-off-by: Adam Anderson <6754028+AdamEAnderson@users.noreply.github.com>
@repokitteh-read-only
Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #44317 was opened by AdamEAnderson.

see: more, trace.

@AdamEAnderson
Copy link
Copy Markdown
Contributor Author

checks failing due to unrelated test flakes, will merge latest and make this ready for review

…pn-h1-websocket-upgrade

Signed-off-by: Adam Anderson <6754028+AdamEAnderson@users.noreply.github.com>
@AdamEAnderson AdamEAnderson marked this pull request as ready for review April 8, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant