Add no_proxy support#40
Merged
Merged
Conversation
Per-request no_proxy list that bypasses the configured proxy. Matches exact hostnames, domain suffixes (*.corp), IPs, and CIDRs. Exposed on request/download/raw_connect/BatchConfig and the --no-proxy CLI flag. Bump to 0.8.0.
Compare host against suffixes on bytes via eq_ignore_ascii_case instead of lowercasing the host and building a format! string per pattern. Runs per request when a proxy is set.
The connection mode (direct vs forward-proxy/tunnel/socks5) was decided once before the redirect loop, so a cross-host redirect kept the first URL's decision. With no_proxy set this could route a redirected request directly past the proxy, or send a no_proxy host through the proxy. Move the conn_mode decision inside the redirect loop so it is recomputed against each hop's host. Clients are still cached per mode, so hops that share a mode reuse the same client. Add CLI (tests/cli_no_proxy.rs) and Python-binding (tests/python/test_no_proxy.py) regression tests covering both directions of a cross-host redirect.
liquidsec
force-pushed
the
no-proxy-support
branch
from
June 3, 2026 15:55
59ad243 to
2c86b72
Compare
ausmaster
approved these changes
Jun 3, 2026
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.
Adds a
no_proxyoption so requests to specific hosts bypass the configured proxy (the NO_PROXY equivalent).no_proxyis a per-request list, exposed onrequest(),download(),raw_connect(),BatchConfig, and the--no-proxyCLI flag. Each entry matches:*.corp,.corp, orcorp(matches the domain itself and any subdomain)127.0.0.1,::1)10.0.0.0/8,fd00::/8)*for all hostsMatching happens at the connection-mode decision, so it applies to both the pooled hyper path and the raw
connect_streampath. When a host matches, the request connects directly as if no proxy were set.Bumps version to 0.8.0.