feat: update plugin entry, install script, and docs for API Key auth
- plugin/index.ts: use apiKey instead of challengeUuid - scripts/install.mjs: update prompts and examples - README.md: update config docs and examples
This commit is contained in:
@@ -76,7 +76,7 @@ node scripts/install.mjs --verbose
|
||||
|
||||
## 配置
|
||||
|
||||
1. 在 HarborForge Monitor 中注册服务器,获取 `challengeUuid`
|
||||
1. 在 HarborForge Monitor 中注册服务器,获取 `apiKey`
|
||||
|
||||
2. 编辑 `~/.openclaw/openclaw.json`:
|
||||
|
||||
@@ -87,7 +87,7 @@ node scripts/install.mjs --verbose
|
||||
"enabled": true,
|
||||
"backendUrl": "https://monitor.hangman-lab.top",
|
||||
"identifier": "my-server-01",
|
||||
"challengeUuid": "your-challenge-uuid-here",
|
||||
"apiKey": "your-api-key-here",
|
||||
"reportIntervalSec": 30,
|
||||
"httpFallbackIntervalSec": 60,
|
||||
"logLevel": "info"
|
||||
@@ -109,7 +109,7 @@ openclaw gateway restart
|
||||
| `enabled` | boolean | `true` | 是否启用插件 |
|
||||
| `backendUrl` | string | `https://monitor.hangman-lab.top` | Monitor 后端地址 |
|
||||
| `identifier` | string | 自动检测 hostname | 服务器标识符 |
|
||||
| `challengeUuid` | string | 必填 | 注册挑战 UUID |
|
||||
| `apiKey` | string | 可选 | API Key 认证(从 HarborForge Monitor 获取) |
|
||||
| `reportIntervalSec` | number | `30` | 报告间隔(秒) |
|
||||
| `httpFallbackIntervalSec` | number | `60` | HTTP 回退间隔(秒) |
|
||||
| `logLevel` | string | `"info"` | 日志级别: debug/info/warn/error |
|
||||
@@ -151,7 +151,7 @@ npm run build
|
||||
|
||||
```bash
|
||||
cd server
|
||||
HF_MONITOR_CHALLENGE_UUID=test-uuid \
|
||||
HF_MONITOR_API_KEY=your-api-key \
|
||||
HF_MONITOR_BACKEND_URL=http://localhost:8000 \
|
||||
HF_MONITOR_LOG_LEVEL=debug \
|
||||
node telemetry.mjs
|
||||
|
||||
Reference in New Issue
Block a user