UNPKG

@push.rocks/smartproxy

Version:

A powerful proxy package with unified route-based configuration for high traffic management. Features include SSL/TLS support, flexible routing patterns, WebSocket handling, advanced security options, and automatic ACME certificate management.

37 lines (34 loc) 1 kB
/** * TLS Protocol Module * Contains generic TLS protocol knowledge including parsers, constants, and utilities */ // Export all sub-modules export * from './alerts/index.js'; export * from './sni/index.js'; export * from './utils/index.js'; // Re-export main utilities and types for convenience export { TlsUtils, TlsRecordType, TlsHandshakeType, TlsExtensionType, TlsAlertLevel, TlsAlertDescription, TlsVersion } from './utils/tls-utils.js'; export { TlsAlert } from './alerts/tls-alert.js'; export { ClientHelloParser } from './sni/client-hello-parser.js'; export { SniExtraction } from './sni/sni-extraction.js'; // Export tlsVersionToString helper export function tlsVersionToString(major: number, minor: number): string | null { if (major === 0x03) { switch (minor) { case 0x00: return 'SSLv3'; case 0x01: return 'TLSv1.0'; case 0x02: return 'TLSv1.1'; case 0x03: return 'TLSv1.2'; case 0x04: return 'TLSv1.3'; } } return null; }