Class ClientReplay

java.lang.Object
org.microproxy.extras.ClientReplay

public final class ClientReplay extends Object
Sends recorded requests again, as mitmproxy's client_replay: each goes to the proxy's own listener as an ordinary client request, so every filter, addon, script, cache and recorder of the proxy applies to it, and the proxy reaches the server (over TLS for https:// URLs).

 HttpProxyServer proxy = bootstrap.start();
 ClientReplay.Result result = ClientReplay.builder(proxy.getListenAddress()).concurrency(4).build()
         .replay(RecordedExchange.load(Path.of("flows.har")));
 

Requests are sent in absolute form (GET https://host/path HTTP/1.1) with their recorded headers and body, except hop-by-hop and framing headers: Host follows the URL, Content-Length the body, and each request has a connection of its own ( Connection: close). At most ClientReplay.Builder.concurrency requests are in flight at once, and they start in recorded order. The responses are read and discarded; ClientReplay.Result has their statuses. A proxy that requires authentication refuses them with 407.