Package org.microproxy
Class FullFlowContext
java.lang.Object
org.microproxy.FlowContext
org.microproxy.FullFlowContext
A
FlowContext that also knows the server side of the flow.-
Constructor Summary
ConstructorsConstructorDescriptionFullFlowContext(FlowContext clientContext, String serverHostAndPort, ChainedProxy chainedProxy, InetSocketAddress remoteAddress) Creates a server-side view of a client exchange.FullFlowContext(FlowContext clientContext, String serverHostAndPort, ChainedProxy chainedProxy, InetSocketAddress remoteAddress, Supplier<SSLSession> serverSslSession) Creates a server-side view of a client exchange that knows the TLS session with the server. -
Method Summary
Modifier and TypeMethodDescriptionReturns the upstream proxy in use, ornullfor a direct connection.Returns the client-side context this server-side view was made from.Returns the address the proxy is connected to: the server, or the chained proxy.Returns thehost:portthe client asked for.The TLS session with the server this flow's requests go to, end to end: with the origin server, whether the proxy intercepts the client's TLS or opens its own TLS connection to the server, and through a TLS chained proxy the session with the server inside the tunnel, not the one with the chained proxy.Methods inherited from class org.microproxy.FlowContext
acceptedAt, addResponseFlag, equals, failure, forwardedVia, getClientAddress, getClientDetails, getClientHello, getClientSslSession, getConnectionContext, getConnectionId, getDirectClientAddress, getHttpVersion, getLocalAddress, getProxyProtocolDestinationAddress, getStreamId, getTimingData, getTimings, hashCode, isChunkedWithContentLength, isEarlyData, isTransparentQuic, recordScriptCall, resetScriptStats, responseCodeDetails, responseFlags, responseSource, scriptStats, setResponseCodeDetails, setTimingData, socksVersion, timings, trace, upstreamStatus
-
Constructor Details
-
FullFlowContext
public FullFlowContext(FlowContext clientContext, String serverHostAndPort, ChainedProxy chainedProxy, InetSocketAddress remoteAddress) Creates a server-side view of a client exchange.- Parameters:
clientContext- the client connection or exchange contextserverHostAndPort- the requested server host and portchainedProxy- the upstream proxy in use, ornullfor direct routingremoteAddress- the connected server or upstream proxy address
-
FullFlowContext
public FullFlowContext(FlowContext clientContext, String serverHostAndPort, ChainedProxy chainedProxy, InetSocketAddress remoteAddress, Supplier<SSLSession> serverSslSession) Creates a server-side view of a client exchange that knows the TLS session with the server.- Parameters:
clientContext- the client connection or exchange contextserverHostAndPort- the requested server host and portchainedProxy- the upstream proxy in use, ornullfor direct routingremoteAddress- the connected server or upstream proxy addressserverSslSession- the supplier of the TLS session with the server, which may returnnull; asked each time, so it follows the connection in use
-
-
Method Details
-
getClientContext
Returns the client-side context this server-side view was made from.- Returns:
- the client-side context this server-side view was made from
-
getServerHostAndPort
Returns thehost:portthe client asked for.- Returns:
- the
host:portthe client asked for
-
getChainedProxy
Returns the upstream proxy in use, ornullfor a direct connection.- Returns:
- the upstream proxy in use, or
nullfor a direct connection
-
getRemoteAddress
Returns the address the proxy is connected to: the server, or the chained proxy.- Returns:
- the address the proxy is connected to: the server, or the chained proxy
-
getServerSslSession
The TLS session with the server this flow's requests go to, end to end: with the origin server, whether the proxy intercepts the client's TLS or opens its own TLS connection to the server, and through a TLS chained proxy the session with the server inside the tunnel, not the one with the chained proxy. It is the session of the connection the requests are sent on (a reused pooled connection's, or the one a retry without SNI made), and an HTTP/2 stream's is its connection's. It is already established inActivityTracker.requestSentToServer(org.microproxy.FullFlowContext, org.microproxy.http.HttpRequest).HTTP/3 (QUIC) flows have no
SSLSession: this isnullfor them.- Returns:
- the TLS session with the server this flow's requests go to, or
nullwhen the connection to it is not TLS (plain HTTP, a tunnel the proxy does not intercept) or its handshake has not completed
-