✨ What's New
This release introduces proxy pool support with automatic direct-connection fallback and improves transport reliability.
Added
- Proxy pool support with automatic proxy rotation.
- Fallback to direct connections when all proxies are unavailable.
- Proxy Support link in the table of contents.
ClientConfig(proxy_list=[...])examples in the client configuration section.- New
Proxy Supportdocumentation section. - Example proxy entries in the Examples table.
- Reference to
examples/proxy-usage.py.
Proxy Support
The new proxy system includes:
- Support for the following proxy schemes:
httphttpssocks4socks4asocks5socks5h
- Round-robin proxy selection on every request.
- Failed proxies are temporarily disabled for the lifetime of the client instance.
- Automatic fallback to
proxies=Nonewhen all proxies fail. - HTTP
429and5xxresponses do not permanently disable proxies. - Transport logging that never exposes proxy credentials.
Example
client = ClientConfig(
proxy_list=[
"http://user:password@proxy-1.example.com:8080",
"http://user:password@proxy-2.example.com:8080",
]
)