Table of Contents

Class ExchangeContext

Namespace
Fluxzy.Core
Assembly
Fluxzy.Core.dll

Holds the mutable state of the ongoing exchange

public class ExchangeContext
Inheritance
ExchangeContext
Inherited Members

Constructors

ExchangeContext(IAuthority, VariableContext, FluxzySetting?, SetUserAgentActionMapping)

public ExchangeContext(IAuthority authority, VariableContext variableContext, FluxzySetting? fluxzySetting, SetUserAgentActionMapping setUserAgentActionMapping)

Parameters

authority IAuthority
variableContext VariableContext
fluxzySetting FluxzySetting
setUserAgentActionMapping SetUserAgentActionMapping

Properties

Abort

Abort the current exchange

public bool Abort { get; set; }

Property Value

bool

AdvancedTlsSettings

Gets or sets advanced TLS settings

public AdvancedTlsSettings AdvancedTlsSettings { get; set; }

Property Value

AdvancedTlsSettings

AlwaysSendClientCertificate

public bool AlwaysSendClientCertificate { get; set; }

Property Value

bool

Authority

Remote authority, this value is used to build the host header on H11/request and :authority pseudo header on H2/request

public IAuthority Authority { get; set; }

Property Value

IAuthority

BlindMode

true if fluxzy should not decrypt this exchange

public bool BlindMode { get; set; }

Property Value

bool

BreakPointContext

Holds information about a breakpoint context.

public BreakPointContext? BreakPointContext { get; set; }

Property Value

BreakPointContext

ClientCertificates

Client certificate for this exchange

public List<Certificate>? ClientCertificates { get; set; }

Property Value

List<Certificate>

DnsOverHttpsCapture

public bool DnsOverHttpsCapture { get; set; }

Property Value

bool

DnsOverHttpsNameOrUrl

Gets or sets the dns over https name or url.

public string? DnsOverHttpsNameOrUrl { get; set; }

Property Value

string

DownStreamLocalAddressStruct

Gets or sets the down stream local IP address of the struct.

public IPAddress DownStreamLocalAddressStruct { get; set; }

Property Value

IPAddress

The down stream local IP address.

FluxzySetting

The proxy setting

public FluxzySetting? FluxzySetting { get; }

Property Value

FluxzySetting

ForceNewConnection

If true, fluxzy will not try to reuse an existing connection

public bool ForceNewConnection { get; set; }

Property Value

bool

HasRequestBody

Define if the exchange has a request body

public bool HasRequestBody { get; set; }

Property Value

bool

HasRequestBodySubstitution

True if the current exchange has at least one request body substitution

public bool HasRequestBodySubstitution { get; }

Property Value

bool

HasResponseBodySubstitution

True if the current exchange has at least one response body substitution

public bool HasResponseBodySubstitution { get; }

Property Value

bool

PreMadeResponse

Provide a premade response (a mock)

public PreMadeResponse? PreMadeResponse { get; set; }

Property Value

PreMadeResponse

ProxyConfiguration

Upstream proxy configuration

public ProxyConfiguration? ProxyConfiguration { get; set; }

Property Value

ProxyConfiguration

ProxyListenPort

Information about the proxy port that has been used to retrieve the ongoing exchange

public int ProxyListenPort { get; }

Property Value

int

ProxyTlsProtocols

Available TLS protocols, leave null to use default

public SslProtocols ProxyTlsProtocols { get; set; }

Property Value

SslProtocols

RemoteHostIp

Host IP that shall be used instead of a classic DNS resolution

public IPAddress? RemoteHostIp { get; set; }

Property Value

IPAddress

RemoteHostPort

Port of substitution

public int? RemoteHostPort { get; set; }

Property Value

int?

RequestHeaderAlterations

Gets or sets the list of header alterations for the request.

public List<HeaderAlteration> RequestHeaderAlterations { get; }

Property Value

List<HeaderAlteration>

The list of HeaderAlteration objects representing the header alterations for the request.

ResponseHeaderAlterations

Gets or sets the list of response header alterations.

public List<HeaderAlteration> ResponseHeaderAlterations { get; }

Property Value

List<HeaderAlteration>

The list of response header alterations.

Secure

If the ongoing connection to Authority should use TLS

public bool Secure { get; set; }

Property Value

bool

ServerCertificate

public X509Certificate2? ServerCertificate { get; set; }

Property Value

X509Certificate2

SetUserAgentActionMapping

public SetUserAgentActionMapping SetUserAgentActionMapping { get; }

Property Value

SetUserAgentActionMapping

SkipRemoteCertificateValidation

Don't validate the remote certificate

public bool SkipRemoteCertificateValidation { get; set; }

Property Value

bool

SslApplicationProtocols

Available ALPN protocols, leave null to use default

public List<SslApplicationProtocol>? SslApplicationProtocols { get; set; }

Property Value

List<SslApplicationProtocol>

VariableBuildingContext

Information about the ongoing exchange and connection

public VariableBuildingContext? VariableBuildingContext { get; }

Property Value

VariableBuildingContext

VariableContext

Gets the variable context associated with the current object.

public VariableContext VariableContext { get; }

Property Value

VariableContext

The variable context associated with the current object.

Remarks

The VariableContext property provides access to the variable context, which represents the scope and lifetime of variables used within the current object. The variable context stores variables as key-value pairs and allows access to their values.

Methods

RegisterRequestBodySubstitution(IStreamSubstitution)

Register a request body substitution

public void RegisterRequestBodySubstitution(IStreamSubstitution substitution)

Parameters

substitution IStreamSubstitution

RegisterResponseBodySubstitution(IStreamSubstitution)

Register a response body substitution

public void RegisterResponseBodySubstitution(IStreamSubstitution substitution)

Parameters

substitution IStreamSubstitution