@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.
34 lines (33 loc) • 1.13 kB
TypeScript
/**
* HTTP Protocol Detector
*
* Simplified HTTP detection using the new architecture
*/
import type { IProtocolDetector } from '../models/interfaces.js';
import type { IDetectionResult, IDetectionOptions } from '../models/detection-types.js';
import type { IConnectionContext } from '../../protocols/common/types.js';
import { DetectionFragmentManager } from '../utils/fragment-manager.js';
/**
* Simplified HTTP detector
*/
export declare class HttpDetector implements IProtocolDetector {
private quickDetector;
private fragmentManager;
constructor(fragmentManager?: DetectionFragmentManager);
/**
* Check if buffer can be handled by this detector
*/
canHandle(buffer: Buffer): boolean;
/**
* Get minimum bytes needed for detection
*/
getMinimumBytes(): number;
/**
* Detect HTTP protocol from buffer
*/
detect(buffer: Buffer, options?: IDetectionOptions): IDetectionResult | null;
/**
* Handle fragmented detection
*/
detectWithContext(buffer: Buffer, context: IConnectionContext, options?: IDetectionOptions): IDetectionResult | null;
}