diff --git a/changelog.md b/changelog.md index 10ece37..1c8c367 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,12 @@ # Changelog +## 2025-03-06 - 3.28.2 - fix(portproxy) +Adjust safe timeout defaults in PortProxy to prevent overflow issues. + +- Adjusted socketTimeout to maximum safe limit (~24.8 days) for PortProxy. +- Adjusted maxConnectionLifetime to maximum safe limit (~24.8 days) for PortProxy. +- Ensured enhanced default timeout settings in PortProxy. + ## 2025-03-06 - 3.28.1 - fix(PortProxy) Improved code formatting and readability in PortProxy class by adjusting spacing and comments. diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 95c96b3..ec3cc82 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@push.rocks/smartproxy', - version: '3.28.1', + version: '3.28.2', description: 'A powerful proxy package that effectively handles high traffic, with features such as SSL/TLS support, port proxying, WebSocket handling, and dynamic routing with authentication options.' } diff --git a/ts/classes.portproxy.ts b/ts/classes.portproxy.ts index 5b99472..9764c63 100644 --- a/ts/classes.portproxy.ts +++ b/ts/classes.portproxy.ts @@ -325,11 +325,11 @@ export class PortProxy { ...settingsArg, targetIP: settingsArg.targetIP || 'localhost', - // Timeout settings with our enhanced defaults + // Timeout settings with safe limits for Node.js initialDataTimeout: settingsArg.initialDataTimeout || 60000, // 60 seconds for initial handshake - socketTimeout: settingsArg.socketTimeout || 2592000000, // 30 days socket timeout + socketTimeout: settingsArg.socketTimeout || 2147483647, // Maximum safe value (~24.8 days) inactivityCheckInterval: settingsArg.inactivityCheckInterval || 60000, // 60 seconds interval - maxConnectionLifetime: settingsArg.maxConnectionLifetime || 2592000000, // 30 days max lifetime + maxConnectionLifetime: settingsArg.maxConnectionLifetime || 2147483647, // Maximum safe value (~24.8 days) inactivityTimeout: settingsArg.inactivityTimeout || 14400000, // 4 hours inactivity timeout gracefulShutdownTimeout: settingsArg.gracefulShutdownTimeout || 30000, // 30 seconds