mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-05-10 14:58:27 +00:00
building docs
This commit is contained in:
parent
a5027340dc
commit
98fc3fa2ee
@ -198,6 +198,22 @@
|
|||||||
|
|
||||||
<li class="chapter " data-level="1.4" data-path="./">
|
<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模块">
|
<a href="./#rule模块">
|
||||||
|
|
||||||
|
|
||||||
@ -213,7 +229,7 @@
|
|||||||
<ul class="articles">
|
<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="./#开发示例">
|
<a href="./#开发示例">
|
||||||
|
|
||||||
@ -229,7 +245,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.4.2" data-path="./">
|
<li class="chapter " data-level="1.5.2" data-path="./">
|
||||||
|
|
||||||
<a href="./#处理流程">
|
<a href="./#处理流程">
|
||||||
|
|
||||||
@ -245,7 +261,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.4.3" data-path="./">
|
<li class="chapter " data-level="1.5.3" data-path="./">
|
||||||
|
|
||||||
<a href="./#如何引用">
|
<a href="./#如何引用">
|
||||||
|
|
||||||
@ -266,7 +282,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.5" data-path="./">
|
<li class="chapter " data-level="1.6" data-path="./">
|
||||||
|
|
||||||
<a href="./#rule接口文档">
|
<a href="./#rule接口文档">
|
||||||
|
|
||||||
@ -283,7 +299,7 @@
|
|||||||
<ul class="articles">
|
<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">
|
<a href="./#summary">
|
||||||
|
|
||||||
@ -299,7 +315,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.5.2" data-path="./">
|
<li class="chapter " data-level="1.6.2" data-path="./">
|
||||||
|
|
||||||
<a href="./#beforesendrequest">
|
<a href="./#beforesendrequest">
|
||||||
|
|
||||||
@ -315,7 +331,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.5.3" data-path="./">
|
<li class="chapter " data-level="1.6.3" data-path="./">
|
||||||
|
|
||||||
<a href="./#beforesendresponse">
|
<a href="./#beforesendresponse">
|
||||||
|
|
||||||
@ -331,7 +347,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.5.4" data-path="./">
|
<li class="chapter " data-level="1.6.4" data-path="./">
|
||||||
|
|
||||||
<a href="./#beforedealhttpsrequest">
|
<a href="./#beforedealhttpsrequest">
|
||||||
|
|
||||||
@ -347,7 +363,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.5.5" data-path="./">
|
<li class="chapter " data-level="1.6.5" data-path="./">
|
||||||
|
|
||||||
<a href="./#onerror">
|
<a href="./#onerror">
|
||||||
|
|
||||||
@ -363,7 +379,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.5.6" data-path="./">
|
<li class="chapter " data-level="1.6.6" data-path="./">
|
||||||
|
|
||||||
<a href="./#onconnecterror">
|
<a href="./#onconnecterror">
|
||||||
|
|
||||||
@ -384,7 +400,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.6" data-path="./">
|
<li class="chapter " data-level="1.7" data-path="./">
|
||||||
|
|
||||||
<a href="./#rule样例">
|
<a href="./#rule样例">
|
||||||
|
|
||||||
@ -401,7 +417,7 @@
|
|||||||
<ul class="articles">
|
<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="./#使用本地数据">
|
<a href="./#使用本地数据">
|
||||||
|
|
||||||
@ -417,7 +433,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.6.2" data-path="./">
|
<li class="chapter " data-level="1.7.2" data-path="./">
|
||||||
|
|
||||||
<a href="./#修改请求头">
|
<a href="./#修改请求头">
|
||||||
|
|
||||||
@ -433,7 +449,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.6.3" data-path="./">
|
<li class="chapter " data-level="1.7.3" data-path="./">
|
||||||
|
|
||||||
<a href="./#修改请求数据">
|
<a href="./#修改请求数据">
|
||||||
|
|
||||||
@ -449,7 +465,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.6.4" data-path="./">
|
<li class="chapter " data-level="1.7.4" data-path="./">
|
||||||
|
|
||||||
<a href="./#修改请求的目标地址">
|
<a href="./#修改请求的目标地址">
|
||||||
|
|
||||||
@ -465,7 +481,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.6.5" data-path="./">
|
<li class="chapter " data-level="1.7.5" data-path="./">
|
||||||
|
|
||||||
<a href="./#修改请求协议">
|
<a href="./#修改请求协议">
|
||||||
|
|
||||||
@ -481,7 +497,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.6.6" data-path="./">
|
<li class="chapter " data-level="1.7.6" data-path="./">
|
||||||
|
|
||||||
<a href="./#修改返回状态码">
|
<a href="./#修改返回状态码">
|
||||||
|
|
||||||
@ -497,7 +513,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.6.7" data-path="./">
|
<li class="chapter " data-level="1.7.7" data-path="./">
|
||||||
|
|
||||||
<a href="./#修改返回头">
|
<a href="./#修改返回头">
|
||||||
|
|
||||||
@ -513,7 +529,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.6.8" data-path="./">
|
<li class="chapter " data-level="1.7.8" data-path="./">
|
||||||
|
|
||||||
<a href="./#修改返回内容并延迟">
|
<a href="./#修改返回内容并延迟">
|
||||||
|
|
||||||
@ -534,7 +550,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.7" data-path="./">
|
<li class="chapter " data-level="1.8" data-path="./">
|
||||||
|
|
||||||
<a href="./#证书配置">
|
<a href="./#证书配置">
|
||||||
|
|
||||||
@ -551,7 +567,7 @@
|
|||||||
<ul class="articles">
|
<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证书">
|
<a href="./#osx系统信任ca证书">
|
||||||
|
|
||||||
@ -567,7 +583,7 @@
|
|||||||
|
|
||||||
</li>
|
</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证书">
|
<a href="./#windows系统信任ca证书">
|
||||||
|
|
||||||
@ -583,7 +599,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.7.3" data-path="./">
|
<li class="chapter " data-level="1.8.3" data-path="./">
|
||||||
|
|
||||||
<a href="./#配置osx系统代理">
|
<a href="./#配置osx系统代理">
|
||||||
|
|
||||||
@ -599,7 +615,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.7.4" data-path="./">
|
<li class="chapter " data-level="1.8.4" data-path="./">
|
||||||
|
|
||||||
<a href="./#配置浏览器http代理">
|
<a href="./#配置浏览器http代理">
|
||||||
|
|
||||||
@ -615,7 +631,7 @@
|
|||||||
|
|
||||||
</li>
|
</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证书">
|
<a href="./#ios系统信任ca证书">
|
||||||
|
|
||||||
@ -631,7 +647,7 @@
|
|||||||
|
|
||||||
</li>
|
</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证书">
|
<a href="./#ios--103信任ca证书">
|
||||||
|
|
||||||
@ -647,7 +663,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.7.7" data-path="./">
|
<li class="chapter " data-level="1.8.7" data-path="./">
|
||||||
|
|
||||||
<a href="./#安卓系统信任ca证书">
|
<a href="./#安卓系统信任ca证书">
|
||||||
|
|
||||||
@ -663,7 +679,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.7.8" data-path="./">
|
<li class="chapter " data-level="1.8.8" data-path="./">
|
||||||
|
|
||||||
<a href="./#配置iosandroid系统代理">
|
<a href="./#配置iosandroid系统代理">
|
||||||
|
|
||||||
@ -684,7 +700,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.8" data-path="./">
|
<li class="chapter " data-level="1.9" data-path="./">
|
||||||
|
|
||||||
<a href="./#faq">
|
<a href="./#faq">
|
||||||
|
|
||||||
@ -946,6 +962,12 @@ anyproxy --intercept <span class="hljs-comment">#启动AnyProxy,
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="#证书配置">附录:如何信任CA证书</a></li>
|
<li><a href="#证书配置">附录:如何信任CA证书</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<h1 id="代理websocket">代理WebSocket</h1>
|
||||||
|
<pre><code class="lang-bash">anyproxy --ws-intercept
|
||||||
|
</code></pre>
|
||||||
|
<blockquote>
|
||||||
|
<p>当启用<code>HTTPS</code>代理时,<code>wss</code>也会被代理,但是不会被AnyProxy记录。需要开启<code>--ws-intercept</code>后才会从界面上看到相应内容。</p>
|
||||||
|
</blockquote>
|
||||||
<h1 id="rule模块">rule模块</h1>
|
<h1 id="rule模块">rule模块</h1>
|
||||||
<p>AnyProxy提供了二次开发的能力,你可以用js编写自己的规则模块(rule),来自定义网络请求的处理逻辑。</p>
|
<p>AnyProxy提供了二次开发的能力,你可以用js编写自己的规则模块(rule),来自定义网络请求的处理逻辑。</p>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
@ -1636,7 +1658,7 @@ newResponse.body += <span class="hljs-string">'--from anyproxy--'</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":"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>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
File diff suppressed because one or more lines are too long
@ -200,6 +200,14 @@ anyproxy --intercept #启动AnyProxy,并解析所有https请求
|
|||||||
|
|
||||||
* [附录:如何信任CA证书](#证书配置)
|
* [附录:如何信任CA证书](#证书配置)
|
||||||
|
|
||||||
|
# 代理WebSocket
|
||||||
|
|
||||||
|
```bash
|
||||||
|
anyproxy --ws-intercept
|
||||||
|
```
|
||||||
|
|
||||||
|
> 当启用`HTTPS`代理时,`wss`也会被代理,但是不会被AnyProxy记录。需要开启`--ws-intercept`后才会从界面上看到相应内容。
|
||||||
|
|
||||||
# rule模块
|
# rule模块
|
||||||
|
|
||||||
AnyProxy提供了二次开发的能力,你可以用js编写自己的规则模块(rule),来自定义网络请求的处理逻辑。
|
AnyProxy提供了二次开发的能力,你可以用js编写自己的规则模块(rule),来自定义网络请求的处理逻辑。
|
||||||
|
@ -185,6 +185,22 @@
|
|||||||
|
|
||||||
<li class="chapter " data-level="1.4" data-path="./">
|
<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">
|
<a href="./#rule-introduction">
|
||||||
|
|
||||||
|
|
||||||
@ -200,7 +216,7 @@
|
|||||||
<ul class="articles">
|
<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">
|
<a href="./#sample">
|
||||||
|
|
||||||
@ -216,7 +232,7 @@
|
|||||||
|
|
||||||
</li>
|
</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">
|
<a href="./#how-does-it-work">
|
||||||
|
|
||||||
@ -232,7 +248,7 @@
|
|||||||
|
|
||||||
</li>
|
</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">
|
<a href="./#how-to-load-rule-module">
|
||||||
|
|
||||||
@ -253,7 +269,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.5" data-path="./">
|
<li class="chapter " data-level="1.6" data-path="./">
|
||||||
|
|
||||||
<a href="./#rule-module-interface">
|
<a href="./#rule-module-interface">
|
||||||
|
|
||||||
@ -270,7 +286,7 @@
|
|||||||
<ul class="articles">
|
<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">
|
<a href="./#summary">
|
||||||
|
|
||||||
@ -286,7 +302,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.5.2" data-path="./">
|
<li class="chapter " data-level="1.6.2" data-path="./">
|
||||||
|
|
||||||
<a href="./#beforesendrequest">
|
<a href="./#beforesendrequest">
|
||||||
|
|
||||||
@ -302,7 +318,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.5.3" data-path="./">
|
<li class="chapter " data-level="1.6.3" data-path="./">
|
||||||
|
|
||||||
<a href="./#beforesendresponse">
|
<a href="./#beforesendresponse">
|
||||||
|
|
||||||
@ -318,7 +334,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.5.4" data-path="./">
|
<li class="chapter " data-level="1.6.4" data-path="./">
|
||||||
|
|
||||||
<a href="./#beforedealhttpsrequest">
|
<a href="./#beforedealhttpsrequest">
|
||||||
|
|
||||||
@ -334,7 +350,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.5.5" data-path="./">
|
<li class="chapter " data-level="1.6.5" data-path="./">
|
||||||
|
|
||||||
<a href="./#onerror">
|
<a href="./#onerror">
|
||||||
|
|
||||||
@ -350,7 +366,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.5.6" data-path="./">
|
<li class="chapter " data-level="1.6.6" data-path="./">
|
||||||
|
|
||||||
<a href="./#onconnecterror">
|
<a href="./#onconnecterror">
|
||||||
|
|
||||||
@ -371,7 +387,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.6" data-path="./">
|
<li class="chapter " data-level="1.7" data-path="./">
|
||||||
|
|
||||||
<a href="./#rule-samples">
|
<a href="./#rule-samples">
|
||||||
|
|
||||||
@ -388,7 +404,7 @@
|
|||||||
<ul class="articles">
|
<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">
|
<a href="./#use-local-response">
|
||||||
|
|
||||||
@ -404,7 +420,7 @@
|
|||||||
|
|
||||||
</li>
|
</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">
|
<a href="./#modify-request-header">
|
||||||
|
|
||||||
@ -420,7 +436,7 @@
|
|||||||
|
|
||||||
</li>
|
</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">
|
<a href="./#modify-request-body">
|
||||||
|
|
||||||
@ -436,7 +452,7 @@
|
|||||||
|
|
||||||
</li>
|
</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">
|
<a href="./#modify-the-request-target">
|
||||||
|
|
||||||
@ -452,7 +468,7 @@
|
|||||||
|
|
||||||
</li>
|
</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">
|
<a href="./#modify-request-protocol">
|
||||||
|
|
||||||
@ -468,7 +484,7 @@
|
|||||||
|
|
||||||
</li>
|
</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">
|
<a href="./#modify-response-status-code">
|
||||||
|
|
||||||
@ -484,7 +500,7 @@
|
|||||||
|
|
||||||
</li>
|
</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">
|
<a href="./#modify-the-response-header">
|
||||||
|
|
||||||
@ -500,7 +516,7 @@
|
|||||||
|
|
||||||
</li>
|
</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">
|
<a href="./#modify-response-data-and-delay">
|
||||||
|
|
||||||
@ -521,7 +537,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter " data-level="1.7" data-path="./">
|
<li class="chapter " data-level="1.8" data-path="./">
|
||||||
|
|
||||||
<a href="./#config-certification">
|
<a href="./#config-certification">
|
||||||
|
|
||||||
@ -538,7 +554,7 @@
|
|||||||
<ul class="articles">
|
<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">
|
<a href="./#config-root-ca-in-osx">
|
||||||
|
|
||||||
@ -554,7 +570,7 @@
|
|||||||
|
|
||||||
</li>
|
</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">
|
<a href="./#config-root-ca-in-windows">
|
||||||
|
|
||||||
@ -570,7 +586,7 @@
|
|||||||
|
|
||||||
</li>
|
</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">
|
<a href="./#config-osx-system-proxy">
|
||||||
|
|
||||||
@ -586,7 +602,7 @@
|
|||||||
|
|
||||||
</li>
|
</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">
|
<a href="./#config-http-proxy-server">
|
||||||
|
|
||||||
@ -602,7 +618,7 @@
|
|||||||
|
|
||||||
</li>
|
</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">
|
<a href="./#trust-root-ca-in-ios">
|
||||||
|
|
||||||
@ -618,7 +634,7 @@
|
|||||||
|
|
||||||
</li>
|
</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">
|
<a href="./#trust-root-ca-in-ios-after-103">
|
||||||
|
|
||||||
@ -634,7 +650,7 @@
|
|||||||
|
|
||||||
</li>
|
</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">
|
<a href="./#trust-root-ca-in-android">
|
||||||
|
|
||||||
@ -650,7 +666,7 @@
|
|||||||
|
|
||||||
</li>
|
</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">
|
<a href="./#config-iosandroid-proxy-server">
|
||||||
|
|
||||||
@ -671,7 +687,7 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="chapter active" data-level="1.8" data-path="./">
|
<li class="chapter active" data-level="1.9" data-path="./">
|
||||||
|
|
||||||
<a href="./">
|
<a href="./">
|
||||||
|
|
||||||
@ -932,6 +948,12 @@ anyproxy --intercept <span class="hljs-comment">#launch anyproxy and intercept a
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="#config-certification">Appendix:how to trust CA</a></li>
|
<li><a href="#config-certification">Appendix:how to trust CA</a></li>
|
||||||
</ul>
|
</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>
|
<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>
|
<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>
|
<blockquote>
|
||||||
@ -1624,7 +1646,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":"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>
|
</script>
|
||||||
</div>
|
</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
|
|||||||
|
|
||||||
* [Appendix:how to trust CA](#config-certification)
|
* [Appendix:how 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
|
# 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.
|
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
Loading…
x
Reference in New Issue
Block a user