Table of Contents

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?, CancellationTokenSource?)

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, CancellationTokenSource? externalCancellationSource = null)

Parameters

startupSetting FluxzySetting

The startup Setting

certificateProvider ICertificateProvider

A certificate provider

certificateAuthorityManager CertificateAuthorityManager

A certificate authority manager

tcpConnectionProvider ITcpConnectionProvider

A tcp connection Provider

userAgentProvider IUserAgentInfoProvider

An user Agent provider

idProvider FromIndexIdProvider

An id provider

externalCancellationSource CancellationTokenSource

An external cancellation token

Exceptions

ArgumentNullException

Proxy(FluxzySetting, ITcpConnectionProvider?)

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)

Parameters

startupSetting FluxzySetting

The startup Setting

tcpConnectionProvider ITcpConnectionProvider

The tcp connection provider, if null the default is used

Properties

SessionIdentifier

Get the unique identifier of this proxy instance.

public string SessionIdentifier { get; }

Property Value

string

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

FluxzySetting

Methods

DisposeAsync()

Release all resources used by this proxy.

public ValueTask DisposeAsync()

Returns

ValueTask

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

InvalidOperationException