|
|
hai 1 mes | |
|---|---|---|
| src | hai 1 mes | |
| README.md | hai 1 mes | |
| pom.xml | hai 1 mes |
OpenAI 自动注册服务 — Spring Boot 版(完整复刻 openai_register.py 功能)
tokens/accounts.txt + tokens/token_<email>_<timestamp>.json。cd husj-openai
mvn clean package -DskipTests
java -jar target/husj-openai-0.0.1-SNAPSHOT.jar
或指定代理与邮箱提供商:
java -jar target/husj-openai-0.0.1-SNAPSHOT.jar \
--husj.openai.proxy=http://127.0.0.1:7890 \
--husj.openai.mail-provider=tempmail
| 配置项 | 默认值 | 说明 |
|---|---|---|
husj.openai.proxy |
"" |
HTTP 代理,例 http://127.0.0.1:7890 |
husj.openai.mail-provider |
auto |
auto / gptmail / tempmail |
husj.openai.output-dir |
"" |
Token 输出目录(默认运行目录下 tokens/) |
husj.openai.cpa.base-url |
"" |
CPA 管理端地址(填到 协议+IP+端口) |
husj.openai.cpa.token |
"" |
CPA 登录密码(也可用环境变量 CPA_TOKEN) |
husj.openai.cpa.workers |
20 |
并发探测数 |
husj.openai.cpa.timeout |
12 |
请求超时(秒) |
husj.openai.cpa.retries |
1 |
清理探测重试次数 |
husj.openai.cpa.used-threshold |
95 |
用量超此值(%)判定为失效 |
husj.openai.cpa.target-count |
300 |
CPA 目标有效 token 数 |
POST /api/register
Query 参数(可选):
?cpaUpload=true 注册后上传 CPA
?cpaClean=true 注册前/后清理 CPA 失效账号
?cpaPruneLocal=true 上传成功后删除本地文件 + accounts.txt 行
GET /api/cpa/status 统计有效 token 数
GET /api/cpa/files 获取 CPA auth-files 列表
POST /api/cpa/clean 手动触发探测 + 清理
GET /api/status 返回服务配置概览
tokens/accounts.txt(email----password 格式)tokens/token_<email>_<timestamp>.jsonhttps://auth.openai.com;代理地区尽量避开 CN/HK。协议 + IP/域名 + 端口,不要带后台页面路径。auto 邮箱模式,优先尝试 TempMail.lol,失败后自动回退到 GPTMail。