Skip to content

fix: upgrade reqwest to 0.13 with native CA cert support for non-Windows#1

Merged
dwhoban merged 3 commits into
mainfrom
copilot/update-reqwest-allow-local-ca
Mar 20, 2026
Merged

fix: upgrade reqwest to 0.13 with native CA cert support for non-Windows#1
dwhoban merged 3 commits into
mainfrom
copilot/update-reqwest-allow-local-ca

Conversation

Copilot AI commented Mar 20, 2026

Copy link
Copy Markdown

vp install fails behind MITM proxies (e.g., Zscaler in WSL2) because reqwest 0.12 with rustls-tls uses only Mozilla's bundled WebPKI roots — ignoring system-installed CA certificates entirely.

Changes

  • Cargo.toml: Bump reqwest workspace dependency 0.120.13
  • crates/vite_install, vite_error, vite_js_runtime: On non-Windows, replace rustls-tls with rustls + rustls-native-certs
# Before
reqwest = { workspace = true, features = ["stream", "rustls-tls", "json"] }

# After
reqwest = { workspace = true, features = ["stream", "rustls", "rustls-native-certs", "json"] }

rustls-native-certs loads from the OS trust store (e.g., /etc/ssl/certs/ca-certificates.crt on Debian/Ubuntu, Keychain on macOS), so enterprise CAs installed by proxy tools are automatically trusted. Windows already used native-tls-vendored which reads from the system store and is unchanged.

Note: reqwest 0.13 renamed the TLS feature flags — rustls-tls no longer exists; the equivalent is now rustls + an explicit roots feature (rustls-native-certs or webpki-roots).


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: dwhoban <5687870+dwhoban@users.noreply.github.com>
Copilot AI changed the title [WIP] Update reqwest and ensure config allows loading local CA certs fix: upgrade reqwest to 0.13 with native CA cert support for non-Windows Mar 20, 2026
Copilot AI requested a review from dwhoban March 20, 2026 10:06
@dwhoban dwhoban marked this pull request as ready for review March 20, 2026 10:12
Copilot AI review requested due to automatic review settings March 20, 2026 10:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Upgrades the workspace’s HTTP stack to reqwest 0.13 and adjusts non-Windows TLS configuration so vp install can trust enterprise / system-installed CA certificates (e.g., MITM proxies in WSL2) by using native trust stores.

Changes:

  • Bump workspace reqwest dependency from 0.120.13.
  • On non-Windows targets, switch reqwest TLS feature flags from rustls-tls to rustls + rustls-native-certs in affected crates.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
Cargo.toml Updates the workspace reqwest version to 0.13.
crates/vite_install/Cargo.toml Switches non-Windows reqwest TLS features to use native certs.
crates/vite_error/Cargo.toml Switches non-Windows reqwest TLS features to use native certs.
crates/vite_js_runtime/Cargo.toml Switches non-Windows reqwest TLS features to use native certs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Cargo.toml Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Dan Hoban <5687870+dwhoban@users.noreply.github.com>
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.

3 participants