导航

Proxyman抓包抓包localhost

Posted on 2022-04-11 10:38  蝈蝈俊  阅读(1570)  评论(0编辑  收藏  举报

Proxyman是一款直观易用的 HTTP 调试工具,拥有出色的 UI 和交互设计, 性能强劲资源占用低。自动生成证书,轻松在 Mac 端启用 SSL 代理抓包,并且集成移动设备的调试。

由于localhost相关的请求报文将不会经过实际的网络适配器,需要特殊配置才能抓包localhost。
参看grpc的数据包监控

解决方案1:使用localhost.proxyman.io

Proxyman uses Cloudflare and sets the DNS of localhost.proxyman.io to 127.0.0.1 (localhost). As a result, Proxyman can capture the local traffic as usual

旧URL 新URL
localhost:3000 localhost.proxyman.io:3000
localhost:8080 localhost.proxyman.io:8080

解决方案2:修改Host文件

Open etc/hosts file

$ sudo vim /etc/hosts

Add Domain Name with both IPv4 and IPv6 (You can change the proxyman.local with your name)

127.0.0.1 proxyman.local
::1 proxyman.local

Make sure you add both IPv4 (127.0.0.1 proxyman.local) and IPv6 (::1 proxyman.local). 
Otherwise, you might encounter the 5 seconds DNS delay.

Read more at https://superuser.com/a/1596341

参考:
https://docs.proxyman.io/troubleshooting/couldnt-see-any-request-from-localhost-server