bugfix for https server

This commit is contained in:
OttoMao 2015-03-20 11:42:54 +08:00
parent 47b769c8e2
commit bdf5e4fabb
3 changed files with 19 additions and 11 deletions

View File

@ -1,4 +1,8 @@
23 Feb 2015: anyproxy 3.2.4: 20 Mar 2015: anyproxy 3.2.5:
* bugfix for internal https server
19 Mar 2015: anyproxy 3.2.4:
* bugfix for absolute rule path * bugfix for absolute rule path

View File

@ -275,22 +275,26 @@ function connectReqHandler(req, socket, head){
internalHttpsPort, internalHttpsPort,
httpsServerMgrInstance; httpsServerMgrInstance;
async.series([ async.series([
//check if internal https server exists //check if internal https server exists
function(callback){ function(callback){
if(internalHttpsPort){ if(!shouldIntercept){
callback(); callback();
return;
}else{ }else{
getPort(function(port){ if(internalHttpsPort){
internalHttpsPort = port;
httpsServerMgrInstance = new httpsServerMgr({
port :port,
handler :userRequestHandler
});
callback(); callback();
}); }else{
getPort(function(port){
internalHttpsPort = port;
httpsServerMgrInstance = new httpsServerMgr({
port :port,
handler :userRequestHandler
});
callback();
});
}
} }
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "anyproxy", "name": "anyproxy",
"version": "3.2.4", "version": "3.2.5",
"description": "A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.", "description": "A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.",
"main": "proxy.js", "main": "proxy.js",
"bin": { "bin": {