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.

29 lines (28 loc) 925 B
/** * Route matching utilities for SmartProxy components * * This file provides utility functions that use the unified matchers * and additional route-specific utilities. */ /** * Match domains from a route against a given domain * * @param domains Array or single domain pattern to match against * @param domain Domain to match * @returns Whether the domain matches any of the patterns */ export declare function matchRouteDomain(domains: string | string[] | undefined, domain: string | undefined): boolean; /** * Calculate route specificity score * Higher score means more specific matching criteria * * @param match Match criteria to evaluate * @returns Numeric specificity score */ export declare function calculateRouteSpecificity(match: { domains?: string | string[]; path?: string; clientIp?: string[]; tlsVersion?: string[]; headers?: Record<string, string | RegExp>; }): number;