引言:阿里开源功能强大的代理服务器,可用于移动端测试抓包等操作。
01. 简介
JavaScript
02. 安装
$ brew update
$ brew install node
$ node --version
# 安装稳定正式版
$ npm install -g anyproxy
# 最新测试版,需要使用最新版本 node 进行安装
$ npm install -g anyproxy@beta
# 有时需要添加 sudo

$ anyproxy
03. 配置 Https
# 稳定版本生成方法
$ sudo anyproxy --root
# 最新版本生成方法
$ anyproxy-ca
$ anyproxy --intercept
# 简写
$ anyproxy -i
04. 其他
$ npm uninstall anyproxy
$ anyproxy --clear
05. 规则文件
// 允许 Https 解析
module.exports = {
shouldInterceptHttpsReq : function(req){
return true;
}
};
$ anyproxy --rule ./rule.js
# 直接请求服务器
$ curl https://github.com
# 通过代理服务器请求
$ curl https://github.com --proxy http://127.0.0.1:8001
$ anyproxy --rule https://sample.com/rule.js