Compare commits

...

4 Commits

4 changed files with 17 additions and 3 deletions

View File

@ -1,5 +1,15 @@
# Changelog # Changelog
## 2025-02-26 - 3.14.2 - fix(PortProxy)
Fix cleanup timer reset for PortProxy
- Resolved an issue where the cleanup timer in the PortProxy class did not reset correctly if both incoming and outgoing data events were triggered without clearing flags.
## 2025-02-26 - 3.14.1 - fix(PortProxy)
Increased default maxConnectionLifetime for PortProxy to 600000 ms
- Updated PortProxy settings to extend default maxConnectionLifetime to 10 minutes.
## 2025-02-26 - 3.14.0 - feat(PortProxy) ## 2025-02-26 - 3.14.0 - feat(PortProxy)
Introduce max connection lifetime feature Introduce max connection lifetime feature

View File

@ -1,6 +1,6 @@
{ {
"name": "@push.rocks/smartproxy", "name": "@push.rocks/smartproxy",
"version": "3.14.0", "version": "3.14.2",
"private": false, "private": false,
"description": "A robust and versatile proxy package designed to handle high workloads, offering features like SSL redirection, port proxying, WebSocket support, and customizable routing and authentication.", "description": "A robust and versatile proxy package designed to handle high workloads, offering features like SSL redirection, port proxying, WebSocket support, and customizable routing and authentication.",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@push.rocks/smartproxy', name: '@push.rocks/smartproxy',
version: '3.14.0', version: '3.14.2',
description: 'A robust and versatile proxy package designed to handle high workloads, offering features like SSL redirection, port proxying, WebSocket support, and customizable routing and authentication.' description: 'A robust and versatile proxy package designed to handle high workloads, offering features like SSL redirection, port proxying, WebSocket support, and customizable routing and authentication.'
} }

View File

@ -108,7 +108,7 @@ export class PortProxy {
this.settings = { this.settings = {
...settingsArg, ...settingsArg,
toHost: settingsArg.toHost || 'localhost', toHost: settingsArg.toHost || 'localhost',
maxConnectionLifetime: settingsArg.maxConnectionLifetime || 10000, maxConnectionLifetime: settingsArg.maxConnectionLifetime || 600000,
}; };
} }
@ -316,12 +316,16 @@ export class PortProxy {
incomingActive = true; incomingActive = true;
if (incomingActive && outgoingActive) { if (incomingActive && outgoingActive) {
resetCleanupTimer(); resetCleanupTimer();
incomingActive = false;
outgoingActive = false;
} }
}); });
targetSocket.on('data', () => { targetSocket.on('data', () => {
outgoingActive = true; outgoingActive = true;
if (incomingActive && outgoingActive) { if (incomingActive && outgoingActive) {
resetCleanupTimer(); resetCleanupTimer();
incomingActive = false;
outgoingActive = false;
} }
}); });
} }