Interface MitmManager

All Known Implementing Classes:
CertificateAuthorityMitmManager

public interface MitmManager
Enables man-in-the-middle interception of CONNECT tunnels. The proxy opens its own TLS connection to the server, then completes the client's handshake with a certificate supplied here, and finally proxies the decrypted requests through the normal HttpFilters.

The proxy calls the overloads that take a FlowContext; by default they delegate to the ones without it. Override them to decide per client connection (by its authenticated user, FlowContext.getClientDetails(), or its address, FlowContext.getClientAddress()) which CA impersonates servers, how servers are validated, or which client certificate is presented to them. To keep a separate manager per tenant instead, see perConnection(java.util.function.Function<? super org.microproxy.FlowContext, ? extends org.microproxy.MitmManager>).

With HttpProxyServerBootstrap.withPoolSharedMitmConnections(boolean), a server connection made for one client may serve another. A manager that overrides serverSslContext(String, int, FlowContext) or configureServerSocket(SSLSocket, FlowContext) may make different decisions for different clients, so its server connections are kept per client connection rather than pooled; managers chosen by forConnection(org.microproxy.FlowContext) only share pooled connections with clients that were given the same manager.

See Also: