3.3 KiB
3.3 KiB
New-API relay farm: wave ops (regfarm/github_oauth)
Farm location: C:/Users/User/tmp/regfarm/github_oauth — registers GitHub accounts onto free New-API relay panels via per-panel GitHub OAuth apps. GHSession goes through a rotating proxy pool; panels are hit DIRECT (panel-side 403s proxy IPs).
Pre-wave checklist
- Smoke-test existing pool keys before treating the pool as an asset. Free relay panels periodically purge/revoke user tokens — an entire aggregated pool (30 panels, ~1000 keys) can go 401
Invalid tokenin days. Test 2-3 keys per panel withPOST /v1/chat/completions(cheap model). Keys in pool CSVs are often stored WITHOUT thesk-prefix — auth needsBearer ***, try both forms before declaring a key dead. - Regenerate
_gh_proxies.json: selectalive=1fromC:/Users/User/Desktop/proxy_bot/proxies.db(tablepool), live-test each againsthttps://github.com/login(ThreadPool 40, ~12s timeout), write a flat JSON list of proxy URLs. GHSession round-robins this list and auto-rotates on network errors (-1). - Check per-panel frontiers:
_idx4_<panel>.txtline count = GH accounts consumed on that panel. Accounts are reusable ACROSS panels (each panel = a different GitHub OAuth client_id), so per-panel capacity = pool_size − idx4_count.
Wave run
- Runner:
OUTNAME=wave_<panel> PYTHONIOENCODING=utf-8 PYTHONPATH="" <Python311> reg_proxy100.py <panel> <start_idx> <count>; results inout/<OUTNAME>.json, redirect stdout towave_<panel>.log. PYTHONIOENCODING=utf-8is MANDATORY when redirecting to a file — the runner prints→and crashes under cp1252 on the first print, silently killing the whole wave (exit=1, near-empty log).- Run waves SEQUENTIALLY in one bash loop. Parallel waves = concurrent OAuth authorize hits from the same exit-IP pool → GitHub
state fail: POST 429rate explodes. - Before a long background run, do a 2-3 account sanity wave on the target panel and read the log — pipeline drift (dead proxies, panel changes) shows up in the first minutes, not hours.
Log-line classification
- Success:
user_id=N quota=... mode=token key=YES. authorize redirect without code: github.com/account/unverified-email— account email unverified; PERMANENT for that account, skip.callback http=200 Unable to connect to GitHub server— panel-side OAuth exchange failure; RETRYABLE.state fail: POST 429— GitHub OAuth app/IP rate limit; retryable later with pacing (runner already forces sleep ≥20s).WinError 10060proxy timeouts — auto-rotated, count as retryable if the account never got a code.- Expect ~30-50% yield per pass; plan a retry pass over retryable classes after the wave.
Pool quality
- The TAIL of
gh_accounts.json(high indices) tends to be unverified-email accounts — don't assume remaining idx capacity is usable; a 2-account probe reveals it. - Pool record shape:
{login, email, password, totp}.
Panel liveness rules
- 401
Invalid token(new-api error format) = panel ALIVE, keys dead → re-register. - HTTP 500
Database error= panel broken → skip. - 403
request blocked/ Cloudflare HTML = panel fronted/blocked → skip or browser path. - Never trust a forwarded post's model list — smoke-test with the panel's SMOKE_MODEL (see
reg_proxy100.py) immediately after registering.