Skip to content

Conversation

@ameba23
Copy link
Collaborator

@ameba23 ameba23 commented Feb 6, 2026

This Implements HTTP/1.1 upgrade tunneling in both proxy server and proxy client so standard WS clients can reach standard WS servers through the proxy.

It add a new --http-mode {http1,http2} flag for the client subcommand (default: http2). This means ws support is opt-in
and the default is http2 support with no ws upgrades.

Server continues to support both h2 and http/1.1; client selects based on flag.

Key changes

  • src/lib.rs: upgrade handling via hyper::upgrade::on, bidirectional stream tunnel, with_upgrades() for server/client HTTP/1.1, and new ProxyClientHttpMode.
  • src/http_version.rs: simplify HttpConnection to a boxed future to allow upgradeable HTTP/1 connection.
  • src/main.rs: new --http-mode flag for client.
  • src/attested_get.rs, src/file_server.rs: pass client mode in helpers/tests.
  • Cargo.toml/Cargo.lock: add hyper-tungstenite dependency.

Closes #86

@ameba23 ameba23 marked this pull request as draft February 6, 2026 08:35
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.

Support websocket proxying

1 participant