日志优化

pull/376/head
王良 1 month ago
parent 9b13575ba1
commit 909aa21d00

@ -70,10 +70,11 @@ function connect (req, cltSocket, head, hostname, port, dnsConfig = null, isDire
} }
} }
const proxySocket = net.connect(options, () => { const proxySocket = net.connect(options, () => {
if (!isDirect) log.info('Proxy connect start:', hostport)
cltSocket.write('HTTP/1.1 200 Connection Established\r\n' + cltSocket.write('HTTP/1.1 200 Connection Established\r\n' +
'Proxy-agent: dev-sidecar\r\n' + 'Proxy-agent: dev-sidecar\r\n' +
'\r\n') '\r\n')
log.info(`Proxy connect start: ${isDirect ? '直连' : ''} ${hostport}`)
proxySocket.write(head) proxySocket.write(head)
proxySocket.pipe(cltSocket) proxySocket.pipe(cltSocket)

Loading…
Cancel
Save