diff --git a/CLAUDE.md b/CLAUDE.md index 3f40e1b..af794ab 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,7 +6,7 @@ ┌──────────┬─────────────┬────────────────────────────────────────────────────────┐ │ Host │ Role │ Notes ├──────────┼─────────────┼────────────────────────────────────────────────────────┤ -│ odin │ Master │ Scrapes proxy lists, verifies conflicts, port 8081 +│ odin │ Master │ API server, serves URLs to workers, port 8081 │ cassius │ Worker │ Tests proxies, reports to master via WireGuard │ edge │ Worker │ Tests proxies, reports to master via WireGuard │ sentinel │ Worker │ Tests proxies, reports to master via WireGuard @@ -15,8 +15,8 @@ ### Role Separation -- **Odin (Master)**: Scrapes proxy sources, does verification tests only. No routine testing. Local Tor only. -- **Workers**: All routine proxy testing. Each uses only local Tor (127.0.0.1:9050). +- **Odin (Master)**: API server only. No proxy testing, no URL cycling. Serves `/api/claim-urls` to workers, receives results. Local Tor only. +- **Workers**: All URL fetching (via `/api/claim-urls`) and proxy testing. Each uses only local Tor (127.0.0.1:9050). ## CRITICAL: Directory Structure Differences @@ -41,6 +41,7 @@ tools/ ppf-deploy deploy wrapper (local validation + playbook) ppf-logs view container logs ppf-service manage containers (status/start/stop/restart) + ppf-db database operations (stats/purge-proxies/vacuum) playbooks/ deploy.yml ansible playbook (sync, compose, restart) inventory.ini hosts with WireGuard IPs + SSH key @@ -98,6 +99,14 @@ ppf-service stop cassius # stop specific worker ppf-service start workers # start all workers ``` +### Database Management + +```bash +ppf-db stats # proxy and URL counts +ppf-db purge-proxies # stop odin, delete all proxies, restart +ppf-db vacuum # reclaim disk space +``` + ### Direct Ansible (for operations not covered by tools) Use the toolkit inventory for ad-hoc commands over WireGuard: @@ -139,11 +148,15 @@ ansible -i $INV workers -m lineinfile \ tor_hosts = 127.0.0.1:9050 # Local Tor ONLY [watchd] -threads = 0 # NO routine testing -database = data/ppf.sqlite +threads = 0 # NO proxy testing +database = data/proxies.sqlite + +[ppf] +threads = 0 # NO URL cycling (workers handle it) +database = data/websites.sqlite [scraper] -threads = 10 +enabled = 0 # Disabled on master ``` ### Worker config.ini