org.littleshoot.proxy.extras.SelfSignedMitmManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of littleproxy Show documentation
Show all versions of littleproxy Show documentation
LittleProxy is a high performance HTTP proxy written in Java and using the Netty networking framework.
package org.littleshoot.proxy.extras;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLSession;
import org.littleshoot.proxy.MitmManager;
/**
* {@link MitmManager} that uses self-signed certs for everything.
*/
public class SelfSignedMitmManager implements MitmManager {
SelfSignedSslEngineSource selfSignedSslEngineSource =
new SelfSignedSslEngineSource(true);
@Override
public SSLEngine serverSslEngine() {
return selfSignedSslEngineSource.newSslEngine();
}
@Override
public SSLEngine clientSslEngineFor(SSLSession serverSslSession) {
return selfSignedSslEngineSource.newSslEngine();
}
}