xiaxingtianxia2-glitch/dsh-auto-exit1

dsh-auto-exit

Exit the DSH CLI process automatically when the Web UI closes (equivalent to Ctrl+C). DSH plugin: 关闭 Web UI 自动退出 CLI 进程.

包名
dsh-auto-exit
版本
0.0.1
许可证
MIT
最近更新
2026年8月17日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

使用

  1. 启动 dsh --profile web,用浏览器打开 Web UI(默认 )。
  2. 直接关闭浏览器标签页/窗口(多个页面需全部关闭)。
  3. 15 秒后进程自动退出。

查看状态

curl http://127.0.0.1:3080/auto-exit/status
{"enabled":true,"armed":true,"sockets":2,"countdownMs":0,"graceSeconds":15,"pollMs":1000,"dryRun":false,"lastEvent":"armed","fired":false}

字段含义:sockets 当前页面连接数;countdownMs 剩余倒计时(0 = 未在倒计时); lastEvent 最近一次状态变化(idle/armed/lost/cancel/exit)。

配置

字段默认值说明
enabledtrue总开关
graceSeconds15连接全部断开后等待的秒数再退出
pollMs1000检测间隔(毫秒)
armAfterFirstConnecttrue见到首个页面连接后才生效(启动时未开页面不退出)
dryRunfalse试运行:只记录「将要退出」日志,不真正退出