RaulLazaro/dsh-preview-plugin0

dsh-preview-plugin

Live preview tab for DSH — embed any dev server in an iframe

包名
dsh-preview-plugin
版本
1.0.0
许可证
MIT
最近更新
2026年9月1日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:RaulLazaro/dsh-preview-plugin

Usage

  1. Start your dev server on the VPS (e.g. npm run dev -- --host 0.0.0.0 --port 3000)
  2. Open the Preview tab in DSH Web GUI
  3. Enter the port number (e.g. 3000) and click Go
  4. The iframe will load the app through the transparent proxy

API

The plugin exposes a port management API:

MethodEndpointDescription
GET/api/preview-portGet the current global port
GET/api/preview-port?sessionId=Get port for a session (falls back to global)
POST/api/preview-portSet global port ({ "port": 3000 })
POST/api/preview-port?sessionId=Set port for a session