mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-03-31 05:59:51 +08:00
feat(config): 添加 bgi_tools 授权 token 配置项
- 在配置表格中新增 bgi_tools_token 字段 - 支持 tokenName=tokenValue 语法格式 - 用于 bgi_tools 推送功能的身份验证
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
| **bgi_tools_http_pull_json_config** | input-text | bgi_tools 拉取配置的 API 地址(当选择 bgi_tools加载 时生效) | https://example.com/api/pull |
|
||||
| **bgi_tools_open_push** | checkbox | 是否在脚本结束时推送当前全部配置给 bgi_tools(用于同步/备份) | 勾选 = 开启推送 |
|
||||
| **bgi_tools_http_push_all_json_config** | input-text | bgi_tools 推送全部配置的 API 地址(当开启推送时使用) | https://example.com/api/push-all |
|
||||
| **bgi_tools_token** | input-text | bgi_tools授权token 语法:tokenName=tokenValue | tokenName=tokenValue |
|
||||
|
||||
### 计划配置语法(domain_config 字段)
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@ async function main() {
|
||||
await init();
|
||||
if (config.bgi_tools.open.open_push) {
|
||||
log.info(`开始推送bgi_tools配置`)
|
||||
await pushAllJsonConfig(JSON.parse(file.readTextSync(config.path.domain)), config.bgi_tools.api.httpPushAllJsonConfig)
|
||||
await pushAllJsonConfig(JSON.parse(file.readTextSync(config.path.domain)), config.bgi_tools.api.httpPushAllJsonConfig,config.bgi_tools.token)
|
||||
}
|
||||
// 获取秘境配置
|
||||
let domainConfig = config.domain.config;
|
||||
|
||||
Reference in New Issue
Block a user