@push.rocks/smartproxy 3.20.1 → 3.21.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.
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@push.rocks/smartproxy',
6
- version: '3.20.1',
6
+ version: '3.21.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=
@@ -26,23 +26,33 @@ export interface IPortProxySettings extends plugins.tls.TlsOptions {
26
26
  to: number;
27
27
  }>;
28
28
  forwardAllGlobalRanges?: boolean;
29
+ gracefulShutdownTimeout?: number;
29
30
  }
30
31
  export declare class PortProxy {
31
32
  private netServers;
32
33
  settings: IPortProxySettings;
33
34
  private connectionRecords;
34
35
  private connectionLogger;
36
+ private isShuttingDown;
35
37
  private domainTargetIndices;
36
38
  private terminationStats;
37
39
  constructor(settingsArg: IPortProxySettings);
38
40
  private incrementTerminationStat;
39
41
  /**
40
- * Cleans up a connection record if not already cleaned up.
41
- * Destroys both incoming and outgoing sockets, clears timers, and removes the record.
42
- * Logs the cleanup event.
42
+ * Initiates the cleanup process for a connection.
43
+ * Sets the flag to prevent duplicate cleanup attempts and schedules actual cleanup.
43
44
  */
44
- private cleanupConnection;
45
+ private initiateCleanup;
46
+ /**
47
+ * Executes the actual cleanup of a connection.
48
+ * Destroys sockets, clears timers, and removes the record.
49
+ */
50
+ private executeCleanup;
45
51
  private getTargetIP;
52
+ /**
53
+ * Updates the last activity timestamp for a connection record
54
+ */
55
+ private updateActivity;
46
56
  start(): Promise<void>;
47
57
  stop(): Promise<void>;
48
58
  }