Skip to content

rust: forward intercepted HTTP via hyper+native-tls to drop ring#1973

Open
Shivam60 wants to merge 5 commits into
github:mainfrom
Shivam60:shchaw/drop-reqwest-remove-ring
Open

rust: forward intercepted HTTP via hyper+native-tls to drop ring#1973
Shivam60 wants to merge 5 commits into
github:mainfrom
Shivam60:shchaw/drop-reqwest-remove-ring

Conversation

@Shivam60

Copy link
Copy Markdown
Contributor

reqwest (forward_http) pins rustls/hyper-rustls optionals in Cargo.lock, dragging in ring (CG High, MVS-2022-374v-6mvc) even though only native-TLS is used and ring is never compiled. Replace reqwest with its underlying hyper+hyper-tls native-TLS stack (native-tls ALPN preserves HTTP/2). Removes ring/rustls entirely; all tests pass, clippy clean.

Comment thread rust/tests/e2e/mcp_oauth.rs Fixed
Two fixes so this actually drops ring and passes CI:

- Commit the regenerated Cargo.lock. Cargo.toml had already moved off reqwest
  to the hyper stack, but the lockfile was not updated, so ring/rustls/reqwest
  were still locked (the whole point is to remove them) and the lock was out of
  sync with the manifest, failing the Rust test jobs. Regenerating removes ring,
  rustls, hyper-rustls, tokio-rustls and untrusted.

- Rewrite OAuthMcpServer::requests over the hyper-util legacy Client. The
  previous version called hyper::body::to_bytes, which no longer exists in
  hyper 1.x, and had trailing whitespace that failed cargo fmt --check.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Shivam60 Shivam60 marked this pull request as ready for review July 13, 2026 16:30
@Shivam60 Shivam60 requested a review from a team as a code owner July 13, 2026 16:30
Copilot AI review requested due to automatic review settings July 13, 2026 16:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use premium requests, select a billing entity via the GitHub site, under Settings > Copilot > Features.

@stephentoub stephentoub left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this no longer respect proxy configuration, e.g. HTTP_PROXY, HTTPS_PROXY, and NO_PROXY?

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.

4 participants