Class TunnelConnectSessionEventArgs
A class that wraps the state when a tunnel connect event happen for Explicit endpoints.
Implements
Inherited Members
Namespace: Titanium.Web.Proxy.EventArguments
Assembly: Titanium.Web.Proxy.dll
Syntax
public class TunnelConnectSessionEventArgs : SessionEventArgsBase, IDisposable
Properties
| Edit this page View SourceAllowHttpProtocolTranslation
Whether the proxy may bridge a mismatch between the client's negotiated HTTP version and the
origin's HTTP version implied by UpstreamHttpProtocol. Defaults to false, in
which case Http11 instead simply never offers "h2" to the
client (so no mismatch, and no translation, is ever needed) and Http2
fails the connection outright if the client does not also support HTTP/2.
Declaration
public bool AllowHttpProtocolTranslation { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
ClientTlsTiming
Timing of the client-facing (browser-to-proxy) TLS handshake performed while decrypting this tunnel, populated only when EnableRequestTimingCapture is enabled and DecryptSsl is true; null otherwise (including for a plain, non-HTTPS CONNECT tunnel that is never TLS-decrypted at all).
Declaration
public ClientTlsTiming? ClientTlsTiming { get; }
Property Value
| Type | Description |
|---|---|
| ClientTlsTiming |
ConnectTiming
CONNECT-phase milestones (certificate readiness, origin capability resolution, HTTP/2 probe, browser TLS) populated only when EnableRequestTimingCapture is enabled and DecryptSsl is true; otherwise null.
Declaration
public TunnelConnectTiming? ConnectTiming { get; }
Property Value
| Type | Description |
|---|---|
| TunnelConnectTiming |
DecryptSsl
Should we decrypt the Ssl or relay it to server? Default is true.
Declaration
public bool DecryptSsl { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
DenyConnect
When set to true it denies the connect request with a Forbidden status.
Declaration
public bool DenyConnect { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
EstablishServerConnectionBeforeResponse
When true, the proxy establishes the upstream TCP connection (and upstream-proxy CONNECT when configured) before writing HTTP 200 to the client. On failure, BeforeTunnelConnectFailure can supply a custom HTTP error response (the client never receives 200 / never starts TLS). Default is false — no preconnect and no added latency. Set this during BeforeTunnelConnectRequest.
Declaration
public bool EstablishServerConnectionBeforeResponse { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsHttpsConnect
Is this a connect request to secure HTTP server? Or is it to some other protocol.
Declaration
public bool IsHttpsConnect { get; }
Property Value
| Type | Description |
|---|---|
| bool |
UpstreamHttpProtocol
Controls which HTTP version the proxy uses on its own connection to the origin server for this
tunnel, independent of the HTTP version the client itself negotiates with the proxy. Must be set
during BeforeTunnelConnectRequest - it is read before the client TLS handshake, and the
client's own ALPN offer/negotiation cannot change afterward. See UpstreamHttpProtocol.
Declaration
public UpstreamHttpProtocol UpstreamHttpProtocol { get; set; }
Property Value
| Type | Description |
|---|---|
| UpstreamHttpProtocol |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | The value is not a defined UpstreamHttpProtocol member. |
Events
| Edit this page View SourceDecryptedDataReceived
Fired when decrypted data is received within this session from client/server.
Declaration
public event EventHandler<DataEventArgs>? DecryptedDataReceived
Event Type
| Type | Description |
|---|---|
| EventHandler<DataEventArgs> |
DecryptedDataSent
Fired when decrypted data is sent within this session to server/client.
Declaration
public event EventHandler<DataEventArgs>? DecryptedDataSent
Event Type
| Type | Description |
|---|---|
| EventHandler<DataEventArgs> |