/**
 * Proxy Target Resolver
 *
 * Determines whether CLIProxyAPI requests should go to local or remote
 * based on unified config. Used by stats-fetcher, auth-routes, and UI.
 */
/** Resolved proxy target for making requests */
export interface ProxyTarget {
    /** Target hostname or IP */
    host: string;
    /** Target port */
    port: number;
    /** Protocol (http/https) */
    protocol: 'http' | 'https';
    /** Optional auth token for API endpoints - only send header if defined and non-empty */
    authToken?: string;
    /** Optional management key for management API endpoints (/v0/management/*) */
    managementKey?: string;
    /** Whether HTTPS requests should allow self-signed certificates */
    allowSelfSigned?: boolean;
    /** True if targeting remote server, false if local */
    isRemote: boolean;
}
/**
 * Get the current CLIProxyAPI target based on unified config.
 * Returns remote server config if enabled, otherwise localhost.
 */
export declare function getProxyTarget(): ProxyTarget;
/**
 * Build URL for proxy endpoint
 * @param target Resolved proxy target
 * @param path Endpoint path (e.g., '/v0/management/usage')
 */
export declare function buildProxyUrl(target: ProxyTarget, path: string): string;
/**
 * Build request headers for proxy requests
 * Handles optional auth token - only adds Authorization header if token is set.
 *
 * @param target Resolved proxy target
 * @param additionalHeaders Extra headers to merge
 */
export declare function buildProxyHeaders(target: ProxyTarget, additionalHeaders?: Record<string, string>): Record<string, string>;
/**
 * Build request headers for management API endpoints (/v0/management/*).
 * For remote targets: uses management_key, falls back to authToken.
 * For local targets: uses the effective management secret from CCS config.
 *
 * @param target Resolved proxy target
 * @param additionalHeaders Extra headers to merge
 */
export declare function buildManagementHeaders(target: ProxyTarget, additionalHeaders?: Record<string, string>): Record<string, string>;
//# sourceMappingURL=proxy-target-resolver.d.ts.map