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

ncm-api-clawer

v0.5.1

Published

网易云音乐客户端抓包工具

Readme

api-clawer

简易网易云音乐客户端抓包工具, 适用于贡献 NeteaseCloudMusicApi 项目

使用方法 (重要)

请参考这篇文章或者视频教程获取详细的使用说明和配置指南。

功能

  • 抓取并输出网易云音乐客户端的 HTTP 请求和响应数据
  • 数据解密并以 JSON 格式输出
  • 本地运行两个服务器:抓包服务器和前端显示服务器
  • 前端界面实时显示抓包数据

安装

pnpm install

配置

  1. 复制环境变量模板:
copy .env.example .env
  1. 编辑 .env 文件,设置端口:
PORT=3000
HOOK_PORT=9000

运行

运行以下命令:

pnpm start

使用

  1. 启动服务器

    运行 pnpm start,将启动两个服务:

    • 前端服务器:http://localhost:3000
    • 抓包代理服务器:http://localhost:9000
  2. 配置网易云音乐客户端

    • 找到网易云音乐客户端的网络设置
    • 将 HTTP 代理设置为:http://localhost:9000
    • 保存设置并重启客户端
  3. 查看抓包数据

    • 打开浏览器访问:http://localhost:3000
    • 在网易云音乐客户端中进行操作(如搜索、播放音乐)
    • 抓包数据将实时显示在前端界面
  4. 信任证书(首次使用 HTTPS 时)

    • 如果客户端提示证书错误,需要手动信任 src/server/server.crt 证书文件

项目结构

src/
├── server/          # 抓包服务器
│   ├── app.js       # 服务器入口
│   ├── hook.js      # 数据拦截和解密
│   ├── server.js    # 代理服务器核心
│   ├── server.crt   # HTTPS 证书(运行 generate-cert.js 生成)
│   └── server.key   # HTTPS 私钥(运行 generate-cert.js 生成)
└── client/          # 前端服务器
    ├── app.js       # 前端服务器
    └── public/
        └── index.html # 前端界面

故障排除

代理不工作

  1. 检查证书文件是否存在:

    dir src\server\server.crt src\server\server.key

    如果不存在,运行 node src/server/generate-cert.js

  2. 确认端口没有被占用:

    netstat -ano | findstr :3000
    netstat -ano | findstr :9000
  3. 检查 .env 文件配置是否正确

前端页面无法访问

  • 确认前端服务器已启动(查看控制台输出)
  • 检查端口 3000 是否被占用
  • 尝试清除浏览器缓存

无法抓取数据

  • 确认网易云音乐客户端代理设置正确
  • 尝试重启网易云音乐客户端
  • 检查抓包服务器日志是否有错误信息

环境变量说明

| 变量名 | 默认值 | 说明 | |--------|--------|------| | PORT | 3000 | 前端服务器端口 | | HOOK_PORT | 9000 | 抓包代理服务器端口 |

详细配置请参考 .env.example 文件。