LL-007++ · revive-guard 多用户邮箱绑定 · 冰朔7台全线部署
- revive-guard.py: 新增 TARGET_EMAIL / TARGET_NAME / SERVER_LABEL 配置 ⊢ 服务器环境变量决定验证码发到哪个邮箱 ⊢ 冰朔服务器默认: 565183519@qq.com ⊢ 之之服务器设置: TARGET_EMAIL=3205323524@qq.com - 邮箱 HTML UI 头部显示目标用户名 部署状态: ✅ BS-SG-001 (43.156.237.110) · revive-guard 已更新 ✅ BS-GZ-006 (43.139.217.141) · revive-guard 已更新+重启 ✅ BS-SG-002 (43.134.16.246) · revive-guard 已更新+重启 ✅ BS-SG-003 (43.153.193.169) · revive-guard 已更新+重启 ✅ ZY-SG-006 (43.153.203.105) · revive-guard 已更新+重启 ✅ BS-SH-005 (124.223.10.33) · revive-guard 已更新+重启 ⏳ ZZ-SV-001 (43.173.121.48) · 等之之Gatekeeper令牌 ⏳ ZZ-GZ-001 (193.112.126.174) · 等之之Gatekeeper令牌 [SEC-CLEAN] · 多用户系统就绪
This commit is contained in:
parent
b5e79e031a
commit
caff628aae
@ -37,6 +37,14 @@ PORT = int(os.environ.get("REVIVE_GUARD_PORT", "8922"))
|
||||
SOVEREIGN_ID = "ICE-GL∞"
|
||||
SOVEREIGN_EMAIL = os.environ.get("SOVEREIGN_EMAIL", "565183519@qq.com")
|
||||
|
||||
# 多用户支持:服务器绑定目标邮箱
|
||||
# ⊢ 冰朔的服务器默认发给 565183519@qq.com
|
||||
# ⊢ 之之的服务器设置 TARGET_EMAIL=3205323524@qq.com
|
||||
# ⊢ 服务器自己检测自己是哪台 → 自动发到对应邮箱
|
||||
TARGET_EMAIL = os.environ.get("TARGET_EMAIL", SOVEREIGN_EMAIL)
|
||||
TARGET_NAME = os.environ.get("TARGET_NAME", "冰朔 ICE-GL∞")
|
||||
SERVER_LABEL = os.environ.get("SERVER_LABEL", "") # 如 "之之硅谷·ZZ-SV-001"
|
||||
|
||||
# QQ 邮箱 SMTP(小湖灯邮件通道)
|
||||
# ⊢ 密码不进仓库 · 走环境变量 QQ_SMTP_AUTH_CODE
|
||||
SMTP_HOST = "smtp.qq.com"
|
||||
@ -83,7 +91,7 @@ def send_email(code, server_ip):
|
||||
<!-- 头部 -->
|
||||
<tr>
|
||||
<td style="padding:32px 32px 20px;text-align:center;border-bottom:1px solid #2a3f5f">
|
||||
<div style="font-size:13px;color:#4ec9b0;letter-spacing:3px;text-transform:uppercase;margin-bottom:8px">ICE-GL∞ 光湖语言系统</div>
|
||||
<div style="font-size:13px;color:#4ec9b0;letter-spacing:3px;text-transform:uppercase;margin-bottom:8px">ICE-GL∞ 光湖语言系统 · {TARGET_NAME}</div>
|
||||
<div style="font-size:20px;color:#e0e8f0;font-weight:600">🛡️ 守门人复活 · 验证码</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -175,7 +183,7 @@ def send_email(code, server_ip):
|
||||
|
||||
msg["Subject"] = f"🔐 光湖 · 复活验证码 {code[:3]}***"
|
||||
msg["From"] = SMTP_USER
|
||||
msg["To"] = SOVEREIGN_EMAIL
|
||||
msg["To"] = TARGET_EMAIL
|
||||
|
||||
with smtplib.SMTP_SSL(SMTP_HOST, SMTP_PORT, timeout=10) as s:
|
||||
s.login(SMTP_USER, SMTP_PASS)
|
||||
@ -316,7 +324,7 @@ class ReviveHandler(BaseHTTPRequestHandler):
|
||||
self.send_json(200, {
|
||||
"ok": True,
|
||||
"challenge_id": cid,
|
||||
"message": f"验证码已发送至 {SOVEREIGN_EMAIL}",
|
||||
"message": f"验证码已发送至 {TARGET_EMAIL}",
|
||||
"expires_in": CODE_TTL,
|
||||
"server": server_ip
|
||||
})
|
||||
@ -365,7 +373,7 @@ class ReviveHandler(BaseHTTPRequestHandler):
|
||||
if __name__ == "__main__":
|
||||
server = HTTPServer(("0.0.0.0", PORT), ReviveHandler)
|
||||
print(f"光湖·复活守门人 v1.0 · 监听 :{PORT}")
|
||||
print(f"主权者: {SOVEREIGN_ID} · 邮箱: {SOVEREIGN_EMAIL}")
|
||||
print(f"主权者: {SOVEREIGN_ID} · 目标邮箱: {TARGET_EMAIL}")
|
||||
try:
|
||||
server.serve_forever()
|
||||
except KeyboardInterrupt:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user