npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-reverse-proxy-xc

v0.1.5

Published

DSH web plugin: LAN reverse proxy for the DSH web UI (default 0.0.0.0:3090 -> 127.0.0.1:3080, Host/Origin rewritten to loopback, crypto.randomUUID polyfill injected). Settings namespace dsh-reverse-proxy-xc: enabled, host, port, authEnabled, authUser, aut

Readme

dsh-reverse-proxy-xc

npm version license downloads DSH

中文 | English

DSH 局域网反向代理插件 —— 让手机/平板等设备在局域网内无缝访问 DSH Web GUI,获得与本地完全一致的体验。

✨ 核心特性

🌐 完整功能访问

  • 侧边栏可用:工作区、会话列表正常显示
  • 设置面板:可访问所有设置项
  • 凭据管理:可管理 API 凭据
  • WebSocket 支持:实时事件推送正常工作

🔧 问题修复

本插件修复了通过反向代理访问时的关键问题:

| 问题 | 原因 | 解决方案 | |------|------|----------| | 设置面板无法打开 | 前端判断非回环环境禁用 | 代理层注入 isLoopback=true | | randomUUID 报错 | HTTP 下 API 不可用 | 自动注入 polyfill | | WebSocket 断开 | 代理未正确转发 | 流式透传支持 |

🚀 技术实现

  • 独立服务:默认监听 0.0.0.0:3090
  • 请求转发:转发到 DSH 主服务 127.0.0.1:3080
  • Header 改写:改写 Host/Origin 为回环地址
  • HTML 注入:自动注入必要的 polyfill

🔒 安全设计

  • 局域网限定:仅在内网/VPN 环境使用
  • 信任栅栏:保留 DSH 原有安全机制
  • 配置可控:默认禁用,需手动开启

📦 安装

# 使用 DSH CLI
dsh plugin --profile web add dsh-reverse-proxy-xc

# 或使用 npm
npm install dsh-reverse-proxy-xc

安装后重启 DSH。

⚙️ 配置

  1. 打开 DSH 设置
  2. 找到「局域网反向代理」分区
  3. 打开「启用代理」开关
  4. 配置端口(默认 3090)

配置选项

| 选项 | 默认值 | 说明 | |------|--------|------| | enabled | false | 是否启用代理 | | port | 3090 | 监听端口 | | host | 0.0.0.0 | 监听地址 |

🎮 使用

  1. 确保目标设备与主机在同一局域网或 VPN
  2. 在目标设备浏览器访问:
http://<主机内网IP>:3090

例如:http://10.100.50.125:3090

  1. 享受与本地 http://127.0.0.1:3080 完全一致的体验

🔧 工作原理

手机浏览器
    ↓ HTTP/WS
反向代理 (0.0.0.0:3090)
    ↓ 改写 Header
DSH 主服务 (127.0.0.1:3080)
    ↓ 视为回环访问
完整功能解锁

⚠️ 安全注意

  • 不要暴露到公网:此插件设计用于可信内网环境
  • VPN 推荐:跨网访问建议使用 VPN
  • 敏感操作:涉及凭据和设置,请确保网络安全

📄 许可证

MIT

🔗 链接