reqwest-proxy-pool
Proxy pool middleware implementation for reqwest-middleware.
Features
✨ Comprehensive Proxy Support
- Automatic parsing of free SOCKS5/SOCKS5H proxies from multiple sources
- Built-in health checking with customizable timeout and test URL
⚡ Intelligent Proxy Management
- Multiple proxy selection strategies (FastestResponse, RoundRobin, Random)
- Per-proxy rate limiting to avoid bans
- Automatic retry mechanism for failed requests
- Custom response classifier for business-level proxy health (anti-bot/captcha detection)
🔧 Easy Configuration
- Simple builder pattern for configuration
- Seamless integration with reqwest middleware stack
Quickstart
Installation
Add to your Cargo.toml:
[]
= "0.13"
= "0.2"
= "0.5"
= { = "1", = ["full"] }
Usage
use ClientBuilder;
use ;
use Duration;
;
async
Configuration Options
| Option | Description | Default |
|---|---|---|
sources |
List of URLs providing proxy lists | Required |
health_check_interval |
Interval for background health checks | 300s |
health_check_timeout |
Timeout for proxy health checks | 10s |
min_available_proxies |
Min available proxies | 3 |
health_check_url |
URL to test proxy health | "https://www.google.com" |
retry_count |
Number of retries for failed requests | 3 |
selection_strategy |
Proxy selection algorithm | FastestResponse |
max_requests_per_second |
Rate limit per proxy | 5.0 |
response_classifier |
Custom response classifier for proxy health | DefaultResponseClassifier |
danger_accept_invalid_certs |
Accept invalid TLS certs (needed for most free proxies) | false |