import type { NetworkController, NetworkOptions, NetworkRoute, NetworkWebSocketInit, ResolvedNetworkOptions, ResolvedNetworkPolicy } from './types';
export declare const DEFAULT_CORS_PROXY_URL = "https://almostnode-cors-proxy.langtail.workers.dev/?url=";
export declare const NETWORK_CA_BUNDLE_PATH = "/etc/ssl/almostnode/proxy-ca-bundle.pem";
export declare const LOCAL_CORS_PROXY_PATH = "/__api/cors-proxy";
export declare const LOCAL_WS_RELAY_PATH = "/__api/ws-relay";
export declare const NETWORK_ENV_KEYS: readonly ["HTTP_PROXY", "http_proxy", "HTTPS_PROXY", "https_proxy", "NO_PROXY", "no_proxy", "SSL_CERT_FILE", "NODE_EXTRA_CA_CERTS", "REQUESTS_CA_BUNDLE", "CURL_CA_BUNDLE", "CORS_PROXY_URL"];
export declare function normalizeNetworkOptions(options?: NetworkOptions | ResolvedNetworkOptions): ResolvedNetworkOptions;
export declare function isTailnetIpv4(hostname: string): boolean;
export declare function isTailnetIpv6(hostname: string): boolean;
export declare function isTailscaleHostname(hostname: string): boolean;
export declare function isModuleResolutionHostname(hostname: string): boolean;
export declare function isLocalBrowserTarget(url: URL): boolean;
export declare function getPreferredHttpProxyUrl(proxy: Pick<ResolvedNetworkOptions['proxy'], 'httpUrl' | 'httpsUrl'>): string | null;
export declare function getPreferredHttpsProxyUrl(proxy: Pick<ResolvedNetworkOptions['proxy'], 'httpUrl' | 'httpsUrl'>): string | null;
export declare function hasConfiguredTransportProxy(options: Pick<NetworkOptions | ResolvedNetworkOptions, 'proxy'>): boolean;
export declare function resolveNetworkPolicy(options: NetworkOptions | ResolvedNetworkOptions, locationLike?: Pick<Location, 'origin'> | null): ResolvedNetworkPolicy;
export declare function shouldBypassProxy(rawUrl: string, noProxy: string | null | undefined): boolean;
export declare function selectNetworkRouteForUrl(rawUrl: string, options: NetworkOptions | ResolvedNetworkOptions, locationLike?: Pick<Location, 'origin'> | null): NetworkRoute;
export declare function selectNetworkRouteForHost(hostname: string, options: NetworkOptions | ResolvedNetworkOptions): NetworkRoute;
export declare function selectWebSocketRouteForUrl(rawUrl: string, policy: ResolvedNetworkPolicy, locationLike?: Pick<Location, 'origin'> | null): NetworkRoute;
export declare function resolveBrowserFetchTarget(rawUrl: string, policy: ResolvedNetworkPolicy, locationLike?: Pick<Location, 'origin'> | null): {
    targetUrl: string;
    proxied: boolean;
    proxyUrl: string | null;
};
export declare function getResolvedPolicy(controller: Pick<NetworkController, 'getConfig'> & Partial<Pick<NetworkController, 'getResolvedPolicy'>>, locationLike?: Pick<Location, 'origin'> | null): ResolvedNetworkPolicy;
export declare function resolveBrowserWebSocketTarget(rawUrl: string, policy: ResolvedNetworkPolicy, init?: NetworkWebSocketInit, locationLike?: Pick<Location, 'origin'> | null): {
    url: string;
    proxied: boolean;
    constructorProtocols?: string | string[];
};
//# sourceMappingURL=policy.d.ts.map