Skip to content

Commit

Permalink
日志优化
Browse files Browse the repository at this point in the history
  • Loading branch information
wangliang181230 committed Oct 17, 2024
1 parent 9b13575 commit 909aa21
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 909aa21

Please sign in to comment.