1
0
mirror of https://github.com/alibaba/anyproxy.git synced 2025-05-10 14:58:27 +00:00

building docs

This commit is contained in:
Otto Mao 2018-02-06 00:06:52 +08:00
parent a5027340dc
commit 98fc3fa2ee
7 changed files with 122 additions and 63 deletions

@ -198,6 +198,22 @@
<li class="chapter " data-level="1.4" data-path="./">
<a href="./#代理websocket">
<div class="summary-title-span 代理WebSocket">
代理WebSocket
</div>
</a>
</li>
<li class="chapter " data-level="1.5" data-path="./">
<a href="./#rule模块">
@ -213,7 +229,7 @@
<ul class="articles">
<li class="chapter " data-level="1.4.1" data-path="./">
<li class="chapter " data-level="1.5.1" data-path="./">
<a href="./#开发示例">
@ -229,7 +245,7 @@
</li>
<li class="chapter " data-level="1.4.2" data-path="./">
<li class="chapter " data-level="1.5.2" data-path="./">
<a href="./#处理流程">
@ -245,7 +261,7 @@
</li>
<li class="chapter " data-level="1.4.3" data-path="./">
<li class="chapter " data-level="1.5.3" data-path="./">
<a href="./#如何引用">
@ -266,7 +282,7 @@
</li>
<li class="chapter " data-level="1.5" data-path="./">
<li class="chapter " data-level="1.6" data-path="./">
<a href="./#rule接口文档">
@ -283,7 +299,7 @@
<ul class="articles">
<li class="chapter " data-level="1.5.1" data-path="./">
<li class="chapter " data-level="1.6.1" data-path="./">
<a href="./#summary">
@ -299,7 +315,7 @@
</li>
<li class="chapter " data-level="1.5.2" data-path="./">
<li class="chapter " data-level="1.6.2" data-path="./">
<a href="./#beforesendrequest">
@ -315,7 +331,7 @@
</li>
<li class="chapter " data-level="1.5.3" data-path="./">
<li class="chapter " data-level="1.6.3" data-path="./">
<a href="./#beforesendresponse">
@ -331,7 +347,7 @@
</li>
<li class="chapter " data-level="1.5.4" data-path="./">
<li class="chapter " data-level="1.6.4" data-path="./">
<a href="./#beforedealhttpsrequest">
@ -347,7 +363,7 @@
</li>
<li class="chapter " data-level="1.5.5" data-path="./">
<li class="chapter " data-level="1.6.5" data-path="./">
<a href="./#onerror">
@ -363,7 +379,7 @@
</li>
<li class="chapter " data-level="1.5.6" data-path="./">
<li class="chapter " data-level="1.6.6" data-path="./">
<a href="./#onconnecterror">
@ -384,7 +400,7 @@
</li>
<li class="chapter " data-level="1.6" data-path="./">
<li class="chapter " data-level="1.7" data-path="./">
<a href="./#rule样例">
@ -401,7 +417,7 @@
<ul class="articles">
<li class="chapter " data-level="1.6.1" data-path="./">
<li class="chapter " data-level="1.7.1" data-path="./">
<a href="./#使用本地数据">
@ -417,7 +433,7 @@
</li>
<li class="chapter " data-level="1.6.2" data-path="./">
<li class="chapter " data-level="1.7.2" data-path="./">
<a href="./#修改请求头">
@ -433,7 +449,7 @@
</li>
<li class="chapter " data-level="1.6.3" data-path="./">
<li class="chapter " data-level="1.7.3" data-path="./">
<a href="./#修改请求数据">
@ -449,7 +465,7 @@
</li>
<li class="chapter " data-level="1.6.4" data-path="./">
<li class="chapter " data-level="1.7.4" data-path="./">
<a href="./#修改请求的目标地址">
@ -465,7 +481,7 @@
</li>
<li class="chapter " data-level="1.6.5" data-path="./">
<li class="chapter " data-level="1.7.5" data-path="./">
<a href="./#修改请求协议">
@ -481,7 +497,7 @@
</li>
<li class="chapter " data-level="1.6.6" data-path="./">
<li class="chapter " data-level="1.7.6" data-path="./">
<a href="./#修改返回状态码">
@ -497,7 +513,7 @@
</li>
<li class="chapter " data-level="1.6.7" data-path="./">
<li class="chapter " data-level="1.7.7" data-path="./">
<a href="./#修改返回头">
@ -513,7 +529,7 @@
</li>
<li class="chapter " data-level="1.6.8" data-path="./">
<li class="chapter " data-level="1.7.8" data-path="./">
<a href="./#修改返回内容并延迟">
@ -534,7 +550,7 @@
</li>
<li class="chapter " data-level="1.7" data-path="./">
<li class="chapter " data-level="1.8" data-path="./">
<a href="./#证书配置">
@ -551,7 +567,7 @@
<ul class="articles">
<li class="chapter " data-level="1.7.1" data-path="./">
<li class="chapter " data-level="1.8.1" data-path="./">
<a href="./#osx系统信任ca证书">
@ -567,7 +583,7 @@
</li>
<li class="chapter " data-level="1.7.2" data-path="./">
<li class="chapter " data-level="1.8.2" data-path="./">
<a href="./#windows系统信任ca证书">
@ -583,7 +599,7 @@
</li>
<li class="chapter " data-level="1.7.3" data-path="./">
<li class="chapter " data-level="1.8.3" data-path="./">
<a href="./#配置osx系统代理">
@ -599,7 +615,7 @@
</li>
<li class="chapter " data-level="1.7.4" data-path="./">
<li class="chapter " data-level="1.8.4" data-path="./">
<a href="./#配置浏览器http代理">
@ -615,7 +631,7 @@
</li>
<li class="chapter " data-level="1.7.5" data-path="./">
<li class="chapter " data-level="1.8.5" data-path="./">
<a href="./#ios系统信任ca证书">
@ -631,7 +647,7 @@
</li>
<li class="chapter " data-level="1.7.6" data-path="./">
<li class="chapter " data-level="1.8.6" data-path="./">
<a href="./#ios--103信任ca证书">
@ -647,7 +663,7 @@
</li>
<li class="chapter " data-level="1.7.7" data-path="./">
<li class="chapter " data-level="1.8.7" data-path="./">
<a href="./#安卓系统信任ca证书">
@ -663,7 +679,7 @@
</li>
<li class="chapter " data-level="1.7.8" data-path="./">
<li class="chapter " data-level="1.8.8" data-path="./">
<a href="./#配置iosandroid系统代理">
@ -684,7 +700,7 @@
</li>
<li class="chapter " data-level="1.8" data-path="./">
<li class="chapter " data-level="1.9" data-path="./">
<a href="./#faq">
@ -946,6 +962,12 @@ anyproxy --intercept <span class="hljs-comment">#&#x542F;&#x52A8;AnyProxy&#xFF0C
<ul>
<li><a href="#&#x8BC1;&#x4E66;&#x914D;&#x7F6E;">&#x9644;&#x5F55;&#xFF1A;&#x5982;&#x4F55;&#x4FE1;&#x4EFB;CA&#x8BC1;&#x4E66;</a></li>
</ul>
<h1 id="&#x4EE3;&#x7406;websocket">&#x4EE3;&#x7406;WebSocket</h1>
<pre><code class="lang-bash">anyproxy --ws-intercept
</code></pre>
<blockquote>
<p>&#x5F53;&#x542F;&#x7528;<code>HTTPS</code>&#x4EE3;&#x7406;&#x65F6;&#xFF0C;<code>wss</code>&#x4E5F;&#x4F1A;&#x88AB;&#x4EE3;&#x7406;&#xFF0C;&#x4F46;&#x662F;&#x4E0D;&#x4F1A;&#x88AB;AnyProxy&#x8BB0;&#x5F55;&#x3002;&#x9700;&#x8981;&#x5F00;&#x542F;<code>--ws-intercept</code>&#x540E;&#x624D;&#x4F1A;&#x4ECE;&#x754C;&#x9762;&#x4E0A;&#x770B;&#x5230;&#x76F8;&#x5E94;&#x5185;&#x5BB9;&#x3002;</p>
</blockquote>
<h1 id="rule&#x6A21;&#x5757;">rule&#x6A21;&#x5757;</h1>
<p>AnyProxy&#x63D0;&#x4F9B;&#x4E86;&#x4E8C;&#x6B21;&#x5F00;&#x53D1;&#x7684;&#x80FD;&#x529B;&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x7528;js&#x7F16;&#x5199;&#x81EA;&#x5DF1;&#x7684;&#x89C4;&#x5219;&#x6A21;&#x5757;&#xFF08;rule&#xFF09;&#xFF0C;&#x6765;&#x81EA;&#x5B9A;&#x4E49;&#x7F51;&#x7EDC;&#x8BF7;&#x6C42;&#x7684;&#x5904;&#x7406;&#x903B;&#x8F91;&#x3002;</p>
<blockquote>
@ -1636,7 +1658,7 @@ newResponse.body += <span class="hljs-string">&apos;--from anyproxy--&apos;</spa
<script>
var gitbook = gitbook || [];
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":"2018-02-05T02:16:34.020Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2018-02-05T02:16:35.891Z"},"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-02-05T16:06:47.879Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2018-02-05T16:06:49.493Z"},"basePath":".","book":{"language":"cn"}});
});
</script>
</div>

File diff suppressed because one or more lines are too long

@ -200,6 +200,14 @@ anyproxy --intercept #启动AnyProxy并解析所有https请求
* [附录如何信任CA证书](#证书配置)
# 代理WebSocket
```bash
anyproxy --ws-intercept
```
> 当启用`HTTPS`代理时,`wss`也会被代理但是不会被AnyProxy记录。需要开启`--ws-intercept`后才会从界面上看到相应内容。
# rule模块
AnyProxy提供了二次开发的能力你可以用js编写自己的规则模块rule来自定义网络请求的处理逻辑。

@ -185,6 +185,22 @@
<li class="chapter " data-level="1.4" data-path="./">
<a href="./#proxy-websocket">
<div class="summary-title-span Proxy WebSocket">
Proxy WebSocket
</div>
</a>
</li>
<li class="chapter " data-level="1.5" data-path="./">
<a href="./#rule-introduction">
@ -200,7 +216,7 @@
<ul class="articles">
<li class="chapter " data-level="1.4.1" data-path="./">
<li class="chapter " data-level="1.5.1" data-path="./">
<a href="./#sample">
@ -216,7 +232,7 @@
</li>
<li class="chapter " data-level="1.4.2" data-path="./">
<li class="chapter " data-level="1.5.2" data-path="./">
<a href="./#how-does-it-work">
@ -232,7 +248,7 @@
</li>
<li class="chapter " data-level="1.4.3" data-path="./">
<li class="chapter " data-level="1.5.3" data-path="./">
<a href="./#how-to-load-rule-module">
@ -253,7 +269,7 @@
</li>
<li class="chapter " data-level="1.5" data-path="./">
<li class="chapter " data-level="1.6" data-path="./">
<a href="./#rule-module-interface">
@ -270,7 +286,7 @@
<ul class="articles">
<li class="chapter " data-level="1.5.1" data-path="./">
<li class="chapter " data-level="1.6.1" data-path="./">
<a href="./#summary">
@ -286,7 +302,7 @@
</li>
<li class="chapter " data-level="1.5.2" data-path="./">
<li class="chapter " data-level="1.6.2" data-path="./">
<a href="./#beforesendrequest">
@ -302,7 +318,7 @@
</li>
<li class="chapter " data-level="1.5.3" data-path="./">
<li class="chapter " data-level="1.6.3" data-path="./">
<a href="./#beforesendresponse">
@ -318,7 +334,7 @@
</li>
<li class="chapter " data-level="1.5.4" data-path="./">
<li class="chapter " data-level="1.6.4" data-path="./">
<a href="./#beforedealhttpsrequest">
@ -334,7 +350,7 @@
</li>
<li class="chapter " data-level="1.5.5" data-path="./">
<li class="chapter " data-level="1.6.5" data-path="./">
<a href="./#onerror">
@ -350,7 +366,7 @@
</li>
<li class="chapter " data-level="1.5.6" data-path="./">
<li class="chapter " data-level="1.6.6" data-path="./">
<a href="./#onconnecterror">
@ -371,7 +387,7 @@
</li>
<li class="chapter " data-level="1.6" data-path="./">
<li class="chapter " data-level="1.7" data-path="./">
<a href="./#rule-samples">
@ -388,7 +404,7 @@
<ul class="articles">
<li class="chapter " data-level="1.6.1" data-path="./">
<li class="chapter " data-level="1.7.1" data-path="./">
<a href="./#use-local-response">
@ -404,7 +420,7 @@
</li>
<li class="chapter " data-level="1.6.2" data-path="./">
<li class="chapter " data-level="1.7.2" data-path="./">
<a href="./#modify-request-header">
@ -420,7 +436,7 @@
</li>
<li class="chapter " data-level="1.6.3" data-path="./">
<li class="chapter " data-level="1.7.3" data-path="./">
<a href="./#modify-request-body">
@ -436,7 +452,7 @@
</li>
<li class="chapter " data-level="1.6.4" data-path="./">
<li class="chapter " data-level="1.7.4" data-path="./">
<a href="./#modify-the-request-target">
@ -452,7 +468,7 @@
</li>
<li class="chapter " data-level="1.6.5" data-path="./">
<li class="chapter " data-level="1.7.5" data-path="./">
<a href="./#modify-request-protocol">
@ -468,7 +484,7 @@
</li>
<li class="chapter " data-level="1.6.6" data-path="./">
<li class="chapter " data-level="1.7.6" data-path="./">
<a href="./#modify-response-status-code">
@ -484,7 +500,7 @@
</li>
<li class="chapter " data-level="1.6.7" data-path="./">
<li class="chapter " data-level="1.7.7" data-path="./">
<a href="./#modify-the-response-header">
@ -500,7 +516,7 @@
</li>
<li class="chapter " data-level="1.6.8" data-path="./">
<li class="chapter " data-level="1.7.8" data-path="./">
<a href="./#modify-response-data-and-delay">
@ -521,7 +537,7 @@
</li>
<li class="chapter " data-level="1.7" data-path="./">
<li class="chapter " data-level="1.8" data-path="./">
<a href="./#config-certification">
@ -538,7 +554,7 @@
<ul class="articles">
<li class="chapter " data-level="1.7.1" data-path="./">
<li class="chapter " data-level="1.8.1" data-path="./">
<a href="./#config-root-ca-in-osx">
@ -554,7 +570,7 @@
</li>
<li class="chapter " data-level="1.7.2" data-path="./">
<li class="chapter " data-level="1.8.2" data-path="./">
<a href="./#config-root-ca-in-windows">
@ -570,7 +586,7 @@
</li>
<li class="chapter " data-level="1.7.3" data-path="./">
<li class="chapter " data-level="1.8.3" data-path="./">
<a href="./#config-osx-system-proxy">
@ -586,7 +602,7 @@
</li>
<li class="chapter " data-level="1.7.4" data-path="./">
<li class="chapter " data-level="1.8.4" data-path="./">
<a href="./#config-http-proxy-server">
@ -602,7 +618,7 @@
</li>
<li class="chapter " data-level="1.7.5" data-path="./">
<li class="chapter " data-level="1.8.5" data-path="./">
<a href="./#trust-root-ca-in-ios">
@ -618,7 +634,7 @@
</li>
<li class="chapter " data-level="1.7.6" data-path="./">
<li class="chapter " data-level="1.8.6" data-path="./">
<a href="./#trust-root-ca-in-ios-after-103">
@ -634,7 +650,7 @@
</li>
<li class="chapter " data-level="1.7.7" data-path="./">
<li class="chapter " data-level="1.8.7" data-path="./">
<a href="./#trust-root-ca-in-android">
@ -650,7 +666,7 @@
</li>
<li class="chapter " data-level="1.7.8" data-path="./">
<li class="chapter " data-level="1.8.8" data-path="./">
<a href="./#config-iosandroid-proxy-server">
@ -671,7 +687,7 @@
</li>
<li class="chapter active" data-level="1.8" data-path="./">
<li class="chapter active" data-level="1.9" data-path="./">
<a href="./">
@ -932,6 +948,12 @@ anyproxy --intercept <span class="hljs-comment">#launch anyproxy and intercept a
<ul>
<li><a href="#config-certification">Appendix&#xFF1A;how to trust CA</a></li>
</ul>
<h1 id="proxy-websocket">Proxy WebSocket</h1>
<pre><code class="lang-bash">anyproxy --ws-intercept
</code></pre>
<blockquote>
<p>The <code>wss</code> requests will be handled automatically when the <code>HTTPS</code> intercept is turned on, but AnyProxy will not record the data by default. You need to specify the <code>--ws-intercept</code> to tell AnyProxy to record it.</p>
</blockquote>
<h1 id="rule-introduction">Rule Introduction</h1>
<p>AnyProxy provides the ability to load your own rules written in javascript. With rule module, you could customize the logic to handle requests.</p>
<blockquote>
@ -1624,7 +1646,7 @@ You can change the request with rule of course. For this scenario, all you need
<script>
var gitbook = gitbook || [];
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":"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-02-05T02:16:34.020Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2018-02-05T02:16:35.891Z"},"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-02-05T16:06:47.880Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2018-02-05T16:06:49.493Z"},"basePath":".","book":{"language":"en"}});
});
</script>
</div>

File diff suppressed because one or more lines are too long

@ -200,6 +200,13 @@ anyproxy --intercept #launch anyproxy and intercept all https traffic
* [Appendixhow to trust CA](#config-certification)
# Proxy WebSocket
```bash
anyproxy --ws-intercept
```
> The `wss` requests will be handled automatically when the `HTTPS` intercept is turned on, but AnyProxy will not record the data by default. You need to specify the `--ws-intercept` to tell AnyProxy to record it.
# Rule Introduction
AnyProxy provides the ability to load your own rules written in javascript. With rule module, you could customize the logic to handle requests.

File diff suppressed because one or more lines are too long