mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
bugfix
This commit is contained in:
5
index.js
5
index.js
@@ -14,6 +14,7 @@ program
|
|||||||
.option('-t, --type [value]', 'http|https,http for default')
|
.option('-t, --type [value]', 'http|https,http for default')
|
||||||
.option('-p, --port [value]', 'proxy port, 8001 for default')
|
.option('-p, --port [value]', 'proxy port, 8001 for default')
|
||||||
.option('-c, --clear', 'clear all the tmp certificates')
|
.option('-c, --clear', 'clear all the tmp certificates')
|
||||||
|
.option('-h, --help', 'print help info')
|
||||||
.parse(process.argv);
|
.parse(process.argv);
|
||||||
|
|
||||||
var PROXY_PORT = program.port || 8001,
|
var PROXY_PORT = program.port || 8001,
|
||||||
@@ -27,6 +28,10 @@ if(program.clear){
|
|||||||
console.log("certificates cleared");
|
console.log("certificates cleared");
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}else if(program.help){
|
||||||
|
program.help();
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
var serverMgrInstance = new serverMgr(),
|
var serverMgrInstance = new serverMgr(),
|
||||||
httpProxyServer;
|
httpProxyServer;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
//TODO : move to the tmp/ dir
|
||||||
var exec = require('child_process').exec;
|
var exec = require('child_process').exec;
|
||||||
|
|
||||||
module.exports = function(hostname,callback){
|
module.exports = function(hostname,callback){
|
||||||
|
|||||||
Reference in New Issue
Block a user