4.1 KiB
Dashboard + Multi-Reg System
New components added 2026-07-30 for the Conol pool distribution package.
Architecture additions
conol_autoreg/
├── dashboard_server.py # FastAPI live dashboard (15 KB) — port 9988
├── multi_reg.py # Multi-threaded parallel registration (20 KB)
├── start_all.bat # Unified launcher with menu (3.3 KB)
├── chrome_cdp.bat # Chrome CDP launcher (667 B)
├── config.example.json # Template config for distribution (734 B)
├── requirements.txt # Python dependencies
└── README.md # User-facing guide (3 KB)
Dashboard (port 9988)
FastAPI server with dark HTML interface, auto-refresh every 3s.
API endpoints:
GET /api/status— full pool + gateway statusGET /api/accounts— account listGET /api/queue— email queuePOST /api/queue/add— add email to queue (JSON body:{email, password})POST /api/reload— signal gateway to reload accountsGET /api/queue/clear— clear queue
HTML interface features:
- Stats cards: Alive, Dead, Total Credits, Avg Credits, Reg Today, Gateway
- Full account table with credits bars
- Email queue section with add form
- Action buttons: Refresh, Start Registration, Farm Quests, Reload Gateway
Startup:
python dashboard_server.py
# → http://127.0.0.1:9988
Multi-Threaded Registration (multi_reg.py)
Reads email_queue.jsonl, registers N accounts per email in parallel.
Usage:
python multi_reg.py 3 2
# 3 = accounts per email
# 2 = max parallel threads
Flow per email:
- Uses Chrome CDP via Playwright (
connect_over_cdp) asyncio.Semaphorecontrols concurrency- Per account: signup → recaptcha → send verification → IMAP wait → verify → login
- Saves cookies → appends to
conol_accounts_pool.jsonl - After registration: auto-farms all 6 quests
- Updates
email_queue.jsonlstatus:queued→registering→registered→quests_done
Gmail verification runs in ThreadPoolExecutor (parallel across clients):
loop.run_in_executor(None, wait_for_verify_link_sync, gmail_addr, gmail_app, alias, since_epoch)
Unified Launcher (start_all.bat)
Single .bat with 9-option menu:
- Start Gateway (9999)
- Start Dashboard (9988)
- Start BOTH + Chrome CDP
- Start Multi-Reg (from email queue)
- Start ALL (Gateway + Dash + CDP)
- Register N accounts (manual)
- Farm Quests (all accounts)
- Check Status / Health
- Kill All
Auto-checks: Python installed, deps available, config.json valid, Chrome CDP running, gateway alive.
Distribution Package
For giving to other people:
- They copy
conol_autoregfolder (minus yourconfig.json) - Copy
config.example.json→config.json, fill their gmail + app password - Install deps:
pip install fastapi uvicorn httpx playwright requests pyyaml - Install Chromium:
playwright install chromium - Run
start_all.bat - Dashboard opens at
http://127.0.0.1:9988 - Add emails via dashboard form → run multi_reg
FastAPI Pitfall: Request Body Parsing
# ❌ WRONG — FastAPI treats `request: dict` as query parameter
@app.post("/api/queue/add")
async def queue_add(request: dict):
email = request.get("email") # → None!
# ✅ CORRECT — use `from fastapi import Request` + await request.json()
from fastapi import FastAPI, HTTPException, Request
@app.post("/api/queue/add")
async def queue_add(request: Request):
body = await request.json()
email = body.get("email") # → works!
Reason: FastAPI only auto-parses JSON body into Pydantic models or when using Body(). A bare dict type annotation is treated as a query parameter, not a body parameter. The Request object's .json() method gives direct access.
Port Conflict Resolution (Windows)
When a process dies but leaves port occupied:
# Find PID on port
netstat -ano | grep 9988
# Kill via PowerShell (taskkill fails in git-bash)
powershell -Command "Stop-Process -Id <PID> -Force"
Do NOT use taskkill //PID in git-bash — syntax fails. Use PowerShell Stop-Process instead.