mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-24 08:41:31 +00:00
add new sample for ip binding
This commit is contained in:
parent
488e427b5b
commit
14ccda17f8
13
rule_sample/rule_assign_ip_address.js
Normal file
13
rule_sample/rule_assign_ip_address.js
Normal file
@ -0,0 +1,13 @@
|
||||
//sample : assign 127.0.0.1 to www.taobao.com
|
||||
|
||||
module.exports = {
|
||||
|
||||
replaceRequestOption : function(req,option){
|
||||
if(option.hostname == "www.taobao.com"){
|
||||
option.hostname = "127.0.0.1";
|
||||
}
|
||||
|
||||
return option;
|
||||
}
|
||||
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user