feat: multi-listener with configurable proxy chaining
Each listener binds to its own port with an independent chain. The "pool" keyword in a chain appends a random alive proxy from the shared pool; multiple pool entries = multiple hops. :1080 -> Tor only (0 pool hops) :1081 -> Tor + 1 pool proxy :1082 -> Tor + 2 pool proxies Shared resources (ProxyPool, Tor, metrics, semaphore, API) are reused across listeners. FirstHopPool is shared per unique first hop. Backward compatible: old listen/chain format still works.
This commit is contained in:
@@ -38,6 +38,24 @@ Volumes: `./src` (ro), `./config/s5p.yaml` (ro), `~/.cache/s5p` → `/data` (poo
|
||||
cp config/example.yaml config/s5p.yaml # create live config (gitignored)
|
||||
```
|
||||
|
||||
## Multi-Listener (config)
|
||||
|
||||
```yaml
|
||||
listeners:
|
||||
- listen: 0.0.0.0:1080
|
||||
chain:
|
||||
- socks5://127.0.0.1:9050 # Tor only
|
||||
- listen: 0.0.0.0:1081
|
||||
chain:
|
||||
- socks5://127.0.0.1:9050
|
||||
- pool # Tor + 1 pool hop
|
||||
- listen: 0.0.0.0:1082
|
||||
chain:
|
||||
- socks5://127.0.0.1:9050
|
||||
- pool # Tor + 2 pool hops
|
||||
- pool
|
||||
```
|
||||
|
||||
## Performance Tuning (config)
|
||||
|
||||
```yaml
|
||||
|
||||
Reference in New Issue
Block a user