feat: 维护中国代理池并支持账号自动均匀使用

This commit is contained in:
2026-11-15 02:18:17 +08:00
parent aa26d00c60
commit ce2d6e08dd
20 changed files with 1733 additions and 162 deletions
+6
View File
@@ -64,13 +64,19 @@ async def lifespan(_app: FastAPI):
load_admin_identity()
stop_refresh = None
study_worker = None
stop_pool = None
if os.environ.get("EUNIV_DISABLE_REFRESH") != "1":
stop_refresh = start_credential_refresh()
from euniv.autostudy import start_autostudy
from euniv.proxy_pool import start_proxy_pool
study_worker = start_autostudy()
stop_pool = start_proxy_pool()
yield
if study_worker is not None:
study_worker.stop()
if stop_pool is not None:
stop_pool.set()
if stop_refresh is not None:
stop_refresh.set()