anyproxy mac安装

官网:http://anyproxy.io/

安装好node环境后,安装anyproxy,在命令行中运行

sudo npm install -g anyproxy

  

要代理https,还需生成CA证书并添加信任

anyproxy-ca

detecting CA status...
AnyProxy CA does not exist.
? Would you like to generate one ? Yes
temp certs cleared
rootCA generated
PLEASE TRUST the rootCA.crt in xxx

接着会自动打开生成证书所在目录,双击其中一个.crt,会在钥匙圈中看到该证书,再双击该证书,展开信任,SSL选项中选择永远信任,输入密码确认即可。

参照官网加载sample.js规则文件。 --intercept开启解析https请求

anyproxy --rule sample.js --intercept

默认代理端口为8001

WebUI端口为8002

原文地址:https://www.cnblogs.com/ycc1/p/13899808.html