Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ef060d5e79 | |||
| cd7f3f7f75 | |||
| 8df18728d4 | |||
| bedecc6b6b |
18
changelog.md
18
changelog.md
@@ -1,5 +1,23 @@
|
||||
# Changelog
|
||||
|
||||
## 2026-02-26 - 25.8.4 - fix(proxy)
|
||||
adjust default proxy timeouts and keep-alive behavior to shorter, more consistent values
|
||||
|
||||
- Increase connection timeout default from 30,000ms to 60,000ms (30s -> 60s).
|
||||
- Reduce socket timeout default from 3,600,000ms to 60,000ms (1h -> 60s).
|
||||
- Reduce max connection lifetime default from 86,400,000ms to 3,600,000ms (24h -> 1h).
|
||||
- Change inactivity timeout default from 14,400,000ms to 75,000ms (4h -> 75s).
|
||||
- Update keep-alive defaults: keepAliveTreatment 'extended' -> 'standard', keepAliveInactivityMultiplier 6 -> 4, extendedKeepAliveLifetime 604800000 -> 3,600,000ms (7d -> 1h).
|
||||
- Apply these consistent default values across Rust crates (rustproxy-config, rustproxy-passthrough) and the TypeScript smart-proxy implementation.
|
||||
- Update unit test expectations to match the new defaults.
|
||||
|
||||
## 2026-02-26 - 25.8.3 - fix(smartproxy)
|
||||
no code or dependency changes detected; no version bump required
|
||||
|
||||
- No files changed in the provided diff (No changes).
|
||||
- package.json version remains 25.8.2.
|
||||
- No dependency or source updates detected; skip release.
|
||||
|
||||
## 2026-02-26 - 25.8.2 - fix(connection)
|
||||
improve connection handling and timeouts
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@push.rocks/smartproxy",
|
||||
"version": "25.8.2",
|
||||
"version": "25.8.4",
|
||||
"private": false,
|
||||
"description": "A powerful proxy package with unified route-based configuration for high traffic management. Features include SSL/TLS support, flexible routing patterns, WebSocket handling, advanced security options, and automatic ACME certificate management.",
|
||||
"main": "dist_ts/index.js",
|
||||
|
||||
@@ -298,7 +298,7 @@ impl RustProxyOptions {
|
||||
|
||||
/// Get the effective connection timeout in milliseconds.
|
||||
pub fn effective_connection_timeout(&self) -> u64 {
|
||||
self.connection_timeout.unwrap_or(30_000)
|
||||
self.connection_timeout.unwrap_or(60_000)
|
||||
}
|
||||
|
||||
/// Get the effective initial data timeout in milliseconds.
|
||||
@@ -308,12 +308,12 @@ impl RustProxyOptions {
|
||||
|
||||
/// Get the effective socket timeout in milliseconds.
|
||||
pub fn effective_socket_timeout(&self) -> u64 {
|
||||
self.socket_timeout.unwrap_or(3_600_000)
|
||||
self.socket_timeout.unwrap_or(60_000)
|
||||
}
|
||||
|
||||
/// Get the effective max connection lifetime in milliseconds.
|
||||
pub fn effective_max_connection_lifetime(&self) -> u64 {
|
||||
self.max_connection_lifetime.unwrap_or(86_400_000)
|
||||
self.max_connection_lifetime.unwrap_or(3_600_000)
|
||||
}
|
||||
|
||||
/// Get all unique ports that routes listen on.
|
||||
@@ -377,10 +377,10 @@ mod tests {
|
||||
#[test]
|
||||
fn test_default_timeouts() {
|
||||
let options = RustProxyOptions::default();
|
||||
assert_eq!(options.effective_connection_timeout(), 30_000);
|
||||
assert_eq!(options.effective_connection_timeout(), 60_000);
|
||||
assert_eq!(options.effective_initial_data_timeout(), 60_000);
|
||||
assert_eq!(options.effective_socket_timeout(), 3_600_000);
|
||||
assert_eq!(options.effective_max_connection_lifetime(), 86_400_000);
|
||||
assert_eq!(options.effective_socket_timeout(), 60_000);
|
||||
assert_eq!(options.effective_max_connection_lifetime(), 3_600_000);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -118,10 +118,10 @@ pub struct ConnectionConfig {
|
||||
impl Default for ConnectionConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
connection_timeout_ms: 30_000,
|
||||
connection_timeout_ms: 60_000,
|
||||
initial_data_timeout_ms: 60_000,
|
||||
socket_timeout_ms: 3_600_000,
|
||||
max_connection_lifetime_ms: 86_400_000,
|
||||
socket_timeout_ms: 60_000,
|
||||
max_connection_lifetime_ms: 3_600_000,
|
||||
graceful_shutdown_timeout_ms: 30_000,
|
||||
max_connections_per_ip: None,
|
||||
connection_rate_limit_per_minute: None,
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartproxy',
|
||||
version: '25.8.2',
|
||||
version: '25.8.4',
|
||||
description: 'A powerful proxy package with unified route-based configuration for high traffic management. Features include SSL/TLS support, flexible routing patterns, WebSocket handling, advanced security options, and automatic ACME certificate management.'
|
||||
}
|
||||
|
||||
@@ -112,12 +112,12 @@ export interface ISmartProxyOptions {
|
||||
maxVersion?: string;
|
||||
|
||||
// Timeout settings
|
||||
connectionTimeout?: number; // Timeout for establishing connection to backend (ms), default: 30000 (30s)
|
||||
connectionTimeout?: number; // Timeout for establishing connection to backend (ms), default: 60000 (60s)
|
||||
initialDataTimeout?: number; // Timeout for initial data/SNI (ms), default: 60000 (60s)
|
||||
socketTimeout?: number; // Socket inactivity timeout (ms), default: 3600000 (1h)
|
||||
socketTimeout?: number; // Socket inactivity timeout (ms), default: 60000 (60s)
|
||||
inactivityCheckInterval?: number; // How often to check for inactive connections (ms), default: 60000 (60s)
|
||||
maxConnectionLifetime?: number; // Default max connection lifetime (ms), default: 86400000 (24h)
|
||||
inactivityTimeout?: number; // Inactivity timeout (ms), default: 14400000 (4h)
|
||||
maxConnectionLifetime?: number; // Max connection lifetime (ms), default: 3600000 (1h)
|
||||
inactivityTimeout?: number; // Inactivity timeout (ms), default: 75000 (75s)
|
||||
|
||||
gracefulShutdownTimeout?: number; // (ms) maximum time to wait for connections to close during shutdown
|
||||
|
||||
|
||||
@@ -47,16 +47,16 @@ export class SmartProxy extends plugins.EventEmitter {
|
||||
// Apply defaults
|
||||
this.settings = {
|
||||
...settingsArg,
|
||||
initialDataTimeout: settingsArg.initialDataTimeout || 120000,
|
||||
socketTimeout: settingsArg.socketTimeout || 3600000,
|
||||
maxConnectionLifetime: settingsArg.maxConnectionLifetime || 86400000,
|
||||
inactivityTimeout: settingsArg.inactivityTimeout || 14400000,
|
||||
gracefulShutdownTimeout: settingsArg.gracefulShutdownTimeout || 30000,
|
||||
initialDataTimeout: settingsArg.initialDataTimeout || 60_000,
|
||||
socketTimeout: settingsArg.socketTimeout || 60_000,
|
||||
maxConnectionLifetime: settingsArg.maxConnectionLifetime || 3_600_000,
|
||||
inactivityTimeout: settingsArg.inactivityTimeout || 75_000,
|
||||
gracefulShutdownTimeout: settingsArg.gracefulShutdownTimeout || 30_000,
|
||||
maxConnectionsPerIP: settingsArg.maxConnectionsPerIP || 100,
|
||||
connectionRateLimitPerMinute: settingsArg.connectionRateLimitPerMinute || 300,
|
||||
keepAliveTreatment: settingsArg.keepAliveTreatment || 'extended',
|
||||
keepAliveInactivityMultiplier: settingsArg.keepAliveInactivityMultiplier || 6,
|
||||
extendedKeepAliveLifetime: settingsArg.extendedKeepAliveLifetime || 7 * 24 * 60 * 60 * 1000,
|
||||
keepAliveTreatment: settingsArg.keepAliveTreatment || 'standard',
|
||||
keepAliveInactivityMultiplier: settingsArg.keepAliveInactivityMultiplier || 4,
|
||||
extendedKeepAliveLifetime: settingsArg.extendedKeepAliveLifetime || 3_600_000,
|
||||
};
|
||||
|
||||
// Normalize ACME options
|
||||
|
||||
Reference in New Issue
Block a user