@push.rocks/smartproxy 3.32.1 → 3.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/classes.portproxy.d.ts +16 -42
- package/dist_ts/classes.portproxy.js +138 -1424
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.portproxy.ts +282 -1920
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@push.rocks/smartproxy',
|
|
6
|
-
version: '3.32.
|
|
6
|
+
version: '3.32.2',
|
|
7
7
|
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.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLDRMQUE0TDtDQUMxTSxDQUFBIn0=
|
|
@@ -14,12 +14,7 @@ export interface IDomainConfig {
|
|
|
14
14
|
useNetworkProxy?: boolean;
|
|
15
15
|
networkProxyIndex?: number;
|
|
16
16
|
}
|
|
17
|
-
/**
|
|
18
|
-
* Port proxy settings including global allowed port ranges
|
|
19
|
-
*
|
|
20
|
-
* NOTE: In version 3.31.0+, timeout settings have been simplified and hardcoded with sensible defaults
|
|
21
|
-
* to ensure TLS certificate safety in all deployment scenarios, especially chained proxies.
|
|
22
|
-
*/
|
|
17
|
+
/** Port proxy settings including global allowed port ranges */
|
|
23
18
|
export interface IPortProxySettings extends plugins.tls.TlsOptions {
|
|
24
19
|
fromPort: number;
|
|
25
20
|
toPort: number;
|
|
@@ -29,6 +24,11 @@ export interface IPortProxySettings extends plugins.tls.TlsOptions {
|
|
|
29
24
|
defaultAllowedIPs?: string[];
|
|
30
25
|
defaultBlockedIPs?: string[];
|
|
31
26
|
preserveSourceIP?: boolean;
|
|
27
|
+
initialDataTimeout?: number;
|
|
28
|
+
socketTimeout?: number;
|
|
29
|
+
inactivityCheckInterval?: number;
|
|
30
|
+
maxConnectionLifetime?: number;
|
|
31
|
+
inactivityTimeout?: number;
|
|
32
32
|
gracefulShutdownTimeout?: number;
|
|
33
33
|
globalPortRanges: Array<{
|
|
34
34
|
from: number;
|
|
@@ -39,36 +39,21 @@ export interface IPortProxySettings extends plugins.tls.TlsOptions {
|
|
|
39
39
|
keepAlive?: boolean;
|
|
40
40
|
keepAliveInitialDelay?: number;
|
|
41
41
|
maxPendingDataSize?: number;
|
|
42
|
+
disableInactivityCheck?: boolean;
|
|
43
|
+
enableKeepAliveProbes?: boolean;
|
|
42
44
|
enableDetailedLogging?: boolean;
|
|
43
45
|
enableTlsDebugLogging?: boolean;
|
|
44
46
|
enableRandomizedTimeouts?: boolean;
|
|
45
47
|
maxConnectionsPerIP?: number;
|
|
46
48
|
connectionRateLimitPerMinute?: number;
|
|
49
|
+
keepAliveTreatment?: 'standard' | 'extended' | 'immortal';
|
|
50
|
+
keepAliveInactivityMultiplier?: number;
|
|
51
|
+
extendedKeepAliveLifetime?: number;
|
|
47
52
|
networkProxies?: NetworkProxy[];
|
|
48
|
-
isChainedProxy?: boolean;
|
|
49
|
-
chainPosition?: 'first' | 'middle' | 'last';
|
|
50
|
-
aggressiveTlsRefresh?: boolean;
|
|
51
|
-
tlsSessionCache?: {
|
|
52
|
-
enabled?: boolean;
|
|
53
|
-
maxEntries?: number;
|
|
54
|
-
expiryTime?: number;
|
|
55
|
-
cleanupInterval?: number;
|
|
56
|
-
};
|
|
57
53
|
}
|
|
58
54
|
export declare class PortProxy {
|
|
59
55
|
private netServers;
|
|
60
|
-
settings: IPortProxySettings
|
|
61
|
-
initialDataTimeout: number;
|
|
62
|
-
socketTimeout: number;
|
|
63
|
-
inactivityCheckInterval: number;
|
|
64
|
-
maxConnectionLifetime: number;
|
|
65
|
-
inactivityTimeout: number;
|
|
66
|
-
disableInactivityCheck: boolean;
|
|
67
|
-
enableKeepAliveProbes: boolean;
|
|
68
|
-
keepAliveTreatment: 'standard' | 'extended' | 'immortal';
|
|
69
|
-
keepAliveInactivityMultiplier: number;
|
|
70
|
-
extendedKeepAliveLifetime: number;
|
|
71
|
-
};
|
|
56
|
+
settings: IPortProxySettings;
|
|
72
57
|
private connectionRecords;
|
|
73
58
|
private connectionLogger;
|
|
74
59
|
private isShuttingDown;
|
|
@@ -113,21 +98,6 @@ export declare class PortProxy {
|
|
|
113
98
|
* Track connection termination statistic
|
|
114
99
|
*/
|
|
115
100
|
private incrementTerminationStat;
|
|
116
|
-
/**
|
|
117
|
-
* Update connection activity timestamp with enhanced sleep detection
|
|
118
|
-
* Improved for chained proxy scenarios and more aggressive handling of stale connections
|
|
119
|
-
*/
|
|
120
|
-
private updateActivity;
|
|
121
|
-
/**
|
|
122
|
-
* Perform deep TLS state refresh after sleep detection
|
|
123
|
-
* More aggressive than the standard refresh, specifically designed for
|
|
124
|
-
* recovering connections after system sleep in chained proxy setups
|
|
125
|
-
*/
|
|
126
|
-
private performDeepTlsRefresh;
|
|
127
|
-
/**
|
|
128
|
-
* Legacy refresh method for backward compatibility
|
|
129
|
-
*/
|
|
130
|
-
private refreshTlsStateAfterSleep;
|
|
131
101
|
/**
|
|
132
102
|
* Cleans up a connection record.
|
|
133
103
|
* Destroys both incoming and outgoing sockets, clears timers, and removes the record.
|
|
@@ -135,6 +105,10 @@ export declare class PortProxy {
|
|
|
135
105
|
* @param reason - Optional reason for cleanup (for logging)
|
|
136
106
|
*/
|
|
137
107
|
private cleanupConnection;
|
|
108
|
+
/**
|
|
109
|
+
* Update connection activity timestamp
|
|
110
|
+
*/
|
|
111
|
+
private updateActivity;
|
|
138
112
|
/**
|
|
139
113
|
* Get target IP with round-robin support
|
|
140
114
|
*/
|