autoreg-kit: api-route + tokvi autoreg, health, new-api inject and gates
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""spawn_ar.py — параллельные браузерные реги api-route по прокси-лейнам."""
|
||||
import os, subprocess, sys, time
|
||||
PY = r"C:\Users\User\AppData\Local\Programs\Python\Python311\python.exe"
|
||||
TMP = r"C:\Users\User\tmp"
|
||||
PER = int(sys.argv[1]) if len(sys.argv) > 1 else 2
|
||||
PORTS = [("8891","p1"),("8892","p2"),("8893","p3"),("8894","p4")]
|
||||
DETACH = 0x00000008 | 0x00000200
|
||||
for port, tag in PORTS:
|
||||
env = dict(os.environ); env.pop("PYTHONPATH", None)
|
||||
env.update({"AR_PORT": port, "AR_TAG": tag, "USERPROFILE": r"C:\Users\User", "HOMEDRIVE": "C:", "HOMEPATH": r"\Users\User"})
|
||||
log = os.path.join(TMP, "ar_wave_%s.log" % port)
|
||||
out = open(log, "a", encoding="utf-8", errors="replace")
|
||||
p = subprocess.Popen([PY, os.path.join(TMP, "browser_reg_ar2.py"), str(PER)],
|
||||
cwd=TMP, stdout=out, stderr=subprocess.STDOUT, creationflags=DETACH, env=env)
|
||||
print("started", port, tag, p.pid, flush=True)
|
||||
time.sleep(3)
|
||||
Reference in New Issue
Block a user