Add bblbb mail provider and CPA push queue; sync runtime artifacts.
Switch default email provider to mail.bblbb.com, queue failed CPA auth pushes for retry, and refresh local auth/account outputs.
This commit is contained in:
1 parent
a4dbe948b2
commit
df9213463d
710 files changed
+742
-13418
No files matched your search
+24
-25
@@ -203,39 +203,38 @@ def export_cpa_for_account(
|
||||
"referrer": ref,
|
||||
}
|
||||
|
||||
# 推送远端 CLIProxyAPI
|
||||
# 推送远端 CLIProxyAPI(失败记入 cpa_push_pending.txt,下次推送时一并重试)
|
||||
if cfg.get("cpa_push_enabled", False):
|
||||
remote_base = str(cfg.get("cpa_remote_base") or "").strip()
|
||||
secret = str(cfg.get("cpa_remote_secret") or "").strip()
|
||||
if not remote_base or not secret:
|
||||
log("[!] 推送已开启但未配置 cpa_remote_base/cpa_remote_secret,跳过推送")
|
||||
cpa.record_push_failure(out_dir, filename, "remote not configured")
|
||||
else:
|
||||
push_proxy = str(cfg.get("cpa_push_proxy") or "").strip() or None
|
||||
verify_tls = bool(cfg.get("cpa_remote_verify_tls", True))
|
||||
try:
|
||||
ok, status, text = cpa.push_auth_file(
|
||||
remote_base=remote_base,
|
||||
secret=secret,
|
||||
filename=filename,
|
||||
payload=payload,
|
||||
proxy=push_proxy,
|
||||
verify_tls=verify_tls,
|
||||
push_res = cpa.push_with_queue(
|
||||
out_dir,
|
||||
filename,
|
||||
payload,
|
||||
remote_base=remote_base,
|
||||
secret=secret,
|
||||
proxy=push_proxy,
|
||||
verify_tls=verify_tls,
|
||||
flush_first=True,
|
||||
log=log,
|
||||
)
|
||||
result["pushed"] = bool(push_res.get("pushed"))
|
||||
if "push_status" in push_res:
|
||||
result["push_status"] = push_res["push_status"]
|
||||
if push_res.get("push_error"):
|
||||
result["push_error"] = push_res["push_error"]
|
||||
if push_res.get("flush"):
|
||||
result["push_flush"] = push_res["flush"]
|
||||
if not result["pushed"] and cfg.get("cpa_push_required", False):
|
||||
result["ok"] = False
|
||||
result["error"] = (
|
||||
f"push: {result.get('push_error') or result.get('push_status')}"
|
||||
)
|
||||
result["push_status"] = status
|
||||
if ok:
|
||||
result["pushed"] = True
|
||||
log(f"[Debug] 已推送远端: {remote_base} (HTTP {status})")
|
||||
else:
|
||||
result["push_error"] = text[:300]
|
||||
log(f"[!] [cpa] 推送远端失败 HTTP {status}: {text[:200]}")
|
||||
if cfg.get("cpa_push_required", False):
|
||||
result["ok"] = False
|
||||
result["error"] = f"push HTTP {status}: {text[:200]}"
|
||||
except Exception as exc: # noqa: BLE001
|
||||
log(f"[!] [cpa] 推送远端异常: {exc}")
|
||||
result["push_error"] = str(exc)
|
||||
if cfg.get("cpa_push_required", False):
|
||||
result["ok"] = False
|
||||
result["error"] = f"push: {exc}"
|
||||
|
||||
return result
|
||||
Reference in new issue
Block a user