mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-05-10 14:58:27 +00:00
update doc
This commit is contained in:
parent
0de0a1863e
commit
8d743e6276
22
README.md
22
README.md
@ -36,13 +36,17 @@ Usage
|
|||||||
|
|
||||||
* visit [http://127.0.0.1:8002](http://127.0.0.1:8002) with modern browsers
|
* visit [http://127.0.0.1:8002](http://127.0.0.1:8002) with modern browsers
|
||||||
|
|
||||||
How to write your own rule file
|
Rule module
|
||||||
-------------------
|
-------------------
|
||||||
* with rule file, you can modify a request at any stage, no matter it's just before sending or after servers' responding.
|
* with customized rule module, you may hack an http request at any stage, no matter it's just before sending or after servers' responding.
|
||||||
* actually ruleFile.js is a module for Nodejs, feel free to invoke your own modules.
|
* actually ruleFile.js is a module for Nodejs, feel free to invoke your own modules and logic. You may get the entire scheme via [rule__blank.js](./rule_sample/rule__blank.js).
|
||||||
* ``anyproxy --rule /path/to/ruleFile.js``
|
* to invoke your rule file: ``anyproxy --rule /path/to/ruleFile.js``
|
||||||
* you may learn how it works by our samples: ./rule_sample
|
* the following figure explains the whole procedure of an http request, and the corresponding functions in rule module
|
||||||
* samples in ./rule_sample
|
|
||||||
|

|
||||||
|
|
||||||
|
* here we also provide some samples in ./rule_sample
|
||||||
|
* sample list
|
||||||
* **[rule__blank.js](./rule_sample/rule__blank.js)**,
|
* **[rule__blank.js](./rule_sample/rule__blank.js)**,
|
||||||
* blank rule file with some comments. You may read this before writing your own rule file.
|
* blank rule file with some comments. You may read this before writing your own rule file.
|
||||||
* 空白的规则文件模板,和一些注释
|
* 空白的规则文件模板,和一些注释
|
||||||
@ -71,7 +75,7 @@ How to write your own rule file
|
|||||||
* map some requests to local file
|
* map some requests to local file
|
||||||
* 把响应映射到本地
|
* 把响应映射到本地
|
||||||
|
|
||||||
* rule file scheme is as follows, you may also get it from [rule__blank.js](./rule_sample/rule__blank.js)
|
* and here is the scheme in rule module
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
|
||||||
@ -180,10 +184,6 @@ module.exports = {
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
* the following figure explains the whole procedure of a http request
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Using https features
|
Using https features
|
||||||
----------------
|
----------------
|
||||||
#### step 1 - install openssl
|
#### step 1 - install openssl
|
||||||
|
Loading…
x
Reference in New Issue
Block a user