public class SelfSignedMitmManager extends Object implements MitmManager
MitmManager
that uses self-signed certs for everything.Modifier and Type | Field and Description |
---|---|
(package private) SelfSignedSslEngineSource |
selfSignedSslEngineSource |
Constructor and Description |
---|
SelfSignedMitmManager() |
Modifier and Type | Method and Description |
---|---|
SSLEngine |
clientSslEngineFor(io.netty.handler.codec.http.HttpRequest httpRequest,
SSLSession serverSslSession)
Creates an
SSLEngine for encrypting the client connection based
on the given serverSslSession. |
SSLEngine |
serverSslEngine()
Creates an
SSLEngine for encrypting the server connection. |
SSLEngine |
serverSslEngine(String peerHost,
int peerPort)
Creates an
SSLEngine for encrypting the server connection. |
SelfSignedSslEngineSource selfSignedSslEngineSource
public SSLEngine serverSslEngine(String peerHost, int peerPort)
MitmManager
SSLEngine
for encrypting the server connection. The SSLEngine created by this method
may use the given peer information to send SNI information when connecting to the upstream host.serverSslEngine
in interface MitmManager
peerHost
- to start a client connection to the server.peerPort
- to start a client connection to the server.public SSLEngine serverSslEngine()
MitmManager
SSLEngine
for encrypting the server connection.serverSslEngine
in interface MitmManager
public SSLEngine clientSslEngineFor(io.netty.handler.codec.http.HttpRequest httpRequest, SSLSession serverSslSession)
MitmManager
Creates an SSLEngine
for encrypting the client connection based
on the given serverSslSession.
The serverSslSession is provided in case this method needs to inspect the server's certificates or something else about the encryption on the way to the server.
This is the place where one would implement impersonation of the server by issuing replacement certificates signed by the proxy's own certificate.
clientSslEngineFor
in interface MitmManager
httpRequest
- the HTTP CONNECT request that is being man-in-the-middledserverSslSession
- the SSLSession
that's been established with the serverCopyright © 2009–2018 LittleShoot. All rights reserved.