|
|
4 hónapja | |
|---|---|---|
| config | 4 hónapja | |
| core | 4 hónapja | |
| dashboard | 4 hónapja | |
| docs | 4 hónapja | |
| ops | 4 hónapja | |
| platforms | 4 hónapja | |
| scripts | 4 hónapja | |
| tests | 4 hónapja | |
| vendor | 4 hónapja | |
| .env.example | 4 hónapja | |
| .gitignore | 4 hónapja | |
| AGENTS.md | 4 hónapja | |
| README.md | 4 hónapja | |
| SHARE_PACKAGE_NOTES.md | 4 hónapja | |
| main.py | 4 hónapja | |
| pyproject.toml | 4 hónapja | |
| uv.lock | 4 hónapja |
自动注册 ChatGPT 账号并同步至 CPA (CLI Proxy API) 管理后端。
uv sync
复制示例配置并编辑:
cp .env.example .env
编辑 .env,至少配置以下内容:
# 运行模式
ZHUCE6_RUNTIME_MODE=full
ZHUCE6_REGISTER_ENABLED=true
# 注册代理(必须,建议使用海外代理)
ZHUCE6_REGISTER_PROXY=http://user:pass@host:port
# 注册线程数和间隔
ZHUCE6_REGISTER_THREADS=2
ZHUCE6_REGISTER_SLEEP_MIN=5
ZHUCE6_REGISTER_SLEEP_MAX=15
# 代理池(无代理池可禁用)
ZHUCE6_ENABLE_PROXY_POOL=0
ZHUCE6_PROXY_POOL_CONFIG=
# CPA 后端(可选)
ZHUCE6_BACKEND=cpa
ZHUCE6_CPA_MANAGEMENT_BASE_URL=http://127.0.0.1:8317/v0/management
ZHUCE6_CPA_MANAGEMENT_KEY=your_key
# cfmail Cloudflare 配置(用于通过启动检查,实际邮箱由 cfmail_accounts.json 控制)
ZHUCE6_CFMAIL_API_TOKEN=your_cf_api_token
ZHUCE6_CFMAIL_CF_ACCOUNT_ID=your_account_id
ZHUCE6_CFMAIL_CF_ZONE_ID=your_zone_id
ZHUCE6_CFMAIL_WORKER_NAME=your_worker_name
ZHUCE6_CFMAIL_ZONE_NAME=your_domain.com
创建 config/cfmail_accounts.json(参考 config/cfmail_accounts.example.json):
{
"accounts": [
{
"name": "my-mail",
"worker_domain": "your-email-api.example.com",
"email_domain": "example.com",
"admin_password": "your_admin_password",
"enabled": true
}
]
}
cfmail 需要一个已部署的 Cloudflare Email Worker 服务,用于创建临时邮箱和接收 OTP 验证码。
# 完整模式(Dashboard + 注册)
uv run python main.py run --mode full
# 仅 Dashboard
uv run python main.py run --mode dashboard
# 指定线程数
uv run python main.py run --mode full --register-threads 4
# 指定端口
uv run python main.py run --host 0.0.0.0 --port 8080
启动后访问 http://127.0.0.1:8000/zhuce6 查看注册状态。
API 端点:
GET /healthz - 健康检查GET /api/runtime - 运行时状态GET /api/summary - 注册统计GET /api/health/dependencies - 依赖状态(cfmail / CPA / 代理池)| 模式 | 说明 |
|---|---|
full |
Dashboard + 后台任务 + 注册循环 |
dashboard |
仅 Dashboard + 后台任务,不注册 |
lite |
Dashboard + 注册,禁用清理/验证等后台任务 |
register-loop |
仅注册循环,无 Dashboard |
burst-scheduler |
批量注册调度器 |
# 初始化配置向导
uv run python main.py init
# 检查环境
uv run python main.py doctor
# 停止所有进程
uv run python main.py stop
# 查看进程状态
uv run python main.py status
config/ # 配置文件(cfmail 账号等)
core/ # 核心模块(注册循环、设置、邮箱等)
dashboard/ # Dashboard 前端
platforms/ # 平台实现(ChatGPT 注册逻辑)
ops/ # 运维操作(验证、清理、轮换等)
pool/ # 注册成功的凭证文件(自动生成)
state/ # 运行时状态文件(自动生成)
logs/ # 日志文件(自动生成)
.com 等常见 TLDpool/ 目录,格式为 JSON