Skip to content

docs: Enhance proxy usage documentation with the correct usage#570

Merged
0x676e67 merged 3 commits into0x676e67:mainfrom
mrcsnv:main
Apr 14, 2026
Merged

docs: Enhance proxy usage documentation with the correct usage#570
0x676e67 merged 3 commits into0x676e67:mainfrom
mrcsnv:main

Conversation

@mrcsnv
Copy link
Copy Markdown

@mrcsnv mrcsnv commented Apr 14, 2026

Summary by CodeRabbit

  • Documentation
    • Expanded proxy configuration guide with examples for multiple proxy scoping methods
    • Documented per-client and per-request proxy application patterns
    • Added proxy authentication examples and clarifications on header behavior

mrcsnv added 3 commits April 14, 2026 15:07
Expanded the proxy usage documentation to include authentication, per-request proxies with custom headers, and clarified Unix socket proxy usage.
Updated the proxy usage example to reflect the new Client initialization with a list of proxies.
Fix formatting of bullet points in quickstart.md
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 14, 2026

📝 Walkthrough

Walkthrough

The pull request updates documentation for proxy usage in the wreq library, replacing references to the single-proxy pattern (Client(proxy=...)) with a new multi-proxy pattern (Client(proxies=[...])) and updating proxy imports to import directly from wreq rather than wreq.proxy. Two documentation files were modified with expanded explanations and examples.

Changes

Cohort / File(s) Summary
Quickstart Documentation
docs/source/getting-started/quickstart.md
Updated "Using Proxies" section to import Proxy from wreq and use Client(proxies=[...]) pattern instead of Client(proxy=...).
Proxy Usage Guide
docs/source/guide/proxy.md
Expanded proxy documentation with constructor reference table for Proxy.all(), Proxy.http(), Proxy.https(), and Proxy.unix(), documented per-client and per-request proxy configuration, added proxy authentication and SOCKS5 details, and updated Unix socket example to use proxies=[...] pattern.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Poem

🐰 Through proxy docs the rabbit hops,
Old patterns fade, new patterns crop,
A guide expanded, clear and bright,
Multi-proxies configured right!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title directly and specifically describes the main change: enhancing proxy usage documentation with correct usage patterns.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the proxy documentation to reflect API changes, specifically transitioning the Client constructor to use a proxies list and providing more detailed examples for authentication, custom headers, and Unix sockets. However, the documentation incorrectly uses the plural proxies parameter for per-request methods like wreq.get, which actually expect a single proxy object.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/source/guide/proxy.md`:
- Around line 19-21: Update the documentation to use the correct parameter name
"proxies" (plural) for per-request usage so it matches the examples; change the
sentence that currently shows wreq.get(..., proxy=...) to wreq.get(...,
proxies=[...]) and ensure references to Client(proxies=[...]), wreq.get(...,
proxies=[Proxy.all(...)]), and wreq.get(..., proxies=[Proxy.unix(...)]) are
consistent throughout the file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d4bc971b-11ac-4ec7-acb2-b629c7738a8f

📥 Commits

Reviewing files that changed from the base of the PR and between e3ae1a5 and 6039d80.

📒 Files selected for processing (2)
  • docs/source/getting-started/quickstart.md
  • docs/source/guide/proxy.md

Comment on lines +19 to +21
You can pass a proxy in two ways:
- **Per-client** via `Client(proxies=[...])` — applies to every request made by that client.
- **Per-request** via `wreq.get(..., proxy=...)` — overrides or sets a proxy for a single request.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix parameter name inconsistency.

Line 21 states that per-request proxies use proxy=... (singular), but all the per-request examples in this file use proxies=[...] (plural):

  • Line 103: await wreq.get(..., proxies=[Proxy.all(...)])
  • Line 136: await wreq.get(..., proxies=[Proxy.unix(...)])

The examples suggest the correct parameter name is proxies (plural) for both client-level and per-request usage.

📝 Proposed fix
 You can pass a proxy in two ways:
 - **Per-client** via `Client(proxies=[...])` — applies to every request made by that client.
-- **Per-request** via `wreq.get(..., proxy=...)` — overrides or sets a proxy for a single request.
+- **Per-request** via `wreq.get(..., proxies=[...])` — overrides or sets a proxy for a single request.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
You can pass a proxy in two ways:
- **Per-client** via `Client(proxies=[...])` — applies to every request made by that client.
- **Per-request** via `wreq.get(..., proxy=...)` — overrides or sets a proxy for a single request.
You can pass a proxy in two ways:
- **Per-client** via `Client(proxies=[...])` — applies to every request made by that client.
- **Per-request** via `wreq.get(..., proxies=[...])` — overrides or sets a proxy for a single request.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/source/guide/proxy.md` around lines 19 - 21, Update the documentation to
use the correct parameter name "proxies" (plural) for per-request usage so it
matches the examples; change the sentence that currently shows wreq.get(...,
proxy=...) to wreq.get(..., proxies=[...]) and ensure references to
Client(proxies=[...]), wreq.get(..., proxies=[Proxy.all(...)]), and
wreq.get(..., proxies=[Proxy.unix(...)]) are consistent throughout the file.

@0x676e67 0x676e67 changed the title Enhance proxy usage documentation with the correct usage. docs: Enhance proxy usage documentation with the correct usage Apr 14, 2026
@0x676e67 0x676e67 merged commit b083389 into 0x676e67:main Apr 14, 2026
1 check passed
@coderabbitai coderabbitai bot mentioned this pull request Apr 15, 2026
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