mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-05-19 13:38:27 +00:00
Created HTTPS相关教程 (markdown)
parent
35a9164e8b
commit
2d3e16b626
30
HTTPS相关教程.md
Normal file
30
HTTPS相关教程.md
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
AnyProxy解析HTTPS的原理是自制根证书(rootCA),待终端信任这份证书之后,再用它签发各个URL的二级证书,用这个二级证书来重新对各个页面进行编解码。这种方案和HTTPS的“中间人攻击”(MITM)是一致的。
|
||||
|
||||
这份中文文档简略概述了用AnyProxy做HTTPS处理的相关流程。更完整的内容可以读这里的英文文档:[https://github.com/alibaba/anyproxy/wiki/How-to-config-https-proxy](https://github.com/alibaba/anyproxy/wiki/How-to-config-https-proxy)
|
||||
|
||||
#### Step 1 - 安装openSSL
|
||||
|
||||
* OSX系统自带了openSSL,可以略过这步
|
||||
* openSSL的安装:[http://wiki.openssl.org/index.php/Compilation_and_Installation](http://wiki.openssl.org/index.php/Compilation_and_Installation)
|
||||
* 安装完成后可以通过``openssl version -a ``看到安装情况。
|
||||
|
||||
#### Step 2 - 生成RootCA,信任它
|
||||
|
||||
* 命令行执行 ``sudo anyproxy --root``
|
||||
* 方法一: 执行完成之后,会打开证书的安装路径,打开并信任 rootCA.crt 文件
|
||||
* 方法二: 启动anyproxy,浏览器打开 [http://localhost:8002/fetchCrtFile](http://localhost:8002/fetchCrtFile) ,也能获取rootCA.crt文件
|
||||
* 方法三:启动anyproxy,[http://localhost:8002/qr_root](http://localhost:8002/qr_root) 可以获取证书路径的二维码,移动端安装时会比较便捷
|
||||
* 如果在访问时出现UNAUTHORIZED_CERTIFICATE一类的安全警告,请重新检查证书的安装情况
|
||||
* 证书只需生成一次,每个终端都需要信任它
|
||||
|
||||
#### Step 3 - 明文解析HTTPS
|
||||
|
||||
* 需要解析HTTPS时,用intercept参数来启动anyproxy ``anyproxy --intercept``
|
||||
* 为终端设置代理,在UI界面就能看到明文的HTTPS请求数据了,带把小锁各行的就是HTTPS请求
|
||||
|
||||

|
||||
|
||||
#### 其他
|
||||
|
||||
* ``anyproxy --clear``可以清除所有已生成的证书
|
Loading…
x
Reference in New Issue
Block a user