主要更新: - ✨ 新增 Telegram Bot 交互界面 - ✨ 新增欧洲账单自动生成功能 - 📦 整理项目结构,部署文件移至 deployment/ 目录 - 📝 完善文档,新增 CHANGELOG 和 Bot 部署指南 - 🔧 统一使用 pyproject.toml 管理依赖(支持 uv) - 🛡️ 增强 .gitignore,防止敏感配置泄露 新增文件: - tg_bot.py: Telegram Bot 主程序 - generate_billing.py: 独立账单生成工具 - modules/billing.py: 欧洲账单生成模块 - deployment/: Docker、systemd 等部署配置 - docs/: 完整的文档和更新日志 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
85 lines
2.4 KiB
Python
85 lines
2.4 KiB
Python
# config.example.py
|
||
"""全局配置模板 - 复制为 config.py 并填入真实信息"""
|
||
|
||
# OpenAI 端点
|
||
AUTH_BASE_URL = "https://auth.openai.com"
|
||
SENTINEL_BASE_URL = "https://sentinel.openai.com/sentinel"
|
||
|
||
# 临时邮箱配置
|
||
TEMPMAIL_CONFIG = {
|
||
'api_base_url': 'https://your.tempmail.domain', # 你的临时邮箱 API 地址
|
||
|
||
# 方式1:用户名密码登录(推荐)
|
||
'username': 'your_username', # 你的临时邮箱系统用户名
|
||
'password': 'your_password', # 你的密码
|
||
|
||
# 方式2:JWT Token(备用)
|
||
# 'admin_token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
|
||
|
||
# 域名选择(0=第1个域名, 1=第2个, 2=第3个)
|
||
'domain_index': 0, # 改成 0, 1, 或 2 来选择不同的域名后缀
|
||
}
|
||
|
||
# SDK 路径
|
||
SDK_JS_PATH = "assets/sdk.js"
|
||
|
||
# 浏览器指纹配置
|
||
FINGERPRINT_CONFIG = {
|
||
'user_agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:146.0) Gecko/20100101 Firefox/146.0',
|
||
'screen_width': 1920,
|
||
'screen_height': 1080,
|
||
'languages': ['en-US', 'en'],
|
||
'hardware_concurrency': 8,
|
||
'platform': 'Linux x86_64',
|
||
}
|
||
|
||
# HTTP 配置
|
||
HTTP_CONFIG = {
|
||
'impersonate': 'chrome110', # curl-cffi 的浏览器模拟
|
||
'timeout': 30,
|
||
}
|
||
|
||
# PoW 配置
|
||
POW_CONFIG = {
|
||
'max_attempts': 500000, # SDK 默认值
|
||
'timeout': 60, # 求解超时(秒)
|
||
}
|
||
|
||
# EU Billing 配置
|
||
EU_BILLING_CONFIG = {
|
||
# 计划配置
|
||
'plan_name': 'chatgptteamplan',
|
||
|
||
# 团队计划详情
|
||
'team_plan_data': {
|
||
'workspace_name': 'Sepa', # 工作空间名称
|
||
'price_interval': 'month', # 'month' 或 'year'
|
||
'seat_quantity': 5, # 座位数量(团队计划最少 5 个)
|
||
},
|
||
|
||
# 账单地址
|
||
'billing_details': {
|
||
'country': 'DE', # 国家代码(DE, FR, IT 等)
|
||
'currency': 'EUR', # 货币(EUR)
|
||
},
|
||
|
||
# 促销活动
|
||
'promo_campaign': {
|
||
'promo_campaign_id': 'team-1-month-free',
|
||
'is_coupon_from_query_param': False,
|
||
},
|
||
|
||
# UI 模式
|
||
'checkout_ui_mode': 'redirect', # 'redirect' 或 'embedded'
|
||
|
||
# API 端点
|
||
'checkout_endpoint': 'https://chatgpt.com/backend-api/payments/checkout',
|
||
|
||
# OAI Client headers(需定期更新以匹配当前 ChatGPT 版本)
|
||
'oai_client_version': 'prod-04eaaa443c69cfc8b46b5d52d2b61dbceba21862',
|
||
'oai_client_build_number': '4053703',
|
||
}
|
||
|
||
# 调试模式
|
||
DEBUG = True
|