From 909aa21d0092bd1cae6ee5e6683e68fd0c82d10d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Thu, 17 Oct 2024 18:05:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mitmproxy/src/lib/proxy/mitmproxy/createConnectHandler.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/mitmproxy/src/lib/proxy/mitmproxy/createConnectHandler.js b/packages/mitmproxy/src/lib/proxy/mitmproxy/createConnectHandler.js index 45c3e44..78198eb 100644 --- a/packages/mitmproxy/src/lib/proxy/mitmproxy/createConnectHandler.js +++ b/packages/mitmproxy/src/lib/proxy/mitmproxy/createConnectHandler.js @@ -70,10 +70,11 @@ function connect (req, cltSocket, head, hostname, port, dnsConfig = null, isDire } } const proxySocket = net.connect(options, () => { + if (!isDirect) log.info('Proxy connect start:', hostport) + cltSocket.write('HTTP/1.1 200 Connection Established\r\n' + 'Proxy-agent: dev-sidecar\r\n' + '\r\n') - log.info(`Proxy connect start: ${isDirect ? '直连' : ''} ${hostport}`) proxySocket.write(head) proxySocket.pipe(cltSocket)