From e7732049dbcdb44211f04a53cccdd42f95f69f88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=9A=E7=84=B6?= Date: Wed, 11 Jul 2018 15:20:39 +0800 Subject: [PATCH] guide to the homepage when there are more info to visit --- lib/certMgr.js | 2 ++ lib/util.js | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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'); +};