diff --git a/packages/core/test/https.verify.js b/packages/core/test/httpsVerifyTest.js similarity index 100% rename from packages/core/test/https.verify.js rename to packages/core/test/httpsVerifyTest.js diff --git a/packages/core/test/macProxy.js b/packages/core/test/macProxyTest.js similarity index 100% rename from packages/core/test/macProxy.js rename to packages/core/test/macProxyTest.js diff --git a/packages/gui/src/bridge/update/backend.js b/packages/gui/src/bridge/update/backend.js index 9fcae26..6847d08 100644 --- a/packages/gui/src/bridge/update/backend.js +++ b/packages/gui/src/bridge/update/backend.js @@ -30,7 +30,7 @@ function downloadFile (uri, filePath, onProgress, onSuccess, onError) { }) .on('error', function (err) { // Do something with err - log.error('下载升级包失败', err) + log.error('下载升级包失败:', err) onError(err) }) .on('end', function () { diff --git a/packages/mitmproxy/src/lib/proxy/mitmproxy/createRequestHandler.js b/packages/mitmproxy/src/lib/proxy/mitmproxy/createRequestHandler.js index 1ee5edc..1a25321 100644 --- a/packages/mitmproxy/src/lib/proxy/mitmproxy/createRequestHandler.js +++ b/packages/mitmproxy/src/lib/proxy/mitmproxy/createRequestHandler.js @@ -16,6 +16,7 @@ module.exports = function createRequestHandler (createIntercepts, middlewares, e let proxyReq const rOptions = commonUtil.getOptionsFromRequest(req, ssl, externalProxy, setting) + const url = `${rOptions.method} ➜ ${rOptions.protocol}//${rOptions.hostname}:${rOptions.port}${rOptions.path}` if (rOptions.agent) { rOptions.agent.options.rejectUnauthorized = setting.verifySsl @@ -108,7 +109,6 @@ module.exports = function createRequestHandler (createIntercepts, middlewares, e onFree() function onFree () { - const url = `${rOptions.method} ➜ ${rOptions.protocol}//${rOptions.hostname}:${rOptions.port}${rOptions.path}` const start = new Date() log.info('发起代理请求:', url, (rOptions.servername ? ', sni: ' + rOptions.servername : '')) @@ -225,7 +225,7 @@ module.exports = function createRequestHandler (createIntercepts, middlewares, e // }) proxyRes.on('error', (error) => { countSlow(null, 'error: ' + error.message) - log.error('proxy res error:', error) + log.error(`proxy res error: ${url}, error:`, error) }) const responseInterceptorPromise = new Promise((resolve, reject) => { @@ -331,7 +331,7 @@ module.exports = function createRequestHandler (createIntercepts, middlewares, e } // endregion - log.error('Request error:', e) + log.error(`Request error: ${url}, error:`, e) } }) }