Skip to content

Commit d34c9e0

Browse files
authored
Fix closeTunnel() function (#128)
1 parent 43e8c9d commit d34c9e0

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
1.0.2 / 2021-04-14
2+
==================
3+
- Bugfix: `closeTunnel()` function didn't work because of `runningServers[port].connections.forEach is not a function` error (see issue [#127](https://github.com/apify/proxy-chain/issues/127))
4+
15
1.0.1 / 2021-04-09
26
==================
37
- Bugfix: `parseUrl()` result now always includes port for `http(s)`, `ftp` and `ws(s)` (even if explicitly specified port is the default one)
@@ -34,7 +38,7 @@
3438

3539
0.4.9 / 2021-01-26
3640
===================
37-
- Bugfix: Added back the `scheme` field to result from`parseUrl()`
41+
- Bugfix: Added back the `scheme` field to result from `parseUrl()`
3842

3943
0.4.8 / 2021-01-26
4044
===================

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "proxy-chain",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Node.js implementation of a proxy server (think Squid) with support for SSL, authentication, upstream proxy chaining, and protocol tunneling.",
55
"main": "build/index.js",
66
"keywords": [

src/tcp_tunnel_tools.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function createTunnel(proxyUrl, targetHost, providedOptions = {}, callbac
3636
server.on('connection', (srcSocket) => {
3737
const port = server.address().port;
3838

39-
runningServers[port].connections = srcSocket;
39+
runningServers[port].connections.push(srcSocket);
4040
const remoteAddress = `${srcSocket.remoteAddress}:${srcSocket.remotePort}`;
4141
log('new client connection from %s', remoteAddress);
4242

0 commit comments

Comments
 (0)