Mac抓包工具Charles使用记录
1.安装Charles
下载Charles,然后安装。同安装其它软件是一样的流程这里不在介绍。
2.配置Charles
2.1 安装证书

按上面指示流程打开 钥匙串访问,搜索 charles 可以看到刚才安装的证书,查看证书状态是否已经被信任(名称有红色标记)。

给证书添加信任,操作如下

设置端口号,此处使用的默认的 8888,下面验证时会用到。

验证:此时命令行执行curl -x 127.0.0.1:8888 https://www.sogou.com
,可以看到Charles有请求输出。
2.2代理设置
想抓取Mac中客户端的请求?在 Proxy Settings 中勾选 Enable macOS proxy 之后就可以看到所有请求在 Charles 中都有记录。需要注意,如果不抓包了需求取消勾选,否则会影响网络的正常使用
网友评论