liuwudi123/dsh-lan-exposure0

@dsh-lan-exposure/lan

dsh plugin: expose the local web GUI to the LAN via an in-process reverse proxy (0.0.0.0 -> 127.0.0.1:3080), with a live connection-status badge and a status endpoint.

包名
@dsh-lan-exposure/lan
版本
0.1.0
最近更新
2026年8月18日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:liuwudi123/dsh-lan-exposure

配置(可选)

所有配置通过环境变量读取(插件加载时一次性生效):

环境变量默认值说明
DSH_LAN_ENABLEDtrue是否启用插件(设为 false 可关闭)
DSH_LAN_PORT8080对外监听端口(手机访问的端口)
DSH_LAN_LISTEN_HOST0.0.0.0对外监听地址
DSH_LAN_TARGET_HOST127.0.0.1dsh 回环监听地址
DSH_LAN_TARGET_PORT3080dsh 回环端口(须与 dsh web --port 一致)
DSH_LAN_AUTH_USER未设置开启 Basic 认证时的用户名
DSH_LAN_AUTH_PASS未设置开启 Basic 认证时的密码

DSH_LAN_AUTH_USERDSH_LAN_AUTH_PASS 两者同时设置时认证才会生效。

示例:改用 18080 端口

Bash / Linux / macOS:

DSH_LAN_PORT=18080 pnpm dsh web --host 127.0.0.1 --port 3080

PowerShell / Windows:

$env:DSH_LAN_PORT = "18080"; pnpm dsh web --host 127.0.0.1 --port 3080

示例:开启 Basic 认证

Bash:

DSH_LAN_AUTH_USER=admin DSH_LAN_AUTH_PASS=secret pnpm dsh web --host 127.0.0.1 --port 3080

PowerShell:

$env:DSH_LAN_AUTH_USER = "admin"; $env:DSH_LAN_AUTH_PASS = "secret"; pnpm dsh web --host 127.0.0.1 --port 3080

开启后,手机访问时会弹出用户名 / 密码提示。