diff --git a/README.md b/README.md index 4edb927..198d060 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,7 @@ Using https features #### step 2 - generate a rootCA and trust it * you should do this when it is the first time to start anyproxy -* execute ``anyproxy --root`` ,follow the instructions on screen +* execute ``sudo anyproxy --root`` ,follow the instructions on screen * **[important!]you will see some tip like *rootCA generated at : /usr/lib...* . ``cd`` to that directory, add/trust the rootCA.crt file to your system keychain. In OSX, you may do that by open the *crt file directly** #### step 3 - start a https proxy diff --git a/lib/certMgr.js b/lib/certMgr.js index 8e048b9..6142961 100644 --- a/lib/certMgr.js +++ b/lib/certMgr.js @@ -77,7 +77,7 @@ function checkRootCA(){ function generateRootCA(){ if(isRootCAFileExists()){ - console.log(color.yellow("rootCA exists at " + certDir)); + console.log(color.yellow("rootCA exists at " + cmdDir)); var rl = readline.createInterface({ input: process.stdin, output: process.stdout diff --git a/lib/requestHandler.js b/lib/requestHandler.js index 4f89f26..8371867 100644 --- a/lib/requestHandler.js +++ b/lib/requestHandler.js @@ -268,6 +268,7 @@ function connectReqHandler(req, socket, head){ callback(); } + //connect },function(callback){ try{ diff --git a/lib/rule_default.js b/lib/rule_default.js index a0c32a8..f1279d5 100644 --- a/lib/rule_default.js +++ b/lib/rule_default.js @@ -1,6 +1,6 @@ module.exports = { summary:function(){ - return "the default rule for anyproxy, which supports CORS request"; + return "the default rule for anyproxy, support : CORS / HTTPS(if root cert is ready)"; }, shouldUseLocalResponse : function(req,reqBody){ @@ -42,7 +42,7 @@ module.exports = { }, shouldInterceptHttpsReq :function(req){ - return true; + return false; } }; diff --git a/lib/util.js b/lib/util.js index ce4a315..813fafc 100644 --- a/lib/util.js +++ b/lib/util.js @@ -18,7 +18,6 @@ module.exports.merge = function(baseObj, extendObj){ return baseObj; } - module.exports.getUserHome = function(){ return process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE; } diff --git a/package.json b/package.json index f1ab57f..2759455 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "anyproxy", - "version": "2.3.4", + "version": "2.3.5", "description": "a charles/fiddler like proxy written in NodeJs, which can handle HTTPS requests and CROS perfectly.", "main": "proxy.js", "bin": {