Browse Source

日志调整。

pull/375/head
王良 2 months ago
parent
commit
457a3b6ae3
  1. 2
      packages/mitmproxy/src/lib/proxy/mitmproxy/createConnectHandler.js
  2. 2
      packages/mitmproxy/src/options.js

2
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)
}
}

2
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 // 所有都不拦截
}
// 配置了拦截的域名,将会被代理

Loading…
Cancel
Save