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.

26 lines (25 loc) 1.01 kB
import type { IForwardConfig } from '../config/forwarding-types.js'; import { ForwardingHandler } from '../handlers/base-handler.js'; /** * Factory for creating forwarding handlers based on the configuration type */ export declare class ForwardingHandlerFactory { /** * Create a forwarding handler based on the configuration * @param config The forwarding configuration * @returns The appropriate forwarding handler */ static createHandler(config: IForwardConfig): ForwardingHandler; /** * Apply default values to a forwarding configuration based on its type * @param config The original forwarding configuration * @returns A configuration with defaults applied */ static applyDefaults(config: IForwardConfig): IForwardConfig; /** * Validate a forwarding configuration * @param config The configuration to validate * @throws Error if the configuration is invalid */ static validateConfig(config: IForwardConfig): void; }