@applitools/eg-socks5-proxy-server
Advanced tools
Comparing version 0.2.0-debug-6 to 0.2.0-debug-7
{ | ||
"name": "@applitools/eg-socks5-proxy-server", | ||
"version": "0.2.0-debug-6", | ||
"version": "0.2.0-debug-7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -18,3 +18,2 @@ module.exports = { | ||
REMOTE_PROXY_DATA_TIMEOUT: 'remote-proxy-data-timeout', | ||
REMOTE_PROXY_ORIGIN_DATA_TIMEOUT: 'remote-proxy-origin-data-timeout', | ||
@@ -21,0 +20,0 @@ ORIGIN_SOCKET_ERROR: 'orgin-socket-error', |
@@ -36,3 +36,3 @@ const net = require('net') | ||
destination.once('data', () => { | ||
destination.once('data', (data) => { | ||
clearTimeout(handshakeTimeout) | ||
@@ -44,14 +44,12 @@ if (isTimeoutCalled) { | ||
const dataTimeoutId = setTimeout(() => proxyServer.onDataTimeout(), 5000) | ||
const dataTimeoutId2 = setTimeout(() => { | ||
//destination.destroy() | ||
const dataTimeoutId = setTimeout(() => { | ||
proxyServer.onDataTimeout() | ||
end(originalSocket, RFC_1928_REPLIES.NETWORK_UNREACHABLE, args) | ||
proxyServer.onOriginDataTimeout() | ||
}, 5000) | ||
destination.destroy() | ||
}, 10000) | ||
originalSocket.once('data', () => clearTimeout(dataTimeoutId2)) | ||
destination.once('data', () => clearTimeout(dataTimeoutId)) | ||
// first buffer after handshake | ||
destination.write(args.requestBuffer, () => { | ||
destination.once('data', (data) => { | ||
originalSocket.once('data', () => clearTimeout(dataTimeoutId)) | ||
originalSocket.write(data, () => { | ||
@@ -58,0 +56,0 @@ originalSocket.pipe(destination) |
@@ -308,10 +308,2 @@ const { | ||
} | ||
proxyServer.onOriginDataTimeout = () => { | ||
self.server.emit(EVENTS.REMOTE_PROXY_ORIGIN_DATA_TIMEOUT, { | ||
originInfo, | ||
destinationInfo, | ||
proxyInfo, | ||
}) | ||
} | ||
@@ -318,0 +310,0 @@ destination = executeRequestThroughRemoteProxy({ |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
0
24954
666