charles在windows安装就可以抓包。
Ubuntu下操作半天没有实现。解决办法找了很久。
解决办法链接:https://www.golue.com/news/v251289.html
安装:(官方文档的步骤)
First install the GPG public key for the repository so you can verify that the packages are correctly signed. The current public key id is 1AD28806 and its fingerprint is 4BA7 DB85 7B57 0089 7420 96E1 5F16 B97C 1AD2 8806:
wget -q -O - https://www.charlesproxy.com/packages/apt/PublicKey | sudo apt-key add -
or alternatively:
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 1AD28806
Then add the repository to your sources:
sudo sh -c 'echo deb https://www.charlesproxy.com/packages/apt/ charles-proxy main > /etc/apt/sources.list.d/charles.list'
Then update your sources and install Charles:
sudo apt-get update
sudo apt-get install charles-proxy
The package creates a “charles” command in /usr/bin, and adds Charles in your application menus in your window manager.
You may also install the beta track of Charles which is called charles-proxy-beta.
保存Charles根证书
第一步,打开Charles软件,点击“help",选中”SSL Proxy",选择“Save Charles Root Certificate"。
将Charles根证书导入浏览器
打开firefox浏览器的工具栏里的“选项”,打开其中的“高级”、“证书”。选择“查看证书”,选择导入证书,将下载的安全证书导入进去,并选择信任证书。
浏览器代理设置
使用firefox浏览器的代理设置为
address是127.0.0.1,Port是8080
Charles监听端口
打开Charles软件,点击“proxy “,选择”Proxy Setting”,点击弹出一个新窗口,在新窗口中设置监听端口为8080.
完工!