fix(connectionhandler): Remove unnecessary delay in TLS session ticket handling for connections without SNI
This commit is contained in:
		| @@ -1,5 +1,11 @@ | ||||
| # Changelog | ||||
|  | ||||
| ## 2025-03-18 - 4.2.3 - fix(connectionhandler) | ||||
| Remove unnecessary delay in TLS session ticket handling for connections without SNI | ||||
|  | ||||
| - Eliminated the extra setTimeout waiting period before cleaning up connections flagged as session_ticket_blocked_no_sni | ||||
| - Ensures immediate cleanup and improves connection responsiveness during TLS handshake failures | ||||
|  | ||||
| ## 2025-03-18 - 4.2.2 - fix(connectionhandler) | ||||
| Ensure proper termination of TLS connections without SNI by explicitly ending the socket after sending the unrecognized_name alert. This prevents the connection from hanging and avoids potential duplicate handling. | ||||
|  | ||||
|   | ||||
| @@ -3,6 +3,6 @@ | ||||
|  */ | ||||
| export const commitinfo = { | ||||
|   name: '@push.rocks/smartproxy', | ||||
|   version: '4.2.2', | ||||
|   version: '4.2.3', | ||||
|   description: 'A powerful proxy package that effectively handles high traffic, with features such as SSL/TLS support, port proxying, WebSocket handling, dynamic routing with authentication options, and automatic ACME certificate management.' | ||||
| } | ||||
|   | ||||
| @@ -593,13 +593,7 @@ export class ConnectionHandler { | ||||
|                | ||||
|               // Function to handle the clean socket termination - but more gradually | ||||
|               const finishConnection = () => { | ||||
|                 // Give Chrome more time to process the alert before closing | ||||
|                 // We won't call destroy() at all - just end() and let the socket close naturally | ||||
|  | ||||
|                 // Log the cleanup but wait for natural closure | ||||
|                 setTimeout(() => { | ||||
|                   this.connectionManager.cleanupConnection(record, 'session_ticket_blocked_no_sni'); | ||||
|                 }, 1000); // Longer delay to let socket cleanup happen naturally | ||||
|                 this.connectionManager.cleanupConnection(record, 'session_ticket_blocked_no_sni'); | ||||
|               }; | ||||
|                | ||||
|               if (writeSuccessful) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user