fix(ConnectionHandler): Use the correct TLS alert data and increase the delay before socket termination when session resumption without SNI is detected.
This commit is contained in:
		| @@ -3,6 +3,6 @@ | ||||
|  */ | ||||
| export const commitinfo = { | ||||
|   name: '@push.rocks/smartproxy', | ||||
|   version: '4.1.13', | ||||
|   version: '4.1.14', | ||||
|   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.' | ||||
| } | ||||
|   | ||||
| @@ -618,7 +618,7 @@ export class ConnectionHandler { | ||||
|             try { | ||||
|               // Use cork/uncork to ensure the alert is sent as a single packet | ||||
|               socket.cork(); | ||||
|               const writeSuccessful = socket.write(certificateExpiredAlert); | ||||
|               const writeSuccessful = socket.write(serverNameUnknownAlertData); | ||||
|               socket.uncork(); | ||||
|                | ||||
|               // Function to handle the clean socket termination - but more gradually | ||||
| @@ -630,7 +630,7 @@ export class ConnectionHandler { | ||||
|                 // 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 | ||||
|                 }, 5000); // Longer delay to let socket cleanup happen naturally | ||||
|               }; | ||||
|                | ||||
|               if (writeSuccessful) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user