feat: 添加多账号 OAuth 支持

- 新增 add-account.js OAuth 批量授权辅助工具
- 新增 account-manager.js 多账号管理模块(加权轮询、自动刷新、健康度统计)
- 新增 accounts.json.example 配置示例
- 修改 auth.js 支持多账号模式(优先检测 accounts.json)
This commit is contained in:
empty
2025-12-27 12:23:41 +08:00
parent eb1096ce54
commit dab863fcfe
4 changed files with 890 additions and 17 deletions

22
accounts.json.example Normal file
View File

@@ -0,0 +1,22 @@
{
"accounts": [
{
"id": "account_1",
"name": "主账号",
"refresh_token": "YOUR_REFRESH_TOKEN_1",
"status": "active"
},
{
"id": "account_2",
"name": "备用账号",
"refresh_token": "YOUR_REFRESH_TOKEN_2",
"status": "active"
}
],
"settings": {
"algorithm": "weighted",
"refresh_interval_hours": 6,
"disable_on_401": true,
"disable_on_402": true
}
}