socks
Advanced tools
Comparing version 2.7.0 to 2.7.1
@@ -107,3 +107,2 @@ "use strict"; | ||
} | ||
let sock; | ||
// Shuffle proxies | ||
@@ -114,2 +113,3 @@ if (options.randomizeChain) { | ||
try { | ||
let sock; | ||
for (let i = 0; i < options.proxies.length; i++) { | ||
@@ -130,8 +130,6 @@ const nextProxy = options.proxies[i]; | ||
destination: nextDestination, | ||
// Initial connection ignores this as sock is undefined. Subsequent connections re-use the first proxy socket to form a chain. | ||
existing_socket: sock, | ||
}); | ||
// If sock is undefined, assign it here. | ||
if (!sock) { | ||
sock = result.socket; | ||
} | ||
sock = sock || result.socket; | ||
} | ||
@@ -138,0 +136,0 @@ if (typeof callback === 'function') { |
{ | ||
"name": "socks", | ||
"private": false, | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"description": "Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.", | ||
@@ -6,0 +6,0 @@ "main": "build/index.js", |
Sorry, the diff of this file is not supported yet
152060
1484