feat(block-explorers): add no_proxy to ClientBuilder#51
Open
coderHarrii wants to merge 3 commits intofoundry-rs:mainfrom
Open
feat(block-explorers): add no_proxy to ClientBuilder#51coderHarrii wants to merge 3 commits intofoundry-rs:mainfrom
no_proxy to ClientBuilder#51coderHarrii wants to merge 3 commits intofoundry-rs:mainfrom
Conversation
cf3b714 to
d4071cc
Compare
Mirrors `reqwest::ClientBuilder::no_proxy`, letting callers disable system proxy detection without having to construct their own `reqwest::Client`. This is useful in sandboxed environments where `reqwest`'s system proxy lookup can panic (for example on macOS when `SCDynamicStore` returns NULL). Has no effect when a custom client is supplied via `with_client`. Refs: foundry-rs/foundry#12733
d4071cc to
6ef287d
Compare
mablr
reviewed
Apr 24, 2026
Collaborator
mablr
left a comment
There was a problem hiding this comment.
makes sense, ty!
please run cargo +nightly fmt
mattsse
approved these changes
Apr 24, 2026
stevencartavia
approved these changes
Apr 24, 2026
DaniPopes
reviewed
Apr 24, 2026
Collaborator
@DaniPopes Indeed, this was submitted here: foundry-rs/foundry#14454 However, it introduces a new |
Member
|
there should only be one version anyway, we import reqwest everywhere anyway |
mablr
approved these changes
Apr 27, 2026
Collaborator
mablr
left a comment
There was a problem hiding this comment.
g2g if @DaniPopes has no objection
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
Mirrors [
reqwest::ClientBuilder::no_proxy] onfoundry_block_explorers::ClientBuilder, letting callers disable system proxy detection without having to construct their ownreqwest::Client.Motivation
In sandboxed environments (e.g., Cursor IDE, macOS App Sandbox, restricted shells)
reqwest's system proxy lookup viaSCDynamicStorecan crash with:foundry-rs/foundry#13155 already added a
--no-proxyflag for the RPC transport. foundry-rs/foundry#14454 does the same for the Etherscan path, but currently has to construct areqwest::Clientmanually and pipe it in viawith_client(..), which forcesfoundry-configto pull inreqwestdirectly.This PR moves the primitive to the right layer so the foundry-side fix can become a single
.no_proxy()call.Changes
no_proxy: boolfield toClientBuilder.ClientBuilder::no_proxy()method mirroringreqwest::ClientBuilder::no_proxy.with_client,no_proxyis ignored (user-provided client wins)..no_proxy().build().Follow-up
foundry-rs/foundry#14454 will be updated to call
.no_proxy()and drop its directreqwestdependency once this ships.