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.

48 lines (47 loc) 1.29 kB
/** * TLS protocol detector */ import type { IProtocolDetector } from '../models/interfaces.js'; import type { IDetectionResult, IDetectionOptions } from '../models/detection-types.js'; /** * TLS detector implementation */ export declare class TlsDetector implements IProtocolDetector { /** * Minimum bytes needed to identify TLS (record header) */ private static readonly MIN_TLS_HEADER_SIZE; /** * Detect TLS protocol from buffer */ detect(buffer: Buffer, options?: IDetectionOptions): IDetectionResult | null; /** * Check if buffer can be handled by this detector */ canHandle(buffer: Buffer): boolean; /** * Get minimum bytes needed for detection */ getMinimumBytes(): number; /** * Check if buffer contains a valid TLS record */ private isTlsRecord; /** * Parse ALPN extension data */ private parseAlpnExtension; /** * Parse cipher suites */ private parseCipherSuites; /** * Detect with context for fragmented data */ detectWithContext(buffer: Buffer, _context: { sourceIp?: string; sourcePort?: number; destIp?: string; destPort?: number; }, options?: IDetectionOptions): IDetectionResult | null; }