Files
cftgsx/deploy-config.example.json
SCSHIRKER e1b6e1db77 🚀 v1.2.0: 论坛模式与代码质量优化
 新功能:
- 新增论坛话题模式,支持Telegram论坛群组
- 每个用户自动创建独立话题,提供专业客服体验
- 智能系统消息过滤,避免创建话题时的误报警告

🏗️ 架构优化:
- 基于Cloudflare Workers最佳实践全面重构代码
- 新增常量集中管理和输入验证机制
- 实现结构化日志记录和重试机制

🛡️ 安全增强:
- 强化HMAC签名验证和错误处理
- 添加API响应验证和输入长度限制
- 优化批量处理和性能监控

📚 文档完善:
- 详细的论坛模式配置指南
- 功能对比表和流程图可视化
- 完善的部署和故障排除说明

Co-authored-by: AI Assistant <ai@assistant.com>
2025-07-03 17:53:47 -07:00

58 lines
1.7 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"name": "cftgsx",
"environment_variables": {
"BOT_TOKEN": {
"type": "secret",
"description": "Telegram Bot Token from @BotFather",
"example": "1234567890:AAAA-BBBBBBBBBBBBBBBBBBBBBBBBBB",
"required": true
},
"ADMIN_CHAT_ID": {
"type": "secret",
"description": "Admin's Telegram Chat ID",
"example": "123456789",
"required": true
},
"WEBHOOK_SECRET": {
"type": "secret",
"description": "Secret key for webhook verification",
"example": "your-random-secret-key",
"required": false,
"recommended": true
},
"USER_ID_SECRET": {
"type": "secret",
"description": "Secret key for user ID signature (防止身份伪造)",
"example": "your-user-id-secret-key",
"required": false,
"recommended": true
},
"ENABLE_USER_TRACKING": {
"type": "plain",
"description": "Enable user tracking for broadcast features",
"example": "true",
"required": false
},
"ENABLE_FORUM_MODE": {
"type": "plain",
"description": "启用论坛话题模式 (需要管理员聊天为论坛群组)",
"example": "true",
"required": false
}
},
"kv_namespaces": {
"USER_STORAGE": {
"description": "KV storage for user tracking (optional)",
"required": false
}
},
"setup_instructions": [
"1. 创建Telegram机器人并获取Bot Token",
"2. 获取管理员的Chat ID",
"3. 在Cloudflare Workers中配置环境变量",
"4. (可选) 创建KV存储空间用于用户跟踪",
"5. (可选) 如需论坛模式将管理员聊天设为论坛群组并启用ENABLE_FORUM_MODE",
"6. 访问 /setWebhook 端点设置webhook",
"7. 测试机器人功能"
]
}