Files
opsxshell/license-server/README.md
T
Logan.LiandCursor fea6d8db04 feat: Pro 买断门禁、SFTP 精简与批量多机改造
新增 entitlement/license IPC 与 Waffo 一次性结账服务骨架,挂载 AI/转发/代理/串口/广播/批量导入导出门禁;批量执行改为结果矩阵并复用连接池,SFTP 工具栏图标化并去掉已连接条,同时完善跨平台本地终端与窗口配置。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 11:38:30 +08:00

44 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# OpsXShell License Server
轻量 Node 服务:Waffo Pancake **一次性买断**结账、Webhook、设备绑定许可证签发。
**私钥只放本机环境变量,不要写入仓库或桌面端。**
## 快速开始
```bash
cd license-server
cp .env.example .env
# 填入 WAFFO_PRIVATE_KEY(Dashboard 测试密钥)
npm install
npm run bootstrap # 首次:创建 Store + 一次性商品 Pro,写回 .env
npm run start
```
桌面端默认请求 `http://127.0.0.1:8787`。可用 `VITE_LICENSE_SERVER_URL` 覆盖。
## 接口
| 方法 | 路径 | 说明 |
|------|------|------|
| GET | `/health` | 健康检查 |
| POST | `/checkout` | `{ deviceId }` → `{ checkoutUrl }`(onetime) |
| POST | `/webhooks` | Waffo webhook(`order.completed`) |
| POST | `/activate` | `{ deviceId }` 取回已签发许可证 |
| POST | `/issue-test-license` | 开发用:直接签发终身 Pro token |
## 测试许可证(无需支付)
```bash
npm run issue-dev-license -- --deviceId '*'
# 临时授权可加 --days 30
```
将返回的 `token` 粘贴到 App「已有许可证?激活」。
## 安全
- `@waffo/pancake-ts` 仅在本服务使用
- `OPSX_LICENSE_HMAC` 与桌面端校验密钥一致(生产请轮换)
- 对话中若暴露过测试私钥,请在 Dashboard **轮换**