diff --git a/lib/certMgr.js b/lib/certMgr.js index 4ff55c7..1151fa7 100644 --- a/lib/certMgr.js +++ b/lib/certMgr.js @@ -8,7 +8,6 @@ var exec = require('child_process').exec, util = require('./util'), asyncTask = require("async-task-mgr"); -//TODO : move root cert from cmd to cert var certDir = path.join(util.getUserHome(),"/.anyproxy_certs/"), cmdDir = path.join(__dirname,"..","./cert/"), cmd_genRoot = path.join(cmdDir,"./gen-rootCA"), diff --git a/lib/rule_default.js b/lib/rule_default.js index ca811e5..9db2bcf 100644 --- a/lib/rule_default.js +++ b/lib/rule_default.js @@ -1,6 +1,12 @@ +var isRootCAFileExists = require("./certMgr.js").isRootCAFileExists(); + module.exports = { summary:function(){ - return "the default rule for anyproxy, support : CORS / HTTPS(if root cert is ready)"; + var tip = "the default rule for anyproxy, support : CORS"; + if(isRootCAFileExists){ + tip += "\nRoot CA exists, will intercept all https requests for you"; + } + return tip; }, shouldUseLocalResponse : function(req,reqBody){ @@ -41,7 +47,7 @@ module.exports = { }, shouldInterceptHttpsReq :function(req){ - return false; + return isRootCAFileExists; } }; diff --git a/package.json b/package.json index 034b4dc..897d09d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "anyproxy", - "version": "2.3.9", - "description": "a charles/fiddler like proxy written in NodeJs, which can handle HTTPS requests and CROS perfectly.", + "version": "2.4.0", + "description": "A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.", "main": "proxy.js", "bin": { "anyproxy": "bin.js"