mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-23 15:41:26 +00:00
Merge pull request #18 from threeday0905/bugfix/rule-option
bugfix for relative rule option
This commit is contained in:
commit
256c08fffe
6
bin.js
6
bin.js
@ -37,7 +37,7 @@ if(program.clear){
|
|||||||
var ruleFilePath = path.join(process.cwd(),program.rule);
|
var ruleFilePath = path.join(process.cwd(),program.rule);
|
||||||
try{
|
try{
|
||||||
if(fs.existsSync(ruleFilePath)){
|
if(fs.existsSync(ruleFilePath)){
|
||||||
ruleModule = require(program.rule);
|
ruleModule = require(ruleFilePath);
|
||||||
console.log("rule file loaded :" + ruleFilePath);
|
console.log("rule file loaded :" + ruleFilePath);
|
||||||
}else{
|
}else{
|
||||||
console.log(color.red("can not find rule file"));
|
console.log(color.red("can not find rule file"));
|
||||||
@ -54,7 +54,7 @@ if(program.clear){
|
|||||||
dbFile : program.file,
|
dbFile : program.file,
|
||||||
throttle : program.throttle,
|
throttle : program.throttle,
|
||||||
rule : ruleModule,
|
rule : ruleModule,
|
||||||
disableWebInterface : false,
|
disableWebInterface : false,
|
||||||
interceptHttps : program.intercept
|
interceptHttps : program.intercept
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user