@push.rocks/smartproxy 3.33.0 → 3.34.0
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 +7 -18
- package/dist_ts/classes.portproxy.js +271 -264
- package/dist_ts/classes.router.d.ts +22 -0
- package/dist_ts/classes.router.js +70 -2
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.portproxy.ts +360 -383
- package/ts/classes.router.ts +82 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@push.rocks/smartproxy',
|
|
6
|
-
version: '3.
|
|
6
|
+
version: '3.34.0',
|
|
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=
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as plugins from './plugins.js';
|
|
2
|
-
import { NetworkProxy } from './classes.networkproxy.js';
|
|
3
2
|
/** Domain configuration with per-domain allowed port ranges */
|
|
4
3
|
export interface IDomainConfig {
|
|
5
4
|
domains: string[];
|
|
@@ -11,8 +10,6 @@ export interface IDomainConfig {
|
|
|
11
10
|
to: number;
|
|
12
11
|
}>;
|
|
13
12
|
connectionTimeout?: number;
|
|
14
|
-
useNetworkProxy?: boolean;
|
|
15
|
-
networkProxyIndex?: number;
|
|
16
13
|
}
|
|
17
14
|
/** Port proxy settings including global allowed port ranges */
|
|
18
15
|
export interface IPortProxySettings extends plugins.tls.TlsOptions {
|
|
@@ -49,10 +46,8 @@ export interface IPortProxySettings extends plugins.tls.TlsOptions {
|
|
|
49
46
|
keepAliveTreatment?: 'standard' | 'extended' | 'immortal';
|
|
50
47
|
keepAliveInactivityMultiplier?: number;
|
|
51
48
|
extendedKeepAliveLifetime?: number;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
allowRenegotiationWithDifferentSNI?: boolean;
|
|
55
|
-
relatedDomainPatterns?: string[][];
|
|
49
|
+
useNetworkProxy?: number[];
|
|
50
|
+
networkProxyPort?: number;
|
|
56
51
|
}
|
|
57
52
|
export declare class PortProxy {
|
|
58
53
|
private netServers;
|
|
@@ -64,16 +59,18 @@ export declare class PortProxy {
|
|
|
64
59
|
private terminationStats;
|
|
65
60
|
private connectionsByIP;
|
|
66
61
|
private connectionRateByIP;
|
|
67
|
-
private
|
|
62
|
+
private networkProxy;
|
|
68
63
|
constructor(settingsArg: IPortProxySettings);
|
|
64
|
+
/**
|
|
65
|
+
* Initialize NetworkProxy instance
|
|
66
|
+
*/
|
|
67
|
+
private initializeNetworkProxy;
|
|
69
68
|
/**
|
|
70
69
|
* Forwards a TLS connection to a NetworkProxy for handling
|
|
71
70
|
* @param connectionId - Unique connection identifier
|
|
72
71
|
* @param socket - The incoming client socket
|
|
73
72
|
* @param record - The connection record
|
|
74
|
-
* @param domainConfig - The domain configuration
|
|
75
73
|
* @param initialData - Initial data chunk (TLS ClientHello)
|
|
76
|
-
* @param serverName - SNI hostname (if available)
|
|
77
74
|
*/
|
|
78
75
|
private forwardToNetworkProxy;
|
|
79
76
|
/**
|
|
@@ -132,14 +129,6 @@ export declare class PortProxy {
|
|
|
132
129
|
* Main method to start the proxy
|
|
133
130
|
*/
|
|
134
131
|
start(): Promise<void>;
|
|
135
|
-
/**
|
|
136
|
-
* Add or replace NetworkProxy instances
|
|
137
|
-
*/
|
|
138
|
-
setNetworkProxies(networkProxies: NetworkProxy[]): void;
|
|
139
|
-
/**
|
|
140
|
-
* Get a list of configured NetworkProxy instances
|
|
141
|
-
*/
|
|
142
|
-
getNetworkProxies(): NetworkProxy[];
|
|
143
132
|
/**
|
|
144
133
|
* Gracefully shut down the proxy
|
|
145
134
|
*/
|