docs: update CLAUDE.md for ppf-db and corrected odin role
This commit is contained in:
25
CLAUDE.md
25
CLAUDE.md
@@ -6,7 +6,7 @@
|
|||||||
┌──────────┬─────────────┬────────────────────────────────────────────────────────┐
|
┌──────────┬─────────────┬────────────────────────────────────────────────────────┐
|
||||||
│ Host │ Role │ Notes
|
│ 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
|
│ cassius │ Worker │ Tests proxies, reports to master via WireGuard
|
||||||
│ edge │ 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
|
│ sentinel │ Worker │ Tests proxies, reports to master via WireGuard
|
||||||
@@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
### Role Separation
|
### Role Separation
|
||||||
|
|
||||||
- **Odin (Master)**: Scrapes proxy sources, does verification tests only. No routine testing. Local Tor only.
|
- **Odin (Master)**: API server only. No proxy testing, no URL cycling. Serves `/api/claim-urls` to workers, receives results. Local Tor only.
|
||||||
- **Workers**: All routine proxy testing. Each uses only local Tor (127.0.0.1:9050).
|
- **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
|
## CRITICAL: Directory Structure Differences
|
||||||
|
|
||||||
@@ -41,6 +41,7 @@ tools/
|
|||||||
ppf-deploy deploy wrapper (local validation + playbook)
|
ppf-deploy deploy wrapper (local validation + playbook)
|
||||||
ppf-logs view container logs
|
ppf-logs view container logs
|
||||||
ppf-service manage containers (status/start/stop/restart)
|
ppf-service manage containers (status/start/stop/restart)
|
||||||
|
ppf-db database operations (stats/purge-proxies/vacuum)
|
||||||
playbooks/
|
playbooks/
|
||||||
deploy.yml ansible playbook (sync, compose, restart)
|
deploy.yml ansible playbook (sync, compose, restart)
|
||||||
inventory.ini hosts with WireGuard IPs + SSH key
|
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
|
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)
|
### Direct Ansible (for operations not covered by tools)
|
||||||
|
|
||||||
Use the toolkit inventory for ad-hoc commands over WireGuard:
|
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
|
tor_hosts = 127.0.0.1:9050 # Local Tor ONLY
|
||||||
|
|
||||||
[watchd]
|
[watchd]
|
||||||
threads = 0 # NO routine testing
|
threads = 0 # NO proxy testing
|
||||||
database = data/ppf.sqlite
|
database = data/proxies.sqlite
|
||||||
|
|
||||||
|
[ppf]
|
||||||
|
threads = 0 # NO URL cycling (workers handle it)
|
||||||
|
database = data/websites.sqlite
|
||||||
|
|
||||||
[scraper]
|
[scraper]
|
||||||
threads = 10
|
enabled = 0 # Disabled on master
|
||||||
```
|
```
|
||||||
|
|
||||||
### Worker config.ini
|
### Worker config.ini
|
||||||
|
|||||||
Reference in New Issue
Block a user