We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
全局安装AnyProxy模块
npm i -g anyproxy
生成证书
anyproxy-ca
以代理https的方式启动
anyproxy -i
在浏览器打开链接
http://localhost:8002/
用的是Charles,具体可以参考网上其他文章,当然这个我后来也没配置,直接在手机的代理设置好PC的IP和默认的8001端口就可以了
本地双击直接安装rootCA.crt
rootCA.crt
C:\Users\Administrator\.anyproxy\certificates\rootCA.crt
扫描http://localhost:8002/界面下的RootCA二维码下载到手机
RootCA
这里有一点要注意,如果是IOS10+,安装完证书之后要在设置->通用->关于本机->证书信任设置,打开对应的针对根证书启用完全信任,才可以抓包成功
设置->通用->关于本机->证书信任设置
新建rule.js文件
module.exports = { summary: 'a rule to hack response', * beforeSendResponse(requestDetail, responseDetail) { if (requestDetail.url === 'http://httpbin.org/user-agent') { const newResponse = responseDetail.response; newResponse.body += '- AnyProxy Hacked! Wscats Test~'; return new Promise((resolve, reject) => { setTimeout(() => { // delay resolve({ response: newResponse }); }, 5000); }); } }, };
在终端执行一下命令,在手机端打开http://httpbin.org/user-agent链接测试,代理https请求记得加上--intercept参数
http://httpbin.org/user-agent
--intercept
anyproxy --intercept --rule rule.js
然后在浏览器打开链接http://localhost:8002/可以看到页面会有一下内容,证明配置规则成功
{ "user-agent": "Mozilla/5.0 (Linux; U; Android 6.0.1; zh-cn; Redmi 4A Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.146 Mobile Safari/537.36 XiaoMi/MiuiBrowser/9.3.10" } - AnyProxy Hacked! Wscats Test~
AnyProxy
The text was updated successfully, but these errors were encountered:
No branches or pull requests
安装AnyProxy
全局安装AnyProxy模块
配置
生成证书
以代理https的方式启动
在浏览器打开链接
安装证书
配置代理
用的是Charles,具体可以参考网上其他文章,当然这个我后来也没配置,直接在手机的代理设置好PC的IP和默认的8001端口就可以了
PC端
本地双击直接安装
rootCA.crt
手机端
扫描
http://localhost:8002/
界面下的RootCA
二维码下载到手机这里有一点要注意,如果是IOS10+,安装完证书之后要在
设置->通用->关于本机->证书信任设置
,打开对应的针对根证书启用完全信任,才可以抓包成功定义规则
新建rule.js文件
在终端执行一下命令,在手机端打开
http://httpbin.org/user-agent
链接测试,代理https请求记得加上--intercept
参数然后在浏览器打开链接
http://localhost:8002/
可以看到页面会有一下内容,证明配置规则成功参考文档
AnyProxy
The text was updated successfully, but these errors were encountered: