/**
 * TLS module for smartproxy
 * Re-exports protocol components and provides smartproxy-specific functionality
 */

// Re-export all protocol components from protocols/tls
export * from '../protocols/tls/index.js';

// Export smartproxy-specific SNI handler
export * from './sni/sni-handler.js';

// Create a namespace for SNI utilities
import { SniHandler } from './sni/sni-handler.js';
import { SniExtraction } from '../protocols/tls/sni/sni-extraction.js';
import { ClientHelloParser } from '../protocols/tls/sni/client-hello-parser.js';

// Export utility objects for convenience
export const SNI = {
  // Main handler class (for backward compatibility)
  Handler: SniHandler,

  // Utility classes
  Extraction: SniExtraction,
  Parser: ClientHelloParser,

  // Convenience functions
  extractSNI: SniHandler.extractSNI,
  processTlsPacket: SniHandler.processTlsPacket,
};