使用 whistle 在 macOS 上进行抓包
- 首先确保 node.js 已经安装,没有安装的在 https://nodejs.org/en/ 下载安装
- 使用 node.js 全局安装 whistle (仅第一次需要)
$ npm i -g whistle
- whistle 安装 ca 证书 (仅第一次需要)
$ w2 ca
- whistle 自动设置代理 (每次都需要)
whistle proxy
- whistle 启动
w2 start
-
开始抓包
访问这个地址
进入 Network 栏目
记得打开 http/2
即可查看当前设备的所有请求 -
whsitle 停止
whistle stop
- whistle 关闭代理(不关闭无法正常使用网络)
w2 proxy --off