docs: update all docs for container, cprofile, and config split

This commit is contained in:
user
2026-02-15 03:51:16 +01:00
parent a40c35cc0b
commit 20c7597ef9
7 changed files with 136 additions and 19 deletions

View File

@@ -11,12 +11,14 @@ through configurable chains of SOCKS4, SOCKS5, and HTTP CONNECT proxies.
- Per-hop authentication (username/password)
- DNS leak prevention (domain names forwarded to proxies, never resolved locally)
- Tor integration (Tor is just another SOCKS5 hop)
- Container-ready (Alpine-based, podman/docker)
- Graceful shutdown (SIGTERM/SIGINT)
- Pure Python, asyncio-based, minimal dependencies
## Quick Start
```bash
# Install
# Install locally
cd ~/git/s5p
python -m venv .venv && source .venv/bin/activate
pip install -e .
@@ -24,32 +26,49 @@ pip install -e .
# Run with Tor
s5p -C socks5://127.0.0.1:9050
# Run with a chain: Tor -> external proxy
s5p -C socks5://127.0.0.1:9050,socks5://proxy:1080
# Run with config file
s5p -c config/example.yaml
cp config/example.yaml config/s5p.yaml # edit with your proxies
s5p -c config/s5p.yaml
# Test it
curl --proxy socks5h://127.0.0.1:1080 https://check.torproject.org/api/ip
```
## Container
```bash
make build # podman-compose build
make up # podman-compose up -d
make logs # podman-compose logs -f
make down # podman-compose down
```
Source and config are bind-mounted, not baked into the image.
## Configuration
Copy the example and edit with your proxy chain:
```bash
cp config/example.yaml config/s5p.yaml
```
```yaml
listen: 127.0.0.1:1080
timeout: 10
chain:
- socks5://127.0.0.1:9050 # Tor
- socks5://user:pass@proxy:1080 # exit-side proxy
- socks5://user:pass@proxy:1080 # post-Tor proxy
- http://proxy2:8080 # HTTP CONNECT proxy
```
`config/s5p.yaml` is gitignored; `config/example.yaml` is the tracked template.
## CLI Reference
```
s5p [-c FILE] [-l [HOST:]PORT] [-C URL[,URL,...]] [-t SEC] [-v|-q]
s5p [-c FILE] [-l [HOST:]PORT] [-C URL[,URL,...]] [-t SEC] [-v|-q] [--cprofile [FILE]]
Options:
-c, --config FILE YAML config file
@@ -58,6 +77,7 @@ Options:
-t, --timeout SEC Per-hop timeout (default: 10)
-v, --verbose Debug logging
-q, --quiet Errors only
--cprofile [FILE] Enable cProfile, dump to FILE (default: s5p.prof)
-V, --version Show version
```