Skip to content

feat(cyper): proxy support#57

Merged
Berrysoft merged 11 commits into
compio-rs:masterfrom
Berrysoft:dev/proxy
Apr 30, 2026
Merged

feat(cyper): proxy support#57
Berrysoft merged 11 commits into
compio-rs:masterfrom
Berrysoft:dev/proxy

Conversation

@Berrysoft

Copy link
Copy Markdown
Member

No description provided.

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.

Pull request overview

Adds first-class proxy support to the cyper HTTP client, including forward proxies, CONNECT tunneling for HTTPS, optional SOCKS support, and related integration tests.

Changes:

  • Introduces cyper::proxy module with Proxy/NoProxy configuration and matching logic (including env/system proxy support).
  • Updates client/connector/stream plumbing to route connections via matched proxies, including CONNECT tunneling and proxy auth handling.
  • Adds comprehensive proxy integration tests (forward proxy, auth, CONNECT behavior, multiple proxies, no-proxy bypass).

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
cyper/src/proxy.rs New proxy configuration/matching layer (Proxy, NoProxy, matchers, auth/headers helpers).
cyper/src/client.rs ClientBuilder proxy configuration + request-time injection of proxy auth/custom headers.
cyper/src/connector.rs Proxy-aware connector: chooses between direct, forward-proxy, CONNECT tunnel, and SOCKS paths.
cyper/src/stream.rs Refactors HttpStream to carry proxy/H2 flags, adds wrapping/splitting support for proxy + tunneled flows.
cyper-core/src/stream.rs Adds futures_util::AsyncRead/AsyncWrite impls to support splitting/wrapping strategy.
cyper/tests/proxy.rs New integration tests covering forward proxy, auth, CONNECT error handling, no-proxy bypass, and proxy selection.
cyper/src/lib.rs Exposes proxy module publicly and adds Error::Proxy.
cyper/src/nyquest/mod.rs Enables use_default_proxy behavior by toggling proxy usage instead of erroring.
cyper/src/into_url.rs Extends IntoUrl with as_str() to support proxy URL parsing convenience.
cyper/src/backend.rs Switches TLS cfg gating to the new tls cfg alias.
cyper/build.rs Adds cfg_aliases build script for tls cfg alias.
cyper/Cargo.toml Enables hyper-util proxy support, adds cfg_aliases build-dep, introduces socks feature flag.
Cargo.toml Adds cfg_aliases to workspace dependencies.

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

Comment thread cyper/src/client.rs
Comment thread cyper/src/client.rs Outdated
Comment thread cyper/tests/proxy.rs
Comment thread cyper/tests/proxy.rs
Comment thread cyper/src/connector.rs
@Berrysoft
Berrysoft merged commit 3a135c2 into compio-rs:master Apr 30, 2026
27 checks passed
@Berrysoft
Berrysoft deleted the dev/proxy branch April 30, 2026 07:27
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.

2 participants