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

@beiyue/sshgo

v1.0.0

Published

本地运行的 SSH 隧道可视化管理工具,支持本地/远程/动态转发、密码登录与自动重连

Readme

sshgo

本地运行的 SSH 隧道可视化管理工具。在浏览器里集中配置、启动和监控 SSH 端口转发,无需记忆 ssh -L / -R / -D 参数。

特性

  • 三种转发模式:本地转发 -L、远程转发 -R、动态 SOCKS5 代理 -D
  • 两种认证方式:SSH 密钥、SSH 密码
  • 自动重连:连接意外断开后按设定间隔自动重试,可随时取消
  • 实时日志:直接查看 OpenSSH 的 stdout / stderr 输出
  • 配置持久化:隧道配置保存在用户目录,升级不丢失
  • 跳板机支持:等价于 ssh -J
  • 零运行时依赖:只要求 Node.js 与系统自带的 ssh
  • 仅监听本机:默认绑定 127.0.0.1

快速开始

npx @beiyue/sshgo

或全局安装:

npm install -g @beiyue/sshgo
sshgo

启动后会自动打开 http://127.0.0.1:4173

命令行选项

-p, --port <端口>    服务监听端口(默认 4173)
    --host <地址>    服务监听地址(默认 127.0.0.1)
    --no-open        启动后不自动打开浏览器
-v, --version        显示版本号
-h, --help           显示帮助

转发模式

| 模式 | 参数 | 用途 | | --- | --- | --- | | 本地转发 | -L | 从本机端口访问远端内网服务,例如数据库、内网后台 | | 远程转发 | -R | 把本机服务暴露到 SSH 服务端监听的端口 | | 动态转发 | -D | 在本机创建 SOCKS5 代理,由应用自行决定目标地址 |

密码登录

选择「SSH 密码」认证方式后,点击启动会弹窗输入密码。

  • 密码不会写入配置文件、命令预览或日志
  • 密码通过 SSH_ASKPASS 传给 OpenSSH,不出现在进程命令行中
  • 启用自动重连时,密码仅保留在当前进程内存中,停止隧道后立即清除

Linux 与 macOS 使用包内置的 askpass.js。Windows 原生环境不支持 SSH_ASKPASS 脚本,需要通过 SSH_ASKPASS_BINARY 指定兼容的 AskPass 可执行程序,否则请使用密钥认证。

自动重连

在「高级选项」中开启「自动重连」,并设置 1~300 秒的重连间隔。

  • 仅对意外断开生效;手动停止后不会重连
  • 重连等待期间卡片显示「重连中」,可点击「取消重连」
  • 需要免交互认证,推荐配合 SSH 密钥使用

配置位置

默认保存在 ~/.sshgo/tunnels.json,权限 0600

环境变量

| 变量 | 说明 | | --- | --- | | SSHGO_HOME | 配置目录,默认 ~/.sshgo | | SSHGO_DATA_FILE | 配置文件完整路径 | | SSHGO_OPEN=0 | 不自动打开浏览器 | | SSH_BINARY | 指定 ssh 可执行程序 | | SSH_ASKPASS_BINARY | 指定 AskPass 可执行程序 |

安全说明

本工具会在你本机启动真实的 ssh 进程,任何能访问该 Web 界面的人都能操作你的隧道。

  • 默认只监听 127.0.0.1,请勿在不可信网络中改用 --host 0.0.0.0
  • 界面没有登录鉴权,不要暴露到公网
  • 密码认证仅建议用于临时连接,长期使用请配置 SSH 密钥

从源码运行

git clone <repo>
cd sshgo
npm start

License

MIT