docs: update project docs for SIGHUP reload and dead proxy reporting

Add hot reload section to USAGE with reloadable settings table.
Add dead proxy reporting section with report_url config and payload
format. Update example.yaml, ROADMAP, TASKS, TODO, CHEATSHEET.
This commit is contained in:
user
2026-02-15 16:05:39 +01:00
parent 650db64d70
commit a5e634e406
8 changed files with 60 additions and 3 deletions

View File

@@ -107,6 +107,7 @@ proxy_pool:
test_concurrency: 5 # parallel health tests
max_fails: 3 # evict after N consecutive failures
state_file: "" # empty = ~/.cache/s5p/pool.json
report_url: "" # POST dead proxies here (optional)
```
### Sources
@@ -180,6 +181,24 @@ of all proxies runs in the background. This reduces startup blocking from
minutes to seconds on warm restarts. Cold starts (no state file) test all
proxies before serving.
### Dead proxy reporting
When `report_url` is set, evicted proxies are POSTed to the upstream API
after each health test cycle. This helps the source maintain list quality.
```yaml
proxy_pool:
report_url: http://10.200.1.250:8081/proxies/report
```
Payload format:
```json
{"dead": [{"proto": "socks5", "proxy": "1.2.3.4:1080"}, ...]}
```
Reporting is fire-and-forget; failures are logged at debug level only.
### CLI shorthand
```bash
@@ -208,6 +227,30 @@ retries: 5 # try up to 5 different proxies per connection
s5p -r 5 -C socks5://127.0.0.1:9050 -S http://api:8081/proxies
```
## Hot Reload
Send `SIGHUP` to reload the config file without restarting:
```bash
kill -HUP $(pidof s5p)
# or in a container:
podman kill --signal HUP s5p
```
Settings reloaded on SIGHUP:
| Setting | Effect |
|---------|--------|
| `timeout` | Per-connection timeout |
| `retries` | Max retry attempts |
| `log_level` | Logging verbosity |
| `proxy_pool.*` | Sources, intervals, thresholds |
Settings that require a restart: `listen`, `chain`.
Requires `-c` / `--config` to know which file to re-read. Without a
config file, SIGHUP is ignored with a warning.
## Metrics
s5p tracks connection metrics and logs a summary every 60 seconds and on