mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
update doc, bugfix for certMgr
This commit is contained in:
@@ -14,12 +14,17 @@ var certDir = path.join(util.getUserHome(),"/.anyproxy_certs/"),
|
||||
cmd_genCert = path.join(cmdDir,"./gen-cer"),
|
||||
asyncTaskMgr = new asyncTask();
|
||||
|
||||
|
||||
if(!fs.existsSync(certDir)){
|
||||
fs.mkdirSync(certDir,0777);
|
||||
try{
|
||||
fs.mkdirSync(certDir,0777); //may fail in windows
|
||||
}catch(e){
|
||||
console.log("===========");
|
||||
console.log("failed to create cert dir ,please create one by yourself - " + certDir);
|
||||
console.log("this error will not block main thread unless you use https-related features in anyproxy");
|
||||
console.log("===========");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getCertificate(hostname,cb){
|
||||
var keyFile = path.join(certDir , "__hostname.key".replace(/__hostname/,hostname) ),
|
||||
crtFile = path.join(certDir , "__hostname.crt".replace(/__hostname/,hostname) );
|
||||
|
||||
Reference in New Issue
Block a user