import type { NextFunction } from "connect";
import type * as http from "node:http";
import { Server } from "..";
import HttpProxy from "http-proxy";
export interface ProxyOptions extends HttpProxy.ServerOptions {
    /**
     * 重写地址
     * @param path
     * @returns
     */
    rewrite?: (path: string) => string;
}
/**
 * 请求代理中间件
 */
export declare class ProxyMiddleware {
    protected devServer: Server;
    private proxies;
    constructor(devServer: Server);
    private initProxy;
    private checkProxyContextMatchUrl;
    exec(req: http.IncomingMessage, res: http.ServerResponse, next: NextFunction): void;
}
