mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-23 15:31:26 +00:00
Merge branch 'master' of git://github.com/wuchangming/anyproxy into wuchangming-master
This commit is contained in:
commit
cb25f1eff1
@ -164,7 +164,7 @@ proxyServer.close();
|
|||||||
* 样例
|
* 样例
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const AnyProxy = require('AnyProxy');
|
const AnyProxy = require('anyproxy');
|
||||||
const exec = require('child_process').exec;
|
const exec = require('child_process').exec;
|
||||||
|
|
||||||
if (!AnyProxy.utils.certMgr.ifRootCAFileExists()) {
|
if (!AnyProxy.utils.certMgr.ifRootCAFileExists()) {
|
||||||
@ -528,8 +528,8 @@ module.exports = {
|
|||||||
anyproxy --rule rule_sample/sample_use_local_response.js
|
anyproxy --rule rule_sample/sample_use_local_response.js
|
||||||
```
|
```
|
||||||
```js
|
```js
|
||||||
/*
|
/*
|
||||||
sample:
|
sample:
|
||||||
intercept all requests toward httpbin.org, use a local response
|
intercept all requests toward httpbin.org, use a local response
|
||||||
test:
|
test:
|
||||||
curl http://httpbin.org/user-agent --proxy http://127.0.0.1:8001
|
curl http://httpbin.org/user-agent --proxy http://127.0.0.1:8001
|
||||||
@ -558,8 +558,8 @@ module.exports = {
|
|||||||
anyproxy --rule rule_sample/sample_modify_request_header.js
|
anyproxy --rule rule_sample/sample_modify_request_header.js
|
||||||
```
|
```
|
||||||
```js
|
```js
|
||||||
/*
|
/*
|
||||||
sample:
|
sample:
|
||||||
modify the user-agent in requests toward httpbin.org
|
modify the user-agent in requests toward httpbin.org
|
||||||
test:
|
test:
|
||||||
curl http://httpbin.org/user-agent --proxy http://127.0.0.1:8001
|
curl http://httpbin.org/user-agent --proxy http://127.0.0.1:8001
|
||||||
@ -647,8 +647,8 @@ module.exports = {
|
|||||||
anyproxy --rule rule_sample/sample_modify_request_protocol.js
|
anyproxy --rule rule_sample/sample_modify_request_protocol.js
|
||||||
```
|
```
|
||||||
```js
|
```js
|
||||||
/*
|
/*
|
||||||
sample:
|
sample:
|
||||||
redirect all http requests of httpbin.org to https
|
redirect all http requests of httpbin.org to https
|
||||||
test:
|
test:
|
||||||
curl 'http://httpbin.org/get?show_env=1' --proxy http://127.0.0.1:8001
|
curl 'http://httpbin.org/get?show_env=1' --proxy http://127.0.0.1:8001
|
||||||
@ -677,8 +677,8 @@ module.exports = {
|
|||||||
anyproxy --rule rule_sample/sample_modify_response_statuscode.js
|
anyproxy --rule rule_sample/sample_modify_response_statuscode.js
|
||||||
```
|
```
|
||||||
```js
|
```js
|
||||||
/*
|
/*
|
||||||
sample:
|
sample:
|
||||||
modify all status code of http://httpbin.org/ to 404
|
modify all status code of http://httpbin.org/ to 404
|
||||||
test:
|
test:
|
||||||
curl -I 'http://httpbin.org/user-agent' --proxy http://127.0.0.1:8001
|
curl -I 'http://httpbin.org/user-agent' --proxy http://127.0.0.1:8001
|
||||||
@ -706,8 +706,8 @@ module.exports = {
|
|||||||
anyproxy --rule rule_sample/sample_modify_response_header.js
|
anyproxy --rule rule_sample/sample_modify_response_header.js
|
||||||
```
|
```
|
||||||
```js
|
```js
|
||||||
/*
|
/*
|
||||||
sample:
|
sample:
|
||||||
modify response header of http://httpbin.org/user-agent
|
modify response header of http://httpbin.org/user-agent
|
||||||
test:
|
test:
|
||||||
curl -I 'http://httpbin.org/user-agent' --proxy http://127.0.0.1:8001
|
curl -I 'http://httpbin.org/user-agent' --proxy http://127.0.0.1:8001
|
||||||
@ -735,8 +735,8 @@ module.exports = {
|
|||||||
anyproxy --rule rule_sample/sample_modify_response_data.js
|
anyproxy --rule rule_sample/sample_modify_response_data.js
|
||||||
```
|
```
|
||||||
```js
|
```js
|
||||||
/*
|
/*
|
||||||
sample:
|
sample:
|
||||||
modify response data of http://httpbin.org/user-agent
|
modify response data of http://httpbin.org/user-agent
|
||||||
test:
|
test:
|
||||||
curl 'http://httpbin.org/user-agent' --proxy http://127.0.0.1:8001
|
curl 'http://httpbin.org/user-agent' --proxy http://127.0.0.1:8001
|
||||||
|
@ -164,7 +164,7 @@ proxyServer.close();
|
|||||||
* 样例
|
* 样例
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const AnyProxy = require('AnyProxy');
|
const AnyProxy = require('anyproxy');
|
||||||
const exec = require('child_process').exec;
|
const exec = require('child_process').exec;
|
||||||
|
|
||||||
if (!AnyProxy.utils.certMgr.ifRootCAFileExists()) {
|
if (!AnyProxy.utils.certMgr.ifRootCAFileExists()) {
|
||||||
|
@ -163,7 +163,7 @@ proxyServer.close();
|
|||||||
* Sample
|
* Sample
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const AnyProxy = require('AnyProxy');
|
const AnyProxy = require('anyproxy');
|
||||||
const exec = require('child_process').exec;
|
const exec = require('child_process').exec;
|
||||||
|
|
||||||
if (!AnyProxy.utils.certMgr.ifRootCAFileExists()) {
|
if (!AnyProxy.utils.certMgr.ifRootCAFileExists()) {
|
||||||
@ -521,8 +521,8 @@ module.exports = {
|
|||||||
anyproxy --rule rule_sample/sample_use_local_response.js
|
anyproxy --rule rule_sample/sample_use_local_response.js
|
||||||
```
|
```
|
||||||
```js
|
```js
|
||||||
/*
|
/*
|
||||||
sample:
|
sample:
|
||||||
intercept all requests toward httpbin.org, use a local response
|
intercept all requests toward httpbin.org, use a local response
|
||||||
test:
|
test:
|
||||||
curl http://httpbin.org/user-agent --proxy http://127.0.0.1:8001
|
curl http://httpbin.org/user-agent --proxy http://127.0.0.1:8001
|
||||||
@ -551,8 +551,8 @@ module.exports = {
|
|||||||
anyproxy --rule rule_sample/sample_modify_request_header.js
|
anyproxy --rule rule_sample/sample_modify_request_header.js
|
||||||
```
|
```
|
||||||
```js
|
```js
|
||||||
/*
|
/*
|
||||||
sample:
|
sample:
|
||||||
modify the user-agent in requests toward httpbin.org
|
modify the user-agent in requests toward httpbin.org
|
||||||
test:
|
test:
|
||||||
curl http://httpbin.org/user-agent --proxy http://127.0.0.1:8001
|
curl http://httpbin.org/user-agent --proxy http://127.0.0.1:8001
|
||||||
@ -640,8 +640,8 @@ module.exports = {
|
|||||||
anyproxy --rule rule_sample/sample_modify_request_protocol.js
|
anyproxy --rule rule_sample/sample_modify_request_protocol.js
|
||||||
```
|
```
|
||||||
```js
|
```js
|
||||||
/*
|
/*
|
||||||
sample:
|
sample:
|
||||||
redirect all http requests of httpbin.org to https
|
redirect all http requests of httpbin.org to https
|
||||||
test:
|
test:
|
||||||
curl 'http://httpbin.org/get?show_env=1' --proxy http://127.0.0.1:8001
|
curl 'http://httpbin.org/get?show_env=1' --proxy http://127.0.0.1:8001
|
||||||
@ -670,8 +670,8 @@ module.exports = {
|
|||||||
anyproxy --rule rule_sample/sample_modify_response_statuscode.js
|
anyproxy --rule rule_sample/sample_modify_response_statuscode.js
|
||||||
```
|
```
|
||||||
```js
|
```js
|
||||||
/*
|
/*
|
||||||
sample:
|
sample:
|
||||||
modify all status code of http://httpbin.org/ to 404
|
modify all status code of http://httpbin.org/ to 404
|
||||||
test:
|
test:
|
||||||
curl -I 'http://httpbin.org/user-agent' --proxy http://127.0.0.1:8001
|
curl -I 'http://httpbin.org/user-agent' --proxy http://127.0.0.1:8001
|
||||||
@ -699,8 +699,8 @@ module.exports = {
|
|||||||
anyproxy --rule rule_sample/sample_modify_response_header.js
|
anyproxy --rule rule_sample/sample_modify_response_header.js
|
||||||
```
|
```
|
||||||
```js
|
```js
|
||||||
/*
|
/*
|
||||||
sample:
|
sample:
|
||||||
modify response header of http://httpbin.org/user-agent
|
modify response header of http://httpbin.org/user-agent
|
||||||
test:
|
test:
|
||||||
curl -I 'http://httpbin.org/user-agent' --proxy http://127.0.0.1:8001
|
curl -I 'http://httpbin.org/user-agent' --proxy http://127.0.0.1:8001
|
||||||
@ -728,8 +728,8 @@ module.exports = {
|
|||||||
anyproxy --rule rule_sample/sample_modify_response_data.js
|
anyproxy --rule rule_sample/sample_modify_response_data.js
|
||||||
```
|
```
|
||||||
```js
|
```js
|
||||||
/*
|
/*
|
||||||
sample:
|
sample:
|
||||||
modify response data of http://httpbin.org/user-agent
|
modify response data of http://httpbin.org/user-agent
|
||||||
test:
|
test:
|
||||||
curl 'http://httpbin.org/user-agent' --proxy http://127.0.0.1:8001
|
curl 'http://httpbin.org/user-agent' --proxy http://127.0.0.1:8001
|
||||||
|
@ -163,7 +163,7 @@ proxyServer.close();
|
|||||||
* Sample
|
* Sample
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const AnyProxy = require('AnyProxy');
|
const AnyProxy = require('anyproxy');
|
||||||
const exec = require('child_process').exec;
|
const exec = require('child_process').exec;
|
||||||
|
|
||||||
if (!AnyProxy.utils.certMgr.ifRootCAFileExists()) {
|
if (!AnyProxy.utils.certMgr.ifRootCAFileExists()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user