mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-23 20:31:25 +00:00
decwd fault__rule
This commit is contained in:
parent
946c4ee755
commit
b173e481fd
4
proxy.js
4
proxy.js
@ -3,6 +3,7 @@ try{
|
|||||||
GLOBAL.util = require('./lib/util');
|
GLOBAL.util = require('./lib/util');
|
||||||
GLOBAL.util['iconv-lite'] = require("iconv-lite");
|
GLOBAL.util['iconv-lite'] = require("iconv-lite");
|
||||||
GLOBAL.util['colorful'] = require("colorful");
|
GLOBAL.util['colorful'] = require("colorful");
|
||||||
|
GLOBAL.util['path'] = require("path");
|
||||||
}catch(e){}
|
}catch(e){}
|
||||||
|
|
||||||
var http = require('http'),
|
var http = require('http'),
|
||||||
@ -36,6 +37,9 @@ var default_rule = require('./lib/rule_default');
|
|||||||
if(fs.existsSync(path.join(util.getUserHome(),"/.anyproxy/rule_default.js"))){
|
if(fs.existsSync(path.join(util.getUserHome(),"/.anyproxy/rule_default.js"))){
|
||||||
default_rule = require(path.join(util.getUserHome(),"/.anyproxy/rule_default"));
|
default_rule = require(path.join(util.getUserHome(),"/.anyproxy/rule_default"));
|
||||||
}
|
}
|
||||||
|
if(fs.existsSync(process.cwd() + '/rule.js')){
|
||||||
|
default_rule = require(process.cwd() + '/rule');
|
||||||
|
}
|
||||||
|
|
||||||
//option
|
//option
|
||||||
//option.type : 'http'(default) or 'https'
|
//option.type : 'http'(default) or 'https'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user