GitHub Issue

feat(downstream): 加更多导出渠道(Webhook / Telegram / Discord / Notion / 文件导出)

Discovered On May 1, 2026
Primary Metric open
## 背景 当前 `webui/frontend/src/components/steps/Step11_Downstream.vue` 的下游推送只有两个选项: - **gpt-team** — 自家 team 管理 API - **CPA** — 自家平台 对外部贡献者 / 个人用户基本没用 —— 注册完账号 / 跑完支付后想把结果(邮箱密码、Plus 订阅状态、tokenized GoPay account)推到自己常用的地方,目前要么改代码要么手动复制粘贴。 ## 想要做什么 把「下游推送」改成插件化的 exporter 框架: ``` class Exporter(Protocol): name: str def export(self, account: AccountResult) -> ExportResult: ... ``` `AccountResult` 至少包含:邮箱、密码、订阅状态、tokenized 凭证(可选)、自定义元数据。 候选 exporter: 1. **Generic Webhook** — POST JSON 到用户配的 URL,最通用、零三方依赖;自定义 header 支持 bearer token 2. **Telegram Bot** — `sendMessage` 到指定 chat_id,单 token 配置;适合个人即时通知 3. **Discord Webhook** — 不需要 bot,直接 webhook URL;常用 community 渠道 4. **Slack Webhook** — 同 Discord 5. **Notion Database** — `pages.create` 写入指定 database_id;适合结构化保管账号 6. **Airtable** — 同 Notion 7. **文件导出** — 写本地 CSV / JSON / SQLite 表(默认 `output/accounts.csv`);最低限度方案 8. **邮件回发** — SMTP 把账号发给用户自己邮箱,最后兜底 ## 实现建议 - `CTF-reg/exporters/` 新目录,每个 exporter 一个文件 - 配置结构 `downstream.exporters: [{kind: "telegram", config: {...}, enabled: true}]`,多 exporter 并行触发 - webui Step11 改成可叠加列表(每个 exporter 独立 enable + 配置块),不再是 gpt-team / CPA 两个写死的 toggle - 每个 exporter 写 preflight(发一条测试消息验证) - pipeline 完成后 `for exporter in enabled: exporter.export(result)`,单个失败不影响其它 ## 优先级建议 最容易出价值的两个: - **Generic Webhook**(最通用,让用户自己接 n8n / Zapier / 自己服务) - **Telegram Bot**(个人用户最常用,5 分钟搞定) Notion / Airtable 工程量大些可以后做。 ## 验收 - [ ] 至少 3 个 exporter 跑通端到端 - [ ] Step11 支持加/删/排序 exporter 实例 - [ ] 单 exporter 失败不影响 pi...
View Raw Thread