Merge pull request #312 from alibaba/doc-build-enhance

Doc build enhancement
This commit is contained in:
Otto Mao 2018-01-07 21:35:52 +08:00 committed by GitHub
commit c788d86605
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 223 additions and 120 deletions

14
build_scripts/build-doc-site.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
## get into the "build_scripts" folder regardless of the excution directory
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cd "$parent_path/.."
## compile the doc
node ./build_scripts/prebuild-doc.js
gitbook build ./docs-src ./docs
## push the doc into github
git add ./docs
git commit -m 'building docs'
git push origin

View File

@ -810,6 +810,14 @@ module.exports = {
<img src="https://zos.alipayobjects.com/rmsportal/hVWkXHrzHmOKOtCKGUWx.png" width="500" /> <img src="https://zos.alipayobjects.com/rmsportal/hVWkXHrzHmOKOtCKGUWx.png" width="500" />
### 安卓系统信任CA证书
首先和iOS类似需要先扫描证书的二维码进行下载。然后不同的安卓系统安装证书的方式可能有所不同但是安装的步骤是类似的我们列举了几种类型。
* 下载后的证书可以直接单击打开并安装,这种方式是最简单的,直接安装即可
* 证书下载到指定目录后,需要从其他入口进行安装,包括:
* 设置 -> 安全性与位置信息 -> 加密与凭据 -> 从存储设备安装。找到你下载的证书文件,进行安装
* 设置 -> 安全 -> 从SD卡安装证书。找到你下载的证书文件进行安装
### 配置iOS/Android系统代理 ### 配置iOS/Android系统代理
* 代理服务器都在wifi设置中配置 * 代理服务器都在wifi设置中配置

View File

@ -35,5 +35,6 @@
* [配置浏览器HTTP代理](README.md#配置浏览器http代理) * [配置浏览器HTTP代理](README.md#配置浏览器http代理)
* [iOS系统信任CA证书](README.md#ios系统信任ca证书) * [iOS系统信任CA证书](README.md#ios系统信任ca证书)
* [iOS >= 10.3信任CA证书](README.md#ios--103信任ca证书) * [iOS >= 10.3信任CA证书](README.md#ios--103信任ca证书)
* [安卓系统信任CA证书](README.md#安卓系统信任ca证书)
* [配置iOS/Android系统代理](README.md#配置iosandroid系统代理) * [配置iOS/Android系统代理](README.md#配置iosandroid系统代理)
* [FAQ](README.md#faq) * [FAQ](README.md#faq)

View File

@ -801,6 +801,15 @@ install
* Besides installing root CA, you have to "turn on" the certificate for web manually in *settings - general - about - Certificate Trust Settings*. Otherwire, safari will not trust the root CA generated by AnyProxy. * Besides installing root CA, you have to "turn on" the certificate for web manually in *settings - general - about - Certificate Trust Settings*. Otherwire, safari will not trust the root CA generated by AnyProxy.
### trust root CA in Android
First of all, you need to download the root CA by clicking *Root CA* in web ui, and then scan the QR code.
Installing CA in Android could be different based on the system, we list some common steps as below, but you can find the right way in you system with similar menu path.
* The downloaded CA file can be directly installed by clicking, this is the easist way
* You need to install the CA file from other menu, such as:
* Settings -> Security & Location > Encryption & credentials -> Install from storage, and find your CA file to install
* Settings -> Security -> Install from SD card, and find you CA file to install
<img src="https://zos.alipayobjects.com/rmsportal/hVWkXHrzHmOKOtCKGUWx.png" width="500" /> <img src="https://zos.alipayobjects.com/rmsportal/hVWkXHrzHmOKOtCKGUWx.png" width="500" />
### config iOS/Android proxy server ### config iOS/Android proxy server

View File

@ -1,38 +1,39 @@
# Summary # Summary
* [Introduction](README.md) * [Introduction](README.md)
* [Getting-Start](doc.md#getting-start) * [Getting-Start](README.md#getting-start)
* [Install](doc.md#install) * [Install](README.md#install)
* [Launch](doc.md#launch) * [Launch](README.md#launch)
* [Options](doc.md#options) * [Options](README.md#options)
* [As Node Module](doc.md#use-anyproxy-as-an-npm-module) * [As Node Module](README.md#use-anyproxy-as-an-npm-module)
* [Proxy HTTPS](doc.md#proxy-https) * [Proxy HTTPS](README.md#proxy-https)
* [Rule Introduction](doc.md#rule-introduction) * [Rule Introduction](README.md#rule-introduction)
* [Sample](doc.md#sample) * [Sample](README.md#sample)
* [How Does It Work](doc.md#how-does-it-work) * [How Does It Work](README.md#how-does-it-work)
* [Load A Rule](doc.md#how-to-load-rule-module) * [Load A Rule](README.md#how-to-load-rule-module)
* [Rule Module Interfaces](doc.md#rule-module-interface) * [Rule Module Interfaces](README.md#rule-module-interface)
* [summary_class=rule-title](doc.md#summary) * [summary_class=rule-title](README.md#summary)
* [beforeSendRequest_class=rule-title](doc.md#beforesendrequest) * [beforeSendRequest_class=rule-title](README.md#beforesendrequest)
* [beforeSendResponse_class=rule-title](doc.md#beforesendresponse) * [beforeSendResponse_class=rule-title](README.md#beforesendresponse)
* [beforeDealHttpsRequest_class=rule-title](doc.md#beforedealhttpsrequest) * [beforeDealHttpsRequest_class=rule-title](README.md#beforedealhttpsrequest)
* [onError_class=rule-title](doc.md#onerror) * [onError_class=rule-title](README.md#onerror)
* [onConnectError_class=rule-title](doc.md#onconnecterror) * [onConnectError_class=rule-title](README.md#onconnecterror)
* [Rule Samples](doc.md#rule-samples) * [Rule Samples](README.md#rule-samples)
* [Use local response_class=sample-title](doc.md#use-local-response) * [Use local response_class=sample-title](README.md#use-local-response)
* [Modify Request Header_class=sample-title](doc.md#modify-request-header) * [Modify Request Header_class=sample-title](README.md#modify-request-header)
* [Modify Request Body_class=sample-title](doc.md#modify-request-body) * [Modify Request Body_class=sample-title](README.md#modify-request-body)
* [Modify The Request Target_class=sample-title](doc.md#modify-the-request-target) * [Modify The Request Target_class=sample-title](README.md#modify-the-request-target)
* [Modify Request Protocol_class=sample-title](doc.md#modify-request-protocol) * [Modify Request Protocol_class=sample-title](README.md#modify-request-protocol)
* [Modify Response Status Code_class=sample-title](doc.md#modify-response-status-code) * [Modify Response Status Code_class=sample-title](README.md#modify-response-status-code)
* [Modify The Response Header_class=sample-title](doc.md#modify-the-response-header) * [Modify The Response Header_class=sample-title](README.md#modify-the-response-header)
* [Modify Response Data And Delay_class=sample-title](doc.md#modify-response-data-and-delay) * [Modify Response Data And Delay_class=sample-title](README.md#modify-response-data-and-delay)
* [Config Certification](doc.md#config-certification) * [Config Certification](README.md#config-certification)
* [Config Root CA In OSX](doc.md#config-root-ca-in-osx) * [Config Root CA In OSX](README.md#config-root-ca-in-osx)
* [Configure Root CA In windows](doc.md#config-root-ca-in-windows) * [Configure Root CA In windows](README.md#config-root-ca-in-windows)
* [Config OSX System Proxy](doc.md#config-osx-system-proxy) * [Config OSX System Proxy](README.md#config-osx-system-proxy)
* [Config As Http Proxy Server](doc.md#config-http-proxy-server) * [Config As Http Proxy Server](README.md#config-http-proxy-server)
* [Trust Root CA In IOS](doc.md#trust-root-ca-in-ios) * [Trust Root CA In IOS](README.md#trust-root-ca-in-ios)
* [Trust Root CA In iOS after 10.3](doc.md#trust-root-ca-in-ios-after-103) * [Trust Root CA In iOS after 10.3](README.md#trust-root-ca-in-ios-after-103)
* [Config IOS/Android Proxy Server](doc.md#config-iosandroid-proxy-server) * [Trust Root CA In Android](README.md#trust-root-ca-in-android)
* [FAQ](doc.md) * [Config IOS/Android Proxy Server](README.md#config-iosandroid-proxy-server)
* [FAQ](README.md)

View File

@ -19,7 +19,7 @@
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}
<link rel="shortcut icon" href="/assets/favicon.png" type="image/png"> <link rel="shortcut icon" href="/assets/favicon.png" type="image/png">
<link rel="stylesheet" href="/assets/styles/website.css"> <link rel="stylesheet" href="/assets/website.css">
<script src="/assets/main.js" ></script> <script src="/assets/main.js" ></script>
</head> </head>
<body> <body>

View File

@ -7,7 +7,7 @@
<title>简介 · AnyProxy</title> <title>简介 · AnyProxy</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content=""> <meta name="description" content="">
<meta name="generator" content="GitBook 3.2.2"> <meta name="generator" content="GitBook 3.2.3">
<meta name="author" content="AnyProxy"> <meta name="author" content="AnyProxy">
@ -649,6 +649,22 @@
<li class="chapter " data-level="1.7.7" data-path="./"> <li class="chapter " data-level="1.7.7" data-path="./">
<a href="./#安卓系统信任ca证书">
<div class="summary-title-span 安卓系统信任CA证书">
安卓系统信任CA证书
</div>
</a>
</li>
<li class="chapter " data-level="1.7.8" data-path="./">
<a href="./#配置iosandroid系统代理"> <a href="./#配置iosandroid系统代理">
@ -1512,6 +1528,16 @@ newResponse.body += <span class="hljs-string">&apos;--from anyproxy--&apos;</spa
<li>&#x9664;&#x4E86;&#x4E0A;&#x8FF0;&#x8BC1;&#x4E66;&#x5B89;&#x88C5;&#x8FC7;&#x7A0B;&#xFF0C;&#x8FD8;&#x9700;&#x8981;&#x5728; <em>&#x8BBE;&#x7F6E;-&gt;&#x901A;&#x7528;-&gt;&#x5173;&#x4E8E;&#x672C;&#x673A;-&gt;&#x8BC1;&#x4E66;&#x4FE1;&#x4EFB;&#x8BBE;&#x7F6E;</em> &#x4E2D;&#x628A;AnyProxy&#x8BC1;&#x4E66;&#x7684;&#x5F00;&#x5173;&#x6253;&#x5F00;&#xFF0C;&#x5426;&#x5219;safari&#x5C06;&#x62A5;&#x9519;&#x3002;</li> <li>&#x9664;&#x4E86;&#x4E0A;&#x8FF0;&#x8BC1;&#x4E66;&#x5B89;&#x88C5;&#x8FC7;&#x7A0B;&#xFF0C;&#x8FD8;&#x9700;&#x8981;&#x5728; <em>&#x8BBE;&#x7F6E;-&gt;&#x901A;&#x7528;-&gt;&#x5173;&#x4E8E;&#x672C;&#x673A;-&gt;&#x8BC1;&#x4E66;&#x4FE1;&#x4EFB;&#x8BBE;&#x7F6E;</em> &#x4E2D;&#x628A;AnyProxy&#x8BC1;&#x4E66;&#x7684;&#x5F00;&#x5173;&#x6253;&#x5F00;&#xFF0C;&#x5426;&#x5219;safari&#x5C06;&#x62A5;&#x9519;&#x3002;</li>
</ul> </ul>
<p><img src="https://zos.alipayobjects.com/rmsportal/hVWkXHrzHmOKOtCKGUWx.png" width="500"></p> <p><img src="https://zos.alipayobjects.com/rmsportal/hVWkXHrzHmOKOtCKGUWx.png" width="500"></p>
<h3 id="&#x5B89;&#x5353;&#x7CFB;&#x7EDF;&#x4FE1;&#x4EFB;ca&#x8BC1;&#x4E66;">&#x5B89;&#x5353;&#x7CFB;&#x7EDF;&#x4FE1;&#x4EFB;CA&#x8BC1;&#x4E66;</h3>
<p>&#x9996;&#x5148;&#x548C;iOS&#x7C7B;&#x4F3C;&#xFF0C;&#x9700;&#x8981;&#x5148;&#x626B;&#x63CF;&#x8BC1;&#x4E66;&#x7684;&#x4E8C;&#x7EF4;&#x7801;&#x8FDB;&#x884C;&#x4E0B;&#x8F7D;&#x3002;&#x7136;&#x540E;&#x4E0D;&#x540C;&#x7684;&#x5B89;&#x5353;&#x7CFB;&#x7EDF;&#x5B89;&#x88C5;&#x8BC1;&#x4E66;&#x7684;&#x65B9;&#x5F0F;&#x53EF;&#x80FD;&#x6709;&#x6240;&#x4E0D;&#x540C;&#xFF0C;&#x4F46;&#x662F;&#x5B89;&#x88C5;&#x7684;&#x6B65;&#x9AA4;&#x662F;&#x7C7B;&#x4F3C;&#x7684;&#xFF0C;&#x6211;&#x4EEC;&#x5217;&#x4E3E;&#x4E86;&#x51E0;&#x79CD;&#x7C7B;&#x578B;&#x3002;</p>
<ul>
<li>&#x4E0B;&#x8F7D;&#x540E;&#x7684;&#x8BC1;&#x4E66;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x5355;&#x51FB;&#x6253;&#x5F00;&#x5E76;&#x5B89;&#x88C5;&#xFF0C;&#x8FD9;&#x79CD;&#x65B9;&#x5F0F;&#x662F;&#x6700;&#x7B80;&#x5355;&#x7684;&#xFF0C;&#x76F4;&#x63A5;&#x5B89;&#x88C5;&#x5373;&#x53EF;</li>
<li>&#x8BC1;&#x4E66;&#x4E0B;&#x8F7D;&#x5230;&#x6307;&#x5B9A;&#x76EE;&#x5F55;&#x540E;&#xFF0C;&#x9700;&#x8981;&#x4ECE;&#x5176;&#x4ED6;&#x5165;&#x53E3;&#x8FDB;&#x884C;&#x5B89;&#x88C5;&#xFF0C;&#x5305;&#x62EC;&#xFF1A;<ul>
<li>&#x8BBE;&#x7F6E; -&gt; &#x5B89;&#x5168;&#x6027;&#x4E0E;&#x4F4D;&#x7F6E;&#x4FE1;&#x606F; -&gt; &#x52A0;&#x5BC6;&#x4E0E;&#x51ED;&#x636E; -&gt; &#x4ECE;&#x5B58;&#x50A8;&#x8BBE;&#x5907;&#x5B89;&#x88C5;&#x3002;&#x627E;&#x5230;&#x4F60;&#x4E0B;&#x8F7D;&#x7684;&#x8BC1;&#x4E66;&#x6587;&#x4EF6;&#xFF0C;&#x8FDB;&#x884C;&#x5B89;&#x88C5;</li>
<li>&#x8BBE;&#x7F6E; -&gt; &#x5B89;&#x5168; -&gt; &#x4ECE;SD&#x5361;&#x5B89;&#x88C5;&#x8BC1;&#x4E66;&#x3002;&#x627E;&#x5230;&#x4F60;&#x4E0B;&#x8F7D;&#x7684;&#x8BC1;&#x4E66;&#x6587;&#x4EF6;&#xFF0C;&#x8FDB;&#x884C;&#x5B89;&#x88C5;</li>
</ul>
</li>
</ul>
<h3 id="&#x914D;&#x7F6E;iosandroid&#x7CFB;&#x7EDF;&#x4EE3;&#x7406;">&#x914D;&#x7F6E;iOS/Android&#x7CFB;&#x7EDF;&#x4EE3;&#x7406;</h3> <h3 id="&#x914D;&#x7F6E;iosandroid&#x7CFB;&#x7EDF;&#x4EE3;&#x7406;">&#x914D;&#x7F6E;iOS/Android&#x7CFB;&#x7EDF;&#x4EE3;&#x7406;</h3>
<ul> <ul>
<li><p>&#x4EE3;&#x7406;&#x670D;&#x52A1;&#x5668;&#x90FD;&#x5728;wifi&#x8BBE;&#x7F6E;&#x4E2D;&#x914D;&#x7F6E;</p> <li><p>&#x4EE3;&#x7406;&#x670D;&#x52A1;&#x5668;&#x90FD;&#x5728;wifi&#x8BBE;&#x7F6E;&#x4E2D;&#x914D;&#x7F6E;</p>
@ -1609,7 +1635,7 @@ newResponse.body += <span class="hljs-string">&apos;--from anyproxy--&apos;</spa
<script> <script>
var gitbook = gitbook || []; var gitbook = gitbook || [];
gitbook.push(function() { gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"简介","level":"1.1","depth":1,"next":{"title":"快速开始","level":"1.2","depth":1,"anchor":"#快速开始","path":"README.md","ref":"README.md#快速开始","articles":[{"title":"安装","level":"1.2.1","depth":2,"anchor":"#安装","path":"README.md","ref":"README.md#安装","articles":[]},{"title":"启动","level":"1.2.2","depth":2,"anchor":"#启动","path":"README.md","ref":"README.md#启动","articles":[]},{"title":"其他命令","level":"1.2.3","depth":2,"anchor":"#其他命令","path":"README.md","ref":"README.md#其他命令","articles":[]},{"title":"作为npm模块启动","level":"1.2.4","depth":2,"anchor":"#作为npm模块使用","path":"README.md","ref":"README.md#作为npm模块使用","articles":[]}]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"AnyProxy","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"AnyProxy","language":"cn","gitbook":"*","description":"A fully configurable http/https proxy in NodeJS"},"file":{"path":"README.md","mtime":"2017-12-04T09:09:48.736Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-12-04T09:09:50.456Z"},"basePath":".","book":{"language":"cn"}}); gitbook.page.hasChanged({"page":{"title":"简介","level":"1.1","depth":1,"next":{"title":"快速开始","level":"1.2","depth":1,"anchor":"#快速开始","path":"README.md","ref":"README.md#快速开始","articles":[{"title":"安装","level":"1.2.1","depth":2,"anchor":"#安装","path":"README.md","ref":"README.md#安装","articles":[]},{"title":"启动","level":"1.2.2","depth":2,"anchor":"#启动","path":"README.md","ref":"README.md#启动","articles":[]},{"title":"其他命令","level":"1.2.3","depth":2,"anchor":"#其他命令","path":"README.md","ref":"README.md#其他命令","articles":[]},{"title":"作为npm模块启动","level":"1.2.4","depth":2,"anchor":"#作为npm模块使用","path":"README.md","ref":"README.md#作为npm模块使用","articles":[]}]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"AnyProxy","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"AnyProxy","language":"cn","gitbook":"*","description":"A fully configurable http/https proxy in NodeJS"},"file":{"path":"README.md","mtime":"2018-01-03T15:10:19.584Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-01-03T15:10:20.722Z"},"basePath":".","book":{"language":"cn"}});
}); });
</script> </script>
</div> </div>

File diff suppressed because one or more lines are too long

View File

@ -611,6 +611,14 @@ module.exports = {
<img src="https://zos.alipayobjects.com/rmsportal/hVWkXHrzHmOKOtCKGUWx.png" width="500" /> <img src="https://zos.alipayobjects.com/rmsportal/hVWkXHrzHmOKOtCKGUWx.png" width="500" />
### 安卓系统信任CA证书
首先和iOS类似需要先扫描证书的二维码进行下载。然后不同的安卓系统安装证书的方式可能有所不同但是安装的步骤是类似的我们列举了几种类型。
* 下载后的证书可以直接单击打开并安装,这种方式是最简单的,直接安装即可
* 证书下载到指定目录后,需要从其他入口进行安装,包括:
* 设置 -> 安全性与位置信息 -> 加密与凭据 -> 从存储设备安装。找到你下载的证书文件,进行安装
* 设置 -> 安全 -> 从SD卡安装证书。找到你下载的证书文件进行安装
### 配置iOS/Android系统代理 ### 配置iOS/Android系统代理
* 代理服务器都在wifi设置中配置 * 代理服务器都在wifi设置中配置

View File

@ -7,7 +7,7 @@
<title>Introduction · AnyProxy</title> <title>Introduction · AnyProxy</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content=""> <meta name="description" content="">
<meta name="generator" content="GitBook 3.2.2"> <meta name="generator" content="GitBook 3.2.3">
<meta name="author" content="AnyProxy"> <meta name="author" content="AnyProxy">
@ -37,7 +37,7 @@
<link rel="shortcut icon" href="/assets/favicon.png" type="image/png"> <link rel="shortcut icon" href="/assets/favicon.png" type="image/png">
<link rel="stylesheet" href="/assets/styles/website.css"> <link rel="stylesheet" href="/assets/website.css">
<script src="/assets/main.js" ></script> <script src="/assets/main.js" ></script>
</head> </head>
<body> <body>
@ -81,9 +81,9 @@
</li> </li>
<li class="chapter " data-level="1.2" data-path="doc.md"> <li class="chapter " data-level="1.2" data-path="./">
<span> <a href="./#getting-start">
<div class="summary-title-span Getting-Start"> <div class="summary-title-span Getting-Start">
@ -98,9 +98,9 @@
<ul class="articles"> <ul class="articles">
<li class="chapter " data-level="1.2.1" data-path="doc.md"> <li class="chapter " data-level="1.2.1" data-path="./">
<span> <a href="./#install">
<div class="summary-title-span Install"> <div class="summary-title-span Install">
@ -114,9 +114,9 @@
</li> </li>
<li class="chapter " data-level="1.2.2" data-path="doc.md"> <li class="chapter " data-level="1.2.2" data-path="./">
<span> <a href="./#launch">
<div class="summary-title-span Launch"> <div class="summary-title-span Launch">
@ -130,9 +130,9 @@
</li> </li>
<li class="chapter " data-level="1.2.3" data-path="doc.md"> <li class="chapter " data-level="1.2.3" data-path="./">
<span> <a href="./#options">
<div class="summary-title-span Options"> <div class="summary-title-span Options">
@ -146,9 +146,9 @@
</li> </li>
<li class="chapter " data-level="1.2.4" data-path="doc.md"> <li class="chapter " data-level="1.2.4" data-path="./">
<span> <a href="./#use-anyproxy-as-an-npm-module">
<div class="summary-title-span As Node Module"> <div class="summary-title-span As Node Module">
@ -167,9 +167,9 @@
</li> </li>
<li class="chapter " data-level="1.3" data-path="doc.md"> <li class="chapter " data-level="1.3" data-path="./">
<span> <a href="./#proxy-https">
<div class="summary-title-span Proxy HTTPS"> <div class="summary-title-span Proxy HTTPS">
@ -183,9 +183,9 @@
</li> </li>
<li class="chapter " data-level="1.4" data-path="doc.md"> <li class="chapter " data-level="1.4" data-path="./">
<span> <a href="./#rule-introduction">
<div class="summary-title-span Rule Introduction"> <div class="summary-title-span Rule Introduction">
@ -200,9 +200,9 @@
<ul class="articles"> <ul class="articles">
<li class="chapter " data-level="1.4.1" data-path="doc.md"> <li class="chapter " data-level="1.4.1" data-path="./">
<span> <a href="./#sample">
<div class="summary-title-span Sample"> <div class="summary-title-span Sample">
@ -216,9 +216,9 @@
</li> </li>
<li class="chapter " data-level="1.4.2" data-path="doc.md"> <li class="chapter " data-level="1.4.2" data-path="./">
<span> <a href="./#how-does-it-work">
<div class="summary-title-span How Does It Work"> <div class="summary-title-span How Does It Work">
@ -232,9 +232,9 @@
</li> </li>
<li class="chapter " data-level="1.4.3" data-path="doc.md"> <li class="chapter " data-level="1.4.3" data-path="./">
<span> <a href="./#how-to-load-rule-module">
<div class="summary-title-span Load A Rule"> <div class="summary-title-span Load A Rule">
@ -253,9 +253,9 @@
</li> </li>
<li class="chapter " data-level="1.5" data-path="doc.md"> <li class="chapter " data-level="1.5" data-path="./">
<span> <a href="./#rule-module-interface">
<div class="summary-title-span Rule Module Interfaces"> <div class="summary-title-span Rule Module Interfaces">
@ -270,9 +270,9 @@
<ul class="articles"> <ul class="articles">
<li class="chapter " data-level="1.5.1" data-path="doc.md"> <li class="chapter " data-level="1.5.1" data-path="./">
<span> <a href="./#summary">
<div class="summary-title-span rule-title"> <div class="summary-title-span rule-title">
@ -286,9 +286,9 @@
</li> </li>
<li class="chapter " data-level="1.5.2" data-path="doc.md"> <li class="chapter " data-level="1.5.2" data-path="./">
<span> <a href="./#beforesendrequest">
<div class="summary-title-span rule-title"> <div class="summary-title-span rule-title">
@ -302,9 +302,9 @@
</li> </li>
<li class="chapter " data-level="1.5.3" data-path="doc.md"> <li class="chapter " data-level="1.5.3" data-path="./">
<span> <a href="./#beforesendresponse">
<div class="summary-title-span rule-title"> <div class="summary-title-span rule-title">
@ -318,9 +318,9 @@
</li> </li>
<li class="chapter " data-level="1.5.4" data-path="doc.md"> <li class="chapter " data-level="1.5.4" data-path="./">
<span> <a href="./#beforedealhttpsrequest">
<div class="summary-title-span rule-title"> <div class="summary-title-span rule-title">
@ -334,9 +334,9 @@
</li> </li>
<li class="chapter " data-level="1.5.5" data-path="doc.md"> <li class="chapter " data-level="1.5.5" data-path="./">
<span> <a href="./#onerror">
<div class="summary-title-span rule-title"> <div class="summary-title-span rule-title">
@ -350,9 +350,9 @@
</li> </li>
<li class="chapter " data-level="1.5.6" data-path="doc.md"> <li class="chapter " data-level="1.5.6" data-path="./">
<span> <a href="./#onconnecterror">
<div class="summary-title-span rule-title"> <div class="summary-title-span rule-title">
@ -371,9 +371,9 @@
</li> </li>
<li class="chapter " data-level="1.6" data-path="doc.md"> <li class="chapter " data-level="1.6" data-path="./">
<span> <a href="./#rule-samples">
<div class="summary-title-span Rule Samples"> <div class="summary-title-span Rule Samples">
@ -388,9 +388,9 @@
<ul class="articles"> <ul class="articles">
<li class="chapter " data-level="1.6.1" data-path="doc.md"> <li class="chapter " data-level="1.6.1" data-path="./">
<span> <a href="./#use-local-response">
<div class="summary-title-span sample-title"> <div class="summary-title-span sample-title">
@ -404,9 +404,9 @@
</li> </li>
<li class="chapter " data-level="1.6.2" data-path="doc.md"> <li class="chapter " data-level="1.6.2" data-path="./">
<span> <a href="./#modify-request-header">
<div class="summary-title-span sample-title"> <div class="summary-title-span sample-title">
@ -420,9 +420,9 @@
</li> </li>
<li class="chapter " data-level="1.6.3" data-path="doc.md"> <li class="chapter " data-level="1.6.3" data-path="./">
<span> <a href="./#modify-request-body">
<div class="summary-title-span sample-title"> <div class="summary-title-span sample-title">
@ -436,9 +436,9 @@
</li> </li>
<li class="chapter " data-level="1.6.4" data-path="doc.md"> <li class="chapter " data-level="1.6.4" data-path="./">
<span> <a href="./#modify-the-request-target">
<div class="summary-title-span sample-title"> <div class="summary-title-span sample-title">
@ -452,9 +452,9 @@
</li> </li>
<li class="chapter " data-level="1.6.5" data-path="doc.md"> <li class="chapter " data-level="1.6.5" data-path="./">
<span> <a href="./#modify-request-protocol">
<div class="summary-title-span sample-title"> <div class="summary-title-span sample-title">
@ -468,9 +468,9 @@
</li> </li>
<li class="chapter " data-level="1.6.6" data-path="doc.md"> <li class="chapter " data-level="1.6.6" data-path="./">
<span> <a href="./#modify-response-status-code">
<div class="summary-title-span sample-title"> <div class="summary-title-span sample-title">
@ -484,9 +484,9 @@
</li> </li>
<li class="chapter " data-level="1.6.7" data-path="doc.md"> <li class="chapter " data-level="1.6.7" data-path="./">
<span> <a href="./#modify-the-response-header">
<div class="summary-title-span sample-title"> <div class="summary-title-span sample-title">
@ -500,9 +500,9 @@
</li> </li>
<li class="chapter " data-level="1.6.8" data-path="doc.md"> <li class="chapter " data-level="1.6.8" data-path="./">
<span> <a href="./#modify-response-data-and-delay">
<div class="summary-title-span sample-title"> <div class="summary-title-span sample-title">
@ -521,9 +521,9 @@
</li> </li>
<li class="chapter " data-level="1.7" data-path="doc.md"> <li class="chapter " data-level="1.7" data-path="./">
<span> <a href="./#config-certification">
<div class="summary-title-span Config Certification"> <div class="summary-title-span Config Certification">
@ -538,9 +538,9 @@
<ul class="articles"> <ul class="articles">
<li class="chapter " data-level="1.7.1" data-path="doc.md"> <li class="chapter " data-level="1.7.1" data-path="./">
<span> <a href="./#config-root-ca-in-osx">
<div class="summary-title-span Config Root CA In OSX"> <div class="summary-title-span Config Root CA In OSX">
@ -554,9 +554,9 @@
</li> </li>
<li class="chapter " data-level="1.7.2" data-path="doc.md"> <li class="chapter " data-level="1.7.2" data-path="./">
<span> <a href="./#config-root-ca-in-windows">
<div class="summary-title-span Configure Root CA In windows"> <div class="summary-title-span Configure Root CA In windows">
@ -570,9 +570,9 @@
</li> </li>
<li class="chapter " data-level="1.7.3" data-path="doc.md"> <li class="chapter " data-level="1.7.3" data-path="./">
<span> <a href="./#config-osx-system-proxy">
<div class="summary-title-span Config OSX System Proxy"> <div class="summary-title-span Config OSX System Proxy">
@ -586,9 +586,9 @@
</li> </li>
<li class="chapter " data-level="1.7.4" data-path="doc.md"> <li class="chapter " data-level="1.7.4" data-path="./">
<span> <a href="./#config-http-proxy-server">
<div class="summary-title-span Config As Http Proxy Server"> <div class="summary-title-span Config As Http Proxy Server">
@ -602,9 +602,9 @@
</li> </li>
<li class="chapter " data-level="1.7.5" data-path="doc.md"> <li class="chapter " data-level="1.7.5" data-path="./">
<span> <a href="./#trust-root-ca-in-ios">
<div class="summary-title-span Trust Root CA In IOS"> <div class="summary-title-span Trust Root CA In IOS">
@ -618,9 +618,9 @@
</li> </li>
<li class="chapter " data-level="1.7.6" data-path="doc.md"> <li class="chapter " data-level="1.7.6" data-path="./">
<span> <a href="./#trust-root-ca-in-ios-after-103">
<div class="summary-title-span Trust Root CA In iOS after 10.3"> <div class="summary-title-span Trust Root CA In iOS after 10.3">
@ -634,9 +634,25 @@
</li> </li>
<li class="chapter " data-level="1.7.7" data-path="doc.md"> <li class="chapter " data-level="1.7.7" data-path="./">
<span> <a href="./#trust-root-ca-in-android">
<div class="summary-title-span Trust Root CA In Android">
Trust Root CA In Android
</div>
</a>
</li>
<li class="chapter " data-level="1.7.8" data-path="./">
<a href="./#config-iosandroid-proxy-server">
<div class="summary-title-span Config IOS/Android Proxy Server"> <div class="summary-title-span Config IOS/Android Proxy Server">
@ -655,9 +671,9 @@
</li> </li>
<li class="chapter " data-level="1.8" data-path="doc.md"> <li class="chapter active" data-level="1.8" data-path="./">
<span> <a href="./">
<div class="summary-title-span FAQ"> <div class="summary-title-span FAQ">
@ -1493,6 +1509,17 @@ newResponse.body += <span class="hljs-string">&apos;--from anyproxy--&apos;</spa
<ul> <ul>
<li>Besides installing root CA, you have to &quot;turn on&quot; the certificate for web manually in <em>settings - general - about - Certificate Trust Settings</em>. Otherwire, safari will not trust the root CA generated by AnyProxy.</li> <li>Besides installing root CA, you have to &quot;turn on&quot; the certificate for web manually in <em>settings - general - about - Certificate Trust Settings</em>. Otherwire, safari will not trust the root CA generated by AnyProxy.</li>
</ul> </ul>
<h3 id="trust-root-ca-in-android">trust root CA in Android</h3>
<p>First of all, you need to download the root CA by clicking <em>Root CA</em> in web ui, and then scan the QR code.
Installing CA in Android could be different based on the system, we list some common steps as below, but you can find the right way in you system with similar menu path.</p>
<ul>
<li>The downloaded CA file can be directly installed by clicking, this is the easist way</li>
<li>You need to install the CA file from other menu, such as:<ul>
<li>Settings -&gt; Security &amp; Location &gt; Encryption &amp; credentials -&gt; Install from storage, and find your CA file to install</li>
<li>Settings -&gt; Security -&gt; Install from SD card, and find you CA file to install</li>
</ul>
</li>
</ul>
<p><img src="https://zos.alipayobjects.com/rmsportal/hVWkXHrzHmOKOtCKGUWx.png" width="500"></p> <p><img src="https://zos.alipayobjects.com/rmsportal/hVWkXHrzHmOKOtCKGUWx.png" width="500"></p>
<h3 id="config-iosandroid-proxy-server">config iOS/Android proxy server</h3> <h3 id="config-iosandroid-proxy-server">config iOS/Android proxy server</h3>
<ul> <ul>
@ -1585,7 +1612,7 @@ You can change the request with rule of course. For this scenario, all you need
<a href="doc.md#getting-start" class="navigation navigation-next navigation-unique" aria-label="Next page: Getting-Start"> <a href="./#getting-start" class="navigation navigation-next navigation-unique" aria-label="Next page: Getting-Start">
<i class="fa fa-angle-right"></i> <i class="fa fa-angle-right"></i>
</a> </a>
@ -1596,7 +1623,7 @@ You can change the request with rule of course. For this scenario, all you need
<script> <script>
var gitbook = gitbook || []; var gitbook = gitbook || [];
gitbook.push(function() { gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Introduction","level":"1.1","depth":1,"next":{"title":"Getting-Start","level":"1.2","depth":1,"anchor":"#getting-start","path":"doc.md","ref":"doc.md#getting-start","articles":[{"title":"Install","level":"1.2.1","depth":2,"anchor":"#install","path":"doc.md","ref":"doc.md#install","articles":[]},{"title":"Launch","level":"1.2.2","depth":2,"anchor":"#launch","path":"doc.md","ref":"doc.md#launch","articles":[]},{"title":"Options","level":"1.2.3","depth":2,"anchor":"#options","path":"doc.md","ref":"doc.md#options","articles":[]},{"title":"As Node Module","level":"1.2.4","depth":2,"anchor":"#use-anyproxy-as-an-npm-module","path":"doc.md","ref":"doc.md#use-anyproxy-as-an-npm-module","articles":[]}]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"AnyProxy","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"AnyProxy","language":"en","gitbook":"*","description":"A fully configurable http/https proxy in NodeJS"},"file":{"path":"README.md","mtime":"2017-12-04T09:09:48.736Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-12-04T09:09:50.456Z"},"basePath":".","book":{"language":"en"}}); gitbook.page.hasChanged({"page":{"title":"Introduction","level":"1.1","depth":1,"next":{"title":"Getting-Start","level":"1.2","depth":1,"anchor":"#getting-start","path":"README.md","ref":"README.md#getting-start","articles":[{"title":"Install","level":"1.2.1","depth":2,"anchor":"#install","path":"README.md","ref":"README.md#install","articles":[]},{"title":"Launch","level":"1.2.2","depth":2,"anchor":"#launch","path":"README.md","ref":"README.md#launch","articles":[]},{"title":"Options","level":"1.2.3","depth":2,"anchor":"#options","path":"README.md","ref":"README.md#options","articles":[]},{"title":"As Node Module","level":"1.2.4","depth":2,"anchor":"#use-anyproxy-as-an-npm-module","path":"README.md","ref":"README.md#use-anyproxy-as-an-npm-module","articles":[]}]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"AnyProxy","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"AnyProxy","language":"en","gitbook":"*","description":"A fully configurable http/https proxy in NodeJS"},"file":{"path":"README.md","mtime":"2018-01-03T15:10:19.585Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-01-03T15:10:20.722Z"},"basePath":".","book":{"language":"en"}});
}); });
</script> </script>
</div> </div>

File diff suppressed because one or more lines are too long

View File

@ -602,6 +602,15 @@ install
* Besides installing root CA, you have to "turn on" the certificate for web manually in *settings - general - about - Certificate Trust Settings*. Otherwire, safari will not trust the root CA generated by AnyProxy. * Besides installing root CA, you have to "turn on" the certificate for web manually in *settings - general - about - Certificate Trust Settings*. Otherwire, safari will not trust the root CA generated by AnyProxy.
### trust root CA in Android
First of all, you need to download the root CA by clicking *Root CA* in web ui, and then scan the QR code.
Installing CA in Android could be different based on the system, we list some common steps as below, but you can find the right way in you system with similar menu path.
* The downloaded CA file can be directly installed by clicking, this is the easist way
* You need to install the CA file from other menu, such as:
* Settings -> Security & Location > Encryption & credentials -> Install from storage, and find your CA file to install
* Settings -> Security -> Install from SD card, and find you CA file to install
<img src="https://zos.alipayobjects.com/rmsportal/hVWkXHrzHmOKOtCKGUWx.png" width="500" /> <img src="https://zos.alipayobjects.com/rmsportal/hVWkXHrzHmOKOtCKGUWx.png" width="500" />
### config iOS/Android proxy server ### config iOS/Android proxy server

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
<title>Choose a language · AnyProxy</title> <title>Choose a language · AnyProxy</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content=""> <meta name="description" content="">
<meta name="generator" content="GitBook 3.2.2"> <meta name="generator" content="GitBook 3.2.3">
<meta name="author" content="AnyProxy"> <meta name="author" content="AnyProxy">

File diff suppressed because one or more lines are too long

View File

@ -101,7 +101,7 @@
"buildweb": "NODE_ENV=production webpack --config web/webpack.config.js --process --colors", "buildweb": "NODE_ENV=production webpack --config web/webpack.config.js --process --colors",
"webserver": "NODE_ENV=test webpack --config web/webpack.config.js --process --colors --watch", "webserver": "NODE_ENV=test webpack --config web/webpack.config.js --process --colors --watch",
"doc:serve": "node build_scripts/prebuild-doc.js && gitbook serve ./docs-src ./docs --log debug", "doc:serve": "node build_scripts/prebuild-doc.js && gitbook serve ./docs-src ./docs --log debug",
"doc:build": "node build_scripts/prebuild-doc.js && gitbook build ./docs-src ./docs" "doc:build": "./build_scripts/build-doc-site.sh"
}, },
"pre-commit": [ "pre-commit": [
"lint" "lint"