@applitools/eg-socks5-proxy-server
Advanced tools
Comparing version 0.2.0-debug-7 to 0.2.0-debug-8
{ | ||
"name": "@applitools/eg-socks5-proxy-server", | ||
"version": "0.2.0-debug-7", | ||
"version": "0.2.0-debug-8", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -43,7 +43,17 @@ const net = require('net') | ||
const dataTimeoutId = setTimeout(() => { | ||
const writeAcknowledgementToClient = (data) => | ||
originalSocket.write(data, () => { | ||
destination.pipe(originalSocket) | ||
originalSocket.pipe(destination) | ||
}) | ||
let doesnotGetAcknowledgement = false | ||
const acknowledgementTimeoutId = setTimeout(() => { | ||
doesnotGetAcknowledgement = true | ||
proxyServer.onDataTimeout() | ||
end(originalSocket, RFC_1928_REPLIES.NETWORK_UNREACHABLE, args) | ||
destination.destroy() | ||
}, 10000) | ||
writeAcknowledgementToClient(responseBuffer) | ||
// end(originalSocket, RFC_1928_REPLIES.NETWORK_UNREACHABLE, args) | ||
// destination.destroy() | ||
}, 5000) | ||
@@ -53,7 +63,6 @@ // first buffer after handshake | ||
destination.once('data', (data) => { | ||
originalSocket.once('data', () => clearTimeout(dataTimeoutId)) | ||
originalSocket.write(data, () => { | ||
originalSocket.pipe(destination) | ||
destination.pipe(originalSocket) | ||
}) | ||
if (doesnotGetAcknowledgement) return | ||
clearTimeout(acknowledgementTimeoutId) | ||
writeAcknowledgementToClient(data) | ||
}) | ||
@@ -60,0 +69,0 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25237
672