Class Proxy
- Namespace
- Fluxzy
- Assembly
- Fluxzy.Core.dll
A proxy capture instance that can be started and disposed.
public class Proxy : IAsyncDisposable
- Inheritance
-
Proxy
- Implements
- Inherited Members
Constructors
Proxy(FluxzySetting, ICertificateProvider, CertificateAuthorityManager, ITcpConnectionProvider?, IUserAgentInfoProvider?, FromIndexIdProvider?, IDnsSolver?, CancellationTokenSource?, ProxyAuthenticationMethod?)
Create a new instance with specific providers. If a provider is not provided the default will be used.
public Proxy(FluxzySetting startupSetting, ICertificateProvider certificateProvider, CertificateAuthorityManager certificateAuthorityManager, ITcpConnectionProvider? tcpConnectionProvider = null, IUserAgentInfoProvider? userAgentProvider = null, FromIndexIdProvider? idProvider = null, IDnsSolver? dnsSolver = null, CancellationTokenSource? externalCancellationSource = null, ProxyAuthenticationMethod? proxyAuthenticationMethod = null)
Parameters
startupSettingFluxzySettingThe startup Setting
certificateProviderICertificateProviderA certificate provider
certificateAuthorityManagerCertificateAuthorityManagerA certificate authority manager
tcpConnectionProviderITcpConnectionProviderA tcp connection Provider
userAgentProviderIUserAgentInfoProviderAn user Agent provider
idProviderFromIndexIdProviderAn id provider
dnsSolverIDnsSolverAdd a custom DNS solver
externalCancellationSourceCancellationTokenSourceAn external cancellation token
proxyAuthenticationMethodProxyAuthenticationMethodUse this authentication method instead of the one provided in FluxzySetting
Exceptions
Proxy(FluxzySetting, ITcpConnectionProvider?, ProxyAuthenticationMethod?)
Create a new instance of Proxy with the provided setting. An InMemoryCertificateCache will be used as the certificate cache.
public Proxy(FluxzySetting startupSetting, ITcpConnectionProvider? tcpConnectionProvider = null, ProxyAuthenticationMethod? proxyAuthenticationMethod = null)
Parameters
startupSettingFluxzySettingThe startup Setting
tcpConnectionProviderITcpConnectionProviderThe tcp connection provider, if null the default is used
proxyAuthenticationMethodProxyAuthenticationMethodUse this authentication method instead of the one provided in FluxzySetting
Properties
EndPoints
Gets the collection of IP endpoints associated with this proxy. Returns null if the proxy is not started.
public IReadOnlyCollection<IPEndPoint>? EndPoints { get; }
Property Value
Remarks
The IP endpoints represent the network addresses that the property can be accessed on.
SessionIdentifier
Get the unique identifier of this proxy instance.
public string SessionIdentifier { get; }
Property Value
StartupSetting
Get the setting that was used to start this proxy. Altering this setting will not affect the proxy.
public FluxzySetting StartupSetting { get; }
Property Value
Writer
Get the writer that is used by this proxy.
public RealtimeArchiveWriter Writer { get; set; }
Property Value
Methods
DisposeAsync()
Release all resources used by this proxy.
public ValueTask DisposeAsync()
Returns
GetActiveRules()
Gets a read-only snapshot of currently active alteration rules. Does not include fixed rules (SSL skip, CA mount, welcome page).
public IReadOnlyCollection<Rule> GetActiveRules()
Returns
- IReadOnlyCollection<Rule>
Read-only collection of active alteration rules
Exceptions
- InvalidOperationException
If proxy not started
Run()
Start the proxy and return the end points that the proxy is listening to.
public IReadOnlyCollection<IPEndPoint> Run()
Returns
- IReadOnlyCollection<IPEndPoint>
Returns an exhaustive list of endpoints that the proxy is listen to
Exceptions
UpdateRules(Action<FluxzySetting>)
Updates the alteration rules at runtime using a configuration action. Provides a fluent API for configuring rules similar to FluxzySetting setup.
public void UpdateRules(Action<FluxzySetting> configureRules)
Parameters
configureRulesAction<FluxzySetting>Action to configure rules on a temporary FluxzySetting
Exceptions
- InvalidOperationException
If proxy not started or disposed
- ArgumentNullException
If configureRules is null
- RuleInitializationException
If rule initialization fails
UpdateRules(IEnumerable<Rule>)
Updates the alteration rules at runtime without stopping the proxy. New rules apply to exchanges that begin processing after this call completes. In-flight exchanges continue with their existing rules. Fixed rules (SSL skip, CA mount, welcome page) are automatically preserved.
public void UpdateRules(IEnumerable<Rule> rules)
Parameters
rulesIEnumerable<Rule>The new set of alteration rules
Exceptions
- InvalidOperationException
If proxy not started or disposed
- ArgumentNullException
If rules is null
- RuleInitializationException
If rule initialization fails