import type { TunnelId } from '../../common.js'; import { type RouteMatchOptions, type RouteMatchRule } from '../../router.js'; import type { GeoLite2 } from './geolite2.js'; import { type RuleMatch } from './rule-match.js'; export declare class Router { readonly geolite2: GeoLite2; private candidateMap; private directRules; constructor(geolite2: GeoLite2, direct: RouteMatchRule[] | undefined); register(id: TunnelId, remote: string, routeMatchOptions: RouteMatchOptions): void; unregister(id: TunnelId): void; update(id: TunnelId, routeMatchOptions: RouteMatchOptions): void; routeHost(hostname: string, port: number, resolveIP?: boolean): Promise; routeURL(url: string): Promise; private initializeRouteMatchOptions; private createMatchFunction; } export type RouteCandidate = { tunnel: TunnelId; remote: string; routeMatchOptions: InitializedRouteMatchOptions; }; type InitializedRouteMatchOptions = { include: { match: RuleMatch; negate: boolean; priority: number | undefined; }[]; exclude: { match: RuleMatch; negate: boolean; }[]; priority: number; }; export {};