diff --git a/lib/certMgr.js b/lib/certMgr.js index 2bca293..1136ad8 100644 --- a/lib/certMgr.js +++ b/lib/certMgr.js @@ -85,9 +85,11 @@ crtMgr.trustRootCA = function *() { } else { console.error(result); logUtil.info('Failed to trust the root CA, please trust it manually'); + util.guideToHomePage(); } } else { logUtil.info('Please trust the root CA manually so https interception works'); + util.guideToHomePage(); } } diff --git a/lib/util.js b/lib/util.js index 54332c5..0d6a78c 100644 --- a/lib/util.js +++ b/lib/util.js @@ -216,7 +216,7 @@ function deleteFolderContentsRecursive(dirPath, ifClearFolderItself) { throw new Error('can_not_delete_this_dir'); } - console.info('==>>> delete cache ', dirPath); + logUtil.info('==>>> clearing cache ', dirPath); if (fs.existsSync(dirPath)) { fs.readdirSync(dirPath).forEach((file) => { @@ -324,3 +324,7 @@ module.exports.execScriptSync = function (cmd) { status }; }; + +module.exports.guideToHomePage = function () { + logUtil.info('Refer to http://anyproxy.io for more detail'); +};