feat(auth): allow trusted remote bootstrap and add installer
This commit is contained in:
@@ -13,7 +13,40 @@
|
||||
- 保留原始 SimAdmin 页面 iframe 嵌入;若目标站禁止 iframe,可一键在原站打开。
|
||||
- 敏感配置留在本地 `config.json`,仓库只提交 `config.example.json`。
|
||||
|
||||
## 快速开始
|
||||
## 一键安装(macOS)
|
||||
|
||||
```bash
|
||||
curl -fsSL https://gitea.chickliu.fun/Hermes/multi-simadmin/raw/branch/main/scripts/install.sh | sh
|
||||
```
|
||||
|
||||
脚本会从 Gitea 下载源码,固定使用 pnpm `11.13.0` 安装依赖并构建 Web,然后启动:
|
||||
|
||||
- LAN Gateway:`0.0.0.0:8788`
|
||||
- Control-plane API:`127.0.0.1:8790`
|
||||
- Canary Gateway:`8789` 保持关闭
|
||||
|
||||
安装完成后按终端输出访问 `http://<本机局域网 IP>:8788/fleet`。首次密码可在当前管理台直接设置。Gateway 默认监听所有网络接口,因此必须确保主机仅接入可信内网或已通过防火墙限制 8788 的来源;HTTP 部署不得直接暴露到公网,公网开放必须由前置代理提供 HTTPS 和访问控制。
|
||||
|
||||
> 当前生产秘密存储使用 macOS Keychain,因此一键安装脚本暂只支持 macOS。脚本不会覆盖已有源码目录或数据库,也不会占用已被其他进程监听的 8788/8790 端口。
|
||||
|
||||
### 服务管理
|
||||
|
||||
下载脚本后可执行完整生命周期命令:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://gitea.chickliu.fun/Hermes/multi-simadmin/raw/branch/main/scripts/install.sh -o /tmp/multi-simadmin-install.sh
|
||||
sh /tmp/multi-simadmin-install.sh status
|
||||
sh /tmp/multi-simadmin-install.sh restart
|
||||
sh /tmp/multi-simadmin-install.sh stop
|
||||
sh /tmp/multi-simadmin-install.sh start
|
||||
sh /tmp/multi-simadmin-install.sh uninstall
|
||||
```
|
||||
|
||||
`uninstall` 默认只移除程序源码,保留数据库、Gateway token 和日志。默认安装位置为 `~/Library/Application Support/multi-simadmin`,可通过 `MULTI_SIMADMIN_HOME` 覆盖;额外 LAN Host 可通过 `MULTI_SIMADMIN_ALLOWED_HOSTS`(逗号分隔)配置。
|
||||
|
||||
## 旧版开发入口
|
||||
|
||||
旧 `server/` 与 `public/` 仅用于历史兼容和开发验证,不是当前生产安装入口:
|
||||
|
||||
```bash
|
||||
cp config.example.json config.json
|
||||
@@ -21,8 +54,6 @@ npm install
|
||||
npm start
|
||||
```
|
||||
|
||||
默认访问:<http://localhost:8788>
|
||||
|
||||
## 配置
|
||||
|
||||
编辑 `config.json`:
|
||||
|
||||
Reference in New Issue
Block a user