docs: document connection limit, async fetch, and connection pool
Update USAGE, CHEATSHEET, README, PROJECT, and TASKS for the three performance improvements: max_connections semaphore, async HTTP source fetching, and first-hop TCP connection pool.
This commit is contained in:
@@ -18,6 +18,9 @@ through configurable chains of SOCKS4, SOCKS5, and HTTP CONNECT proxies.
|
||||
- Dead proxy reporting to upstream API (optional `report_url`)
|
||||
- SIGHUP hot reload (timeout, retries, log_level, pool config)
|
||||
- Connection metrics with pool stats (logged periodically and on shutdown)
|
||||
- Concurrent connection limit with backpressure (`max_connections`)
|
||||
- Async HTTP client for proxy source fetching (parallel, no threads)
|
||||
- First-hop TCP connection pool (pre-warmed, stale-evicted)
|
||||
- Container-ready (Alpine-based, podman/docker)
|
||||
- Graceful shutdown (SIGTERM/SIGINT)
|
||||
- Pure Python, asyncio-based, minimal dependencies
|
||||
@@ -65,6 +68,8 @@ cp config/example.yaml config/s5p.yaml
|
||||
listen: 127.0.0.1:1080
|
||||
timeout: 10
|
||||
retries: 3
|
||||
max_connections: 256 # concurrent connection limit
|
||||
pool_size: 8 # pre-warmed connections to first hop
|
||||
|
||||
chain:
|
||||
- socks5://127.0.0.1:9050 # Tor
|
||||
@@ -84,7 +89,7 @@ proxy_pool:
|
||||
## CLI Reference
|
||||
|
||||
```
|
||||
s5p [-c FILE] [-l [HOST:]PORT] [-C URL[,URL,...]] [-S URL] [-t SEC] [-r N] [-v|-q]
|
||||
s5p [-c FILE] [-l [HOST:]PORT] [-C URL[,URL,...]] [-S URL] [-t SEC] [-r N] [-m N] [-v|-q]
|
||||
|
||||
Options:
|
||||
-c, --config FILE YAML config file
|
||||
@@ -93,6 +98,7 @@ Options:
|
||||
-S, --proxy-source URL Proxy source API URL
|
||||
-t, --timeout SEC Per-hop timeout (default: 10)
|
||||
-r, --retries N Max attempts per connection (default: 3, proxy_source only)
|
||||
-m, --max-connections N Max concurrent connections (default: 256)
|
||||
-v, --verbose Debug logging
|
||||
-q, --quiet Errors only
|
||||
--cprofile [FILE] Enable cProfile, dump to FILE (default: s5p.prof)
|
||||
|
||||
Reference in New Issue
Block a user