- Console:React 19 + antd 6.6.5 前端(登录 admin/admin)+ Hono 管理 API (Nodes/Domains/Mailboxes/Emails/Webhooks/Keys/OAuth/Admin) - Node:Bun 转发节点(HMAC 签名、有限重试、心跳、结构化日志、优雅退出) - Email Worker:Cloudflare email handler + 本地联调入口 - shared:HMAC 协议(docs/04)、wmh_ Key(32 位)、AES-GCM 加密、SSRF 防护 - 邮件管线:postal-mime 解析、附件、catch-all、限额、malformed 降级、TTL 1 天 - Webhook:签名投递、指数退避重试、SSRF 校验、投递日志 - API v1 + MCP(JSON-RPC,六工具,凭据 kind 隔离) - Cloudflare OAuth:真实 + 本地 sim 模式,自动安装管线(幂等,无需手工命令) - 测试:bun test 41 例(协议安全/管线/TTL/Webhook/SSRF/MCP/OAuth/鉴权)+ Playwright UI 冒烟 - LOGO/favicon 由 codex CLI 生成
1.3 KiB
1.3 KiB
数据模型
核心实体:CloudflareAccount、Node、Domain、Mailbox、Email、EmailAttachment、Webhook、WebhookDelivery、OAuthConnection。
nodes
id, name, cloudflare_account_id, credential_id, status, version, last_seen_at, created_at, updated_at
domains
id, cloudflare_account_id, node_id, name, status, worker_id, created_at, updated_at
mailboxes
id, domain_id, address, status, retention_seconds, created_at, updated_at
emails
id, node_id, mailbox_id nullable, message_id, from_address, to_addresses,
cc_addresses, subject, text_body, html_body, raw_storage_key, size,
received_at, expires_at, created_at
Node 可以不知道 mailbox_id。Console 收到邮件后,根据邮件内容和自身配置关联。
email_attachments
id, email_id, filename, content_type, size, storage_key, content_id
webhooks
id, name, endpoint, secret, enabled, created_at, updated_at
webhook_deliveries
id, webhook_id, email_id, status, attempt_count, next_retry_at, last_error, delivered_at, created_at
oauth_connections
id, provider, account_id, encrypted_access_token, refresh_token, expires_at, created_at, updated_at
OAuth token 必须加密存储。所有 Email 必须有 expires_at,默认 retention 为 86400 秒。