RaulLazaro/dsh-preview-plugin0

dsh-preview-plugin

DSH 的实时预览标签页插件:通过透明代理将任何开发服务器(如 Web 应用)嵌入到 iframe 中进行预览。

AI 分析

核心用途是在 DSH 界面内直接预览 AI 生成或修改的网页/Web 应用。适合前端开发者或使用 AI 进行网页开发的用户。需要用户在服务器上启动开发服务,并在预览面板中输入对应端口号。

套件
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