diff --git a/package.json b/package.json index 3b3205f..92a46fb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": false, "name": "ssh-tunneling", - "version": "1.1.14", + "version": "1.1.16", "description": "a ssh-tunneling client for nodejs", "keywords": [ "ssh tunnel", diff --git a/src/index.ts b/src/index.ts index 1940485..fab1318 100644 --- a/src/index.ts +++ b/src/index.ts @@ -301,7 +301,7 @@ class SshTunnel { setTimeout(() => { // 防止大量并发请求进来时导致 channel 连接数过大,状态默认缓存 3s 后,自动销毁 this.heartbeatPromise = undefined; - }, 3000); + }, 5000); }); return this.heartbeatPromise; }; @@ -378,8 +378,8 @@ class SshTunnel { }); // pipeline(socket, stream); // pipeline(stream, socket); - // socket.pipe(stream); - // stream.pipe(socket); + socket.pipe(stream); + stream.pipe(socket); // socket.on('data', data => { // logger.orange(`local data, ${data.toString('utf8')}`) // stream.write(data);