This commit is contained in:
加里 2014-08-09 17:11:26 +08:00
parent b63ddcf955
commit c6eb2fa892
2 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,7 @@ program
.option('-t, --type [value]', 'http|https,http for default')
.option('-p, --port [value]', 'proxy port, 8001 for default')
.option('-c, --clear', 'clear all the tmp certificates')
.option('-h, --help', 'print help info')
.parse(process.argv);
var PROXY_PORT = program.port || 8001,
@ -27,6 +28,10 @@ if(program.clear){
console.log("certificates cleared");
process.exit(0);
});
}else if(program.help){
program.help();
}else{
var serverMgrInstance = new serverMgr(),
httpProxyServer;

View File

@ -1,3 +1,4 @@
//TODO : move to the tmp/ dir
var exec = require('child_process').exec;
module.exports = function(hostname,callback){