/*!
 * name: nuget-server
 * version: 0.19.0
 * description: NuGet server on Node.js
 * author: Kouji Matsui (@kekyo@mi.kekyo.net)
 * license: MIT
 * repository.url: https://github.com/kekyo/nuget-server.git
 * git.commit.hash: 5b9501882b352a0490b3091210ed1740cfb81389
 */

import { Logger } from '../types';
/**
 * Generic request interface for URL resolution
 */
interface GenericRequest {
    protocol: string;
    ip?: string;
    socket: {
        remoteAddress?: string;
    };
    headers: {
        [key: string]: string | string[] | undefined;
    };
}
/**
 * Configuration for URL resolver
 */
export interface UrlResolverConfig {
    baseUrl?: string;
    trustedProxies?: string[];
}
/**
 * Result of URL resolution
 */
export interface ResolvedUrl {
    baseUrl: string;
    isFixed: boolean;
}
/**
 * Extracts path prefix from a base URL
 * @param baseUrl - Base URL to extract path from
 * @returns Path prefix (e.g., "/nuget") or empty string
 */
export declare const extractPathFromBaseUrl: (baseUrl: string | undefined) => string;
/**
 * Creates a URL resolver for handling dynamic/proxy-aware URL generation
 * @param logger - Logger
 * @param config - URL resolver configuration
 * @returns URL resolver instance
 */
export declare const createUrlResolver: (logger: Logger, config?: UrlResolverConfig) => {
    resolveUrl: (req: GenericRequest) => ResolvedUrl;
    extractPathPrefix: (req: GenericRequest) => string;
    isFixedUrl: () => boolean;
};
/**
 * Gets base URL from environment variable
 * @returns Base URL from NUGET_SERVER_BASE_URL environment variable
 */
export declare const getBaseUrlFromEnv: () => string | undefined;
/**
 * Gets trusted proxies list from environment variable
 * @returns Array of trusted proxy IPs from NUGET_SERVER_TRUSTED_PROXIES environment variable, or undefined if not set
 */
export declare const getTrustedProxiesFromEnv: () => string[] | undefined;
export {};
//# sourceMappingURL=urlResolver.d.ts.map