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

@cjwddz/mirror

v2.0.12

Published

HTTP 隧道工具 - 将本地服务暴露到公网,支持多服务代理

Readme

Mirror

HTTP 隧道:把本地服务通过公网服务端暴露出去,支持多域名/多路径规则。

安装

npm install -g @cjwddz/mirror

使用

服务端(公网机器):

mirror server -p 80 -t 3000 --token your-token

客户端(本机):

# 连接
mirror link mirror.tri-bank.online --token your-token

# 添加规则(域名+路径 -> 本地地址)
mirror add example.com/api    localhost:3001
mirror add example.com        localhost:5173
# 支持写 https://domain/path,协议会被忽略
mirror add https://test1.example.com/foo/ 127.0.0.1:8082

# 查看 / 删除规则
mirror list
mirror remove 1    # 删单条
mirror remove      # 删全部

mirror status      # 连接状态
mirror stop        # 断开

规则匹配

  • 规则按路径长度从长到短匹配,路径越长优先级越高。
  • domain/path 支持:example.com/apiexample.com(等价于根路径 /)、或 https://example.com/path(协议会在解析时去掉)。
  • 规则存于 ~/.mirror/rules.json,增删后下次请求即生效。

常见问题

  • 访问代理域名 404:确认 Nginx 里代理域名(如 test1.xxx.com)反代到服务端 HTTP 端口(默认 80)隧道域名(mirror.xxx.com)反代到 WebSocket 端口(默认 3000)
  • 匹配不到规则:确认本机目标服务已启动,且 mirror status 中规则与预期一致。

License

MIT