Class BowireProxyServer

Namespace
Kuestenlogik.Bowire.Proxy
Assembly
Kuestenlogik.Bowire.dll

Tier-3 intercepting proxy. Plain HTTP requests are parsed, forwarded to the upstream identified by the absolute-form request line (or by the Host header), and recorded into CapturedFlowStore. HTTPS interception (Stage B) is driven by a CONNECT-tunnel TLS termination: the proxy mints a leaf certificate for the requested host via BowireProxyCertificateAuthority, presents it on the client side of the tunnel, and then re-issues each request over real TLS to the upstream — so the captured flow has the decrypted request + response body, not opaque encrypted bytes.

public sealed class BowireProxyServer : IAsyncDisposable
Inheritance
BowireProxyServer
Implements
Inherited Members

Remarks

One TCP connection ⇒ one captured request/response pair. The server closes the client + upstream sockets after each exchange (HTTP/1.0 shape) — the simpler streaming code-path drops keep-alive parsing for v1, browsers handle that fine by re-connecting per request. CONNECT-tunnelled TLS connections handle one HTTP request per tunnel for the same reason.

Constructors

BowireProxyServer(CapturedFlowStore, int, BowireProxyCertificateAuthority?, ILoggerFactory?)

public BowireProxyServer(CapturedFlowStore store, int port, BowireProxyCertificateAuthority? ca = null, ILoggerFactory? loggerFactory = null)

Parameters

store CapturedFlowStore
port int
ca BowireProxyCertificateAuthority
loggerFactory ILoggerFactory

Properties

HttpsInterceptionEnabled

Whether HTTPS interception (CONNECT-MITM) is enabled. Driven by the CA being non-null.

public bool HttpsInterceptionEnabled { get; }

Property Value

bool

Port

The actual TCP port the proxy is listening on. 0 until StartAsync(CancellationToken) returns.

public int Port { get; }

Property Value

int

Methods

DisposeAsync()

public ValueTask DisposeAsync()

Returns

ValueTask

StartAsync(CancellationToken)

public Task StartAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task

StopAsync(CancellationToken)

public Task StopAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task