Skip to content

Commit

Permalink
Fix closeTunnel() function (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
OddMorning authored Apr 15, 2021
1 parent 43e8c9d commit d34c9e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.0.2 / 2021-04-14
==================
- 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))

1.0.1 / 2021-04-09
==================
- Bugfix: `parseUrl()` result now always includes port for `http(s)`, `ftp` and `ws(s)` (even if explicitly specified port is the default one)
Expand Down Expand Up @@ -34,7 +38,7 @@

0.4.9 / 2021-01-26
===================
- Bugfix: Added back the `scheme` field to result from`parseUrl()`
- Bugfix: Added back the `scheme` field to result from `parseUrl()`

0.4.8 / 2021-01-26
===================
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "proxy-chain",
"version": "1.0.1",
"version": "1.0.2",
"description": "Node.js implementation of a proxy server (think Squid) with support for SSL, authentication, upstream proxy chaining, and protocol tunneling.",
"main": "build/index.js",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/tcp_tunnel_tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function createTunnel(proxyUrl, targetHost, providedOptions = {}, callbac
server.on('connection', (srcSocket) => {
const port = server.address().port;

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

Expand Down

0 comments on commit d34c9e0

Please sign in to comment.