mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-23 20:31:25 +00:00
building docs
This commit is contained in:
parent
0385096857
commit
e836269264
6
docs/.vuepress/config.js
Normal file
6
docs/.vuepress/config.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
module.exports = {
|
||||||
|
title: 'AnyProxy',
|
||||||
|
themeConfig: {
|
||||||
|
sidebar: 'auto'
|
||||||
|
}
|
||||||
|
}
|
@ -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">
|
||||||
|
|
||||||
|
|
||||||
@ -1386,14 +1386,19 @@ newResponse.body += <span class="hljs-string">'--from anyproxy--'</spa
|
|||||||
<span class="hljs-built_in">module</span>.exports = {
|
<span class="hljs-built_in">module</span>.exports = {
|
||||||
*beforeSendRequest(requestDetail) {
|
*beforeSendRequest(requestDetail) {
|
||||||
<span class="hljs-keyword">if</span> (requestDetail.url.indexOf(<span class="hljs-string">'https://httpbin.org/user-agent'</span>) === <span class="hljs-number">0</span>) {
|
<span class="hljs-keyword">if</span> (requestDetail.url.indexOf(<span class="hljs-string">'https://httpbin.org/user-agent'</span>) === <span class="hljs-number">0</span>) {
|
||||||
|
<span class="hljs-built_in">console</span>.info(requestDetail._req.connection._peername);
|
||||||
<span class="hljs-keyword">const</span> newRequestOptions = requestDetail.requestOptions;
|
<span class="hljs-keyword">const</span> newRequestOptions = requestDetail.requestOptions;
|
||||||
requestDetail.protocol = <span class="hljs-string">'http'</span>;
|
requestDetail.protocol = <span class="hljs-string">'https'</span>;
|
||||||
newRequestOptions.hostname = <span class="hljs-string">'127.0.0.1'</span>
|
newRequestOptions.hostname = <span class="hljs-string">'127.0.0.1'</span>
|
||||||
newRequestOptions.port = <span class="hljs-string">'8008'</span>;
|
newRequestOptions.port = <span class="hljs-string">'3001'</span>;
|
||||||
newRequestOptions.path = <span class="hljs-string">'/index.html'</span>;
|
newRequestOptions.path = <span class="hljs-string">'/test'</span>;
|
||||||
newRequestOptions.method = <span class="hljs-string">'GET'</span>;
|
newRequestOptions.method = <span class="hljs-string">'GET'</span>;
|
||||||
<span class="hljs-keyword">return</span> requestDetail;
|
<span class="hljs-keyword">return</span> requestDetail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="hljs-keyword">if</span> (requestDetail.url.indexOf(<span class="hljs-string">'http://mobilegw.stable.alipay.net/mgw.htm'</span>) === <span class="hljs-number">0</span>) {
|
||||||
|
<span class="hljs-built_in">console</span>.info(requestDetail.requestData.toString())
|
||||||
|
}
|
||||||
},
|
},
|
||||||
*beforeDealHttpsRequest(requestDetail) {
|
*beforeDealHttpsRequest(requestDetail) {
|
||||||
<span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
|
<span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
|
||||||
@ -1658,7 +1663,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-05T16:06:47.879Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2018-02-05T16:06:49.493Z"},"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-09-12T08:12:13.669Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-09-12T08:12:15.223Z"},"basePath":".","book":{"language":"cn"}});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
File diff suppressed because one or more lines are too long
@ -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">
|
||||||
|
|
||||||
|
|
||||||
@ -1368,14 +1368,19 @@ newResponse.body += <span class="hljs-string">'--from anyproxy--'</spa
|
|||||||
<span class="hljs-built_in">module</span>.exports = {
|
<span class="hljs-built_in">module</span>.exports = {
|
||||||
*beforeSendRequest(requestDetail) {
|
*beforeSendRequest(requestDetail) {
|
||||||
<span class="hljs-keyword">if</span> (requestDetail.url.indexOf(<span class="hljs-string">'https://httpbin.org/user-agent'</span>) === <span class="hljs-number">0</span>) {
|
<span class="hljs-keyword">if</span> (requestDetail.url.indexOf(<span class="hljs-string">'https://httpbin.org/user-agent'</span>) === <span class="hljs-number">0</span>) {
|
||||||
|
<span class="hljs-built_in">console</span>.info(requestDetail._req.connection._peername);
|
||||||
<span class="hljs-keyword">const</span> newRequestOptions = requestDetail.requestOptions;
|
<span class="hljs-keyword">const</span> newRequestOptions = requestDetail.requestOptions;
|
||||||
requestDetail.protocol = <span class="hljs-string">'http'</span>;
|
requestDetail.protocol = <span class="hljs-string">'https'</span>;
|
||||||
newRequestOptions.hostname = <span class="hljs-string">'127.0.0.1'</span>
|
newRequestOptions.hostname = <span class="hljs-string">'127.0.0.1'</span>
|
||||||
newRequestOptions.port = <span class="hljs-string">'8008'</span>;
|
newRequestOptions.port = <span class="hljs-string">'3001'</span>;
|
||||||
newRequestOptions.path = <span class="hljs-string">'/index.html'</span>;
|
newRequestOptions.path = <span class="hljs-string">'/test'</span>;
|
||||||
newRequestOptions.method = <span class="hljs-string">'GET'</span>;
|
newRequestOptions.method = <span class="hljs-string">'GET'</span>;
|
||||||
<span class="hljs-keyword">return</span> requestDetail;
|
<span class="hljs-keyword">return</span> requestDetail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="hljs-keyword">if</span> (requestDetail.url.indexOf(<span class="hljs-string">'http://mobilegw.stable.alipay.net/mgw.htm'</span>) === <span class="hljs-number">0</span>) {
|
||||||
|
<span class="hljs-built_in">console</span>.info(requestDetail.requestData.toString())
|
||||||
|
}
|
||||||
},
|
},
|
||||||
*beforeDealHttpsRequest(requestDetail) {
|
*beforeDealHttpsRequest(requestDetail) {
|
||||||
<span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
|
<span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
|
||||||
@ -1646,7 +1651,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-05T16:06:47.880Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2018-02-05T16:06:49.493Z"},"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-09-12T08:12:13.670Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-09-12T08:12:15.223Z"},"basePath":".","book":{"language":"en"}});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -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
Loading…
x
Reference in New Issue
Block a user