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.

47 lines (46 loc) 1.32 kB
/** * Protocol Detector V2 * * Simplified protocol detection using the new architecture */ import type { IDetectionResult, IDetectionOptions } from './models/detection-types.js'; import type { IConnectionContext } from '../protocols/common/types.js'; /** * Main protocol detector class - V2 */ export declare class ProtocolDetectorV2 { private fragmentManager; private tlsDetector; private httpDetector; constructor(); /** * Detect protocol from buffer data */ detect(buffer: Buffer, options?: IDetectionOptions): Promise<IDetectionResult>; /** * Detect protocol with connection context for fragmented data */ detectWithContext(buffer: Buffer, context: IConnectionContext, options?: IDetectionOptions): Promise<IDetectionResult>; /** * Clean up resources */ cleanup(): void; /** * Destroy detector instance */ destroy(): void; /** * Extract domain from connection info */ static extractDomain(connectionInfo: any): string | undefined; /** * Create a connection context from parameters */ static createConnectionContext(params: { sourceIp?: string; sourcePort?: number; destIp?: string; destPort?: number; socketId?: string; }): IConnectionContext; }