Skip to main content

.NET

.NET is fully supported by Speedscale. Use this page for .NET-specific proxy settings, TLS trust configuration, demo guidance, and the Proxymock local workflow.

Demo App

  • Public demo: speedscale/demo (csharp directory)
  • Stack: .NET 8 minimal API
  • Local run: dotnet run
  • Quick validation: curl http://localhost:5128/health

This is the current public .NET demo used for local Proxymock examples.

Proxymock

Use this path for the fastest .NET first success on a developer workstation.

  1. 1. Install and initialize Proxymock
    brew install speedscale/tap/proxymock
    proxymock init

    Use browser sign-in by default. Use `proxymock init --api-key <your key>` only for CI or other headless environments.

  2. 2. Start recording
    git clone https://github.com/speedscale/demo
    cd demo/csharp
    proxymock record --app-port 5128 --out ./proxymock/recorded

    The app listens on port 5128 while proxymock records inbound traffic on 4143 and saves the capture in `./proxymock/recorded`.

  3. 3. Route .NET traffic through the proxy and run the app
    cd demo/csharp
    export HTTP_PROXY=http://127.0.0.1:4140
    export HTTPS_PROXY=http://127.0.0.1:4140
    dotnet run

    The HTTP_PROXY and HTTPS_PROXY variables are enough for the sample app and most .NET clients.

  4. 4. Generate one real workflow
    curl http://localhost:4143/health
    curl http://localhost:4143/weatherforecast

    Make one real pass through the demo so the recorded traffic contains a representative workflow.

  5. 5. Stop the recording, then run with mocks
    cd demo/csharp
    proxymock mock --in ./proxymock/recorded
    export HTTP_PROXY=http://127.0.0.1:4140
    export HTTPS_PROXY=http://127.0.0.1:4140
    dotnet run

    The mocked run should no longer need live downstream access.

  6. 6. Replay the same traffic against a change
    cd demo/csharp
    proxymock replay --in ./proxymock/recorded --test-against http://localhost:5128

    Use replay as the regression check before shipping .NET changes.

TLS Trust

On macOS and Linux, modern .NET usually respects SSL_CERT_FILE. See the shared Language Configuration page for the exact command and any platform-specific caveats.