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

cros

v1.1.0

Published

A secure cross-network tunneling tool

Readme

项目说明

5年前,初次接触node.js,写了一个粗糙的内网穿透demo,现在在ai的优化下重构了项目,实现tcp协议的内网穿透,支持多端口映射,支持加密传输,支持http域名方式的内网穿透。

功能说明

  • [✓] 支持TCP协议的内网穿透
  • [✓] 支持多端口映射
  • [✓] 支持加密传输
  • [✓] 支持http域名方式的内网穿透
  • [✓] 支持http的websocket域名方式的内网穿透
  • [ ] 支持https域名方式的内网穿透,但是你可以通过nginx反向代理的方式实现。

使用说明

不推荐使用源码方式安装,推荐使用npm安装。

  • 项目源码地址:https://github.com/zhihuihu/cros

工具安装

npm install -g cros

使用案例

tcp方式内网穿透

服务端配置

配置文件server.yml
port: 3000       # 控制端口
httpPort: 3001   # 控制HTTP端口
crypto:
  password: "mySecurePassword123!" # 必须与客户端保持一致
启动服务端
cros server server.yml

客户端配置

配置文件client.yml
server:  # 服务端配置
  host: 127.0.0.1   # 服务端地址
  port: 3000        # 服务端端口
crypto:             # 加密配置
  password: "mySecurePassword123!" # 必须与服务端保持一致
tunnels:
  - remotePort: 8080  # 外网端口(必须唯一)
    type: tcp
    localHost: 192.168.8.134
    localPort: 8080
  - remotePort: 3002  # 另一个唯一端口
    type: tcp
    localHost: 192.168.8.134
    localPort: 22
启动客户端
cros client client.yml

http域名方式内网穿透

服务端配置

  • 建议配合nginx一起使用

因为可以通过nginx反向代理的方式实现https域名方式的内网穿透,还有使用80443端口。

server {
	listen 80;
	server_name *.cros.huzhihui.com;
	location / {
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header Host $http_host:80;
		proxy_set_header X-Nginx-Proxy true;
		proxy_pass http://127.0.0.1:3001;
	}
}

上面的配置用了泛解析,所以可以通过*.cros.huzhihui.com访问到服务端。 也可以通过cros.huzhihui.com访问到服务端。

配置文件server.yml
port: 3000       # 控制端口
httpPort: 3001   # 控制HTTP端口
crypto:
  password: "mySecurePassword123!" # 必须与客户端保持一致
启动服务端
cros server server.yml

客户端配置

配置文件client.yml
server:  # 服务端配置
  host: 127.0.0.1   # 服务端地址
  port: 3000        # 服务端端口
crypto:             # 加密配置
  password: "mySecurePassword123!" # 必须与服务端保持一致
tunnels:
  - type: http
    remoteDomain: home.cros.huzhihui.com  # 唯一域名(必须唯一)
    localHost: 192.168.8.134
    localPort: 8080
启动客户端
cros client client.yml

详细说明

服务端使用指南

配置文件server.yml

port: 3000       # 控制端口
httpPort: 3001   # 控制HTTP端口
crypto:
  password: "mySecurePassword123!" # 必须与客户端保持一致

启动服务端

cros server server.yml

启动日志

[2025-04-09 05:19:43] [Server] Control server listening on 3000
[2025-04-09 05:19:43] [Server] Control HTTP server listening on 3001
[2025-04-09 05:20:11] [Server] Registered port 8080
[2025-04-09 05:20:11] [Server] Public server listening on 8080
[2025-04-09 05:20:11] [Server] Registered port 3002
[2025-04-09 05:20:11] [Server] Registered HTTP domain home.huzhihui.com
[2025-04-09 05:20:11] [Server] Public server listening on 3002

客户端使用指南

配置文件client.yml

server:  # 服务端配置
  host: 127.0.0.1   # 服务端地址
  port: 3000        # 服务端端口
crypto:             # 加密配置
  password: "mySecurePassword123!" # 必须与服务端保持一致
tunnels:
  - remotePort: 8080  # 外网端口(必须唯一)
    type: tcp
    localHost: 192.168.8.134
    localPort: 8080
  - remotePort: 3002  # 另一个唯一端口
    type: tcp
    localHost: 192.168.8.134
    localPort: 22
  - type: http
    remoteDomain: home.huzhihui.com  # 唯一域名(必须唯一)
    localHost: 192.168.8.134
    localPort: 8080

启动客户端

cros client client.yml

启动日志

[2025-04-09 05:20:11] [Client] Connected to server
[2025-04-09 05:20:11] [Client] Tunnel 8080 is available
[2025-04-09 05:20:11] [Client] Tunnel home.huzhihui.com is available
[2025-04-09 05:20:11] [Client] Tunnel 3002 is available