From 076213a830968092ca8a4810ce572b3a1af56fe6 Mon Sep 17 00:00:00 2001 From: user Date: Sun, 15 Feb 2026 17:05:51 +0100 Subject: [PATCH] docs: document data volume mount and container profiling Co-Authored-By: Claude Opus 4.6 --- PROJECT.md | 3 ++- README.md | 3 ++- docs/CHEATSHEET.md | 4 ++++ docs/USAGE.md | 7 ++++++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/PROJECT.md b/PROJECT.md index 24b4d94..3720e37 100644 --- a/PROJECT.md +++ b/PROJECT.md @@ -33,7 +33,8 @@ Client -------> s5p -------> Hop 1 -------> Hop 2 -------> Target | Local venv | `pip install -e .` then `s5p -c config/s5p.yaml` | | Container | `make build && make up` (Alpine, ~59MB) | -Container mounts `./src` and `./config/s5p.yaml` read-only at runtime. +Container mounts `./src` and `./config/s5p.yaml` read-only, plus +`~/.cache/s5p` as `/data` for pool state and profile output. No application code is baked into the image. ## Dependencies diff --git a/README.md b/README.md index 013cd72..55c83d4 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,8 @@ make logs # podman-compose logs -f make down # podman-compose down ``` -Source and config are bind-mounted, not baked into the image. +Source, config, and data are bind-mounted, not baked into the image. +Pool state and profile output persist in `~/.cache/s5p/` (`/data` inside container). ## Configuration diff --git a/docs/CHEATSHEET.md b/docs/CHEATSHEET.md index 8bd1109..a44d6dc 100644 --- a/docs/CHEATSHEET.md +++ b/docs/CHEATSHEET.md @@ -26,6 +26,8 @@ make logs # podman-compose logs -f make down # podman-compose down ``` +Volumes: `./src` (ro), `./config/s5p.yaml` (ro), `~/.cache/s5p` → `/data` (pool state + profiles) + ## Config ```bash @@ -92,7 +94,9 @@ curl --max-time 30 -x socks5h://127.0.0.1:1080 https://example.com ## Profiling ```bash +# Enable in compose.yaml: uncomment the command line python -m pstats s5p.prof # interactive stats viewer +python -m pstats ~/.cache/s5p/s5p.prof # container profile output ``` ## Metrics Log diff --git a/docs/USAGE.md b/docs/USAGE.md index e564b7b..d6dc42c 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -84,7 +84,8 @@ make down # stop and remove container ``` Source (`./src`) and config (`./config/s5p.yaml`) are mounted read-only -into the container. Edit locally, restart to pick up changes. +into the container. `~/.cache/s5p` is mounted as `/data` for pool state +and profile output. Edit locally, restart to pick up changes. ## Proxy Pool @@ -281,6 +282,10 @@ s5p --cprofile -c config/s5p.yaml # Custom output file s5p --cprofile output.prof -c config/s5p.yaml +# Container: uncomment the command line in compose.yaml +# command: ["-c", "/app/config/s5p.yaml", "--cprofile", "/data/s5p.prof"] +# Profile output persists at ~/.cache/s5p/s5p.prof on the host. + # Analyze after stopping python -m pstats s5p.prof ```