mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-23 20:31:25 +00:00
update readme
This commit is contained in:
parent
c5058dc23d
commit
3b7140d9fd
@ -10,12 +10,10 @@ Feature
|
|||||||
|
|
||||||
Usage
|
Usage
|
||||||
--------------
|
--------------
|
||||||
### step 0 - setup env
|
|
||||||
|
|
||||||
* install [NodeJS](http://nodejs.org/)
|
|
||||||
|
|
||||||
### step 1 - install
|
### step 1 - install
|
||||||
|
|
||||||
|
* install [NodeJS](http://nodejs.org/)
|
||||||
* ``npm install -g anyproxy`` , may require ``sudo``
|
* ``npm install -g anyproxy`` , may require ``sudo``
|
||||||
|
|
||||||
### step 2 - start server
|
### step 2 - start server
|
||||||
@ -43,7 +41,8 @@ module.exports = {
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
//response to user via local logic, be called when shouldUseLocalResponse returns true
|
//you may deal the response locally instead of sending it to server
|
||||||
|
//this function be called when shouldUseLocalResponse returns true
|
||||||
//callback(statusCode,resHeader,responseData)
|
//callback(statusCode,resHeader,responseData)
|
||||||
//e.g. callback(200,{"content-type":"text/html"},"hello world")
|
//e.g. callback(200,{"content-type":"text/html"},"hello world")
|
||||||
dealLocalResponse : function(req,callback){
|
dealLocalResponse : function(req,callback){
|
||||||
|
@ -10,7 +10,8 @@ module.exports = {
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
//response to user via local logic, be called when shouldUseLocalResponse returns true
|
//you may deal the response locally instead of sending it to server
|
||||||
|
//this function be called when shouldUseLocalResponse returns true
|
||||||
//callback(statusCode,resHeader,responseData)
|
//callback(statusCode,resHeader,responseData)
|
||||||
//e.g. callback(200,{"content-type":"text/html"},"hello world")
|
//e.g. callback(200,{"content-type":"text/html"},"hello world")
|
||||||
dealLocalResponse : function(req,callback){
|
dealLocalResponse : function(req,callback){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user