From 457a3b6ae3927a067134c600ad9e8ff68036b161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Sat, 28 Sep 2024 22:03:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=B0=83=E6=95=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mitmproxy/src/lib/proxy/mitmproxy/createConnectHandler.js | 2 +- packages/mitmproxy/src/options.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mitmproxy/src/lib/proxy/mitmproxy/createConnectHandler.js b/packages/mitmproxy/src/lib/proxy/mitmproxy/createConnectHandler.js index 469256c..65eb838 100644 --- a/packages/mitmproxy/src/lib/proxy/mitmproxy/createConnectHandler.js +++ b/packages/mitmproxy/src/lib/proxy/mitmproxy/createConnectHandler.js @@ -41,7 +41,7 @@ module.exports = function createConnectHandler (sslConnectInterceptor, middlewar log.error(`----- fakeServer getServerPromise error: ${hostname}:${port}, error:`, e) }) } else { - log.info(`未匹配到任何 sslConnectInterceptors,不拦截请求,直接连接目标服务器: ${hostname}:${port}`) + log.info(`未匹配到任何 sslConnectInterceptors,不拦截请求,直接连接目标服务器: ${hostname}:${port}, headers:`, req.headers) connect(req, cltSocket, head, hostname, port, dnsConfig) } } diff --git a/packages/mitmproxy/src/options.js b/packages/mitmproxy/src/options.js index 602873d..5ed6c40 100644 --- a/packages/mitmproxy/src/options.js +++ b/packages/mitmproxy/src/options.js @@ -103,7 +103,7 @@ module.exports = (serverConfig) => { const hostname = req.url.split(':')[0] const inWhiteList = matchUtil.matchHostname(whiteList, hostname, 'in whiteList') != null if (inWhiteList) { - log.info('为白名单域名,不拦截:', hostname) + log.info(`为白名单域名,不拦截: ${hostname}, headers:`, req.headers) return false // 所有都不拦截 } // 配置了拦截的域名,将会被代理