MintPlayer.Spark.Webhooks.GitHub.DevTunnel 10.0.0-preview.39

This is a prerelease version of MintPlayer.Spark.Webhooks.GitHub.DevTunnel.
dotnet add package MintPlayer.Spark.Webhooks.GitHub.DevTunnel --version 10.0.0-preview.39
                    
NuGet\Install-Package MintPlayer.Spark.Webhooks.GitHub.DevTunnel -Version 10.0.0-preview.39
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MintPlayer.Spark.Webhooks.GitHub.DevTunnel" Version="10.0.0-preview.39" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MintPlayer.Spark.Webhooks.GitHub.DevTunnel" Version="10.0.0-preview.39" />
                    
Directory.Packages.props
<PackageReference Include="MintPlayer.Spark.Webhooks.GitHub.DevTunnel" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MintPlayer.Spark.Webhooks.GitHub.DevTunnel --version 10.0.0-preview.39
                    
#r "nuget: MintPlayer.Spark.Webhooks.GitHub.DevTunnel, 10.0.0-preview.39"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MintPlayer.Spark.Webhooks.GitHub.DevTunnel@10.0.0-preview.39
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MintPlayer.Spark.Webhooks.GitHub.DevTunnel&version=10.0.0-preview.39&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=MintPlayer.Spark.Webhooks.GitHub.DevTunnel&version=10.0.0-preview.39&prerelease
                    
Install as a Cake Tool

MintPlayer.Spark.Webhooks.GitHub.DevTunnel

Development-only tunneling for MintPlayer.Spark.Webhooks.GitHub. GitHub can't reach localhost, so this package gives you two ways to receive real webhook deliveries on your dev machine — without deploying.

Dev-only. Reference this package from local/development builds only. Production deployments need just the core MintPlayer.Spark.Webhooks.GitHub package, which receives webhooks directly over HTTPS.

Installation


<PackageReference Include="MintPlayer.Spark.Webhooks.GitHub.DevTunnel" Version="10.0.0-preview.33" />

Both tunnels are wired through the core package's options object, so you configure them inside spark.AddGithubWebhooks(...).

Option A — smee.io tunnel

No production deployment needed. Point your GitHub App's Webhook URL at a smee.io channel, then relay it to your local app:

using MintPlayer.Spark.Webhooks.GitHub.DevTunnel.Extensions;

spark.AddGithubWebhooks(options =>
{
    options.WebhookSecret = builder.Configuration["GitHub:WebhookSecret"] ?? string.Empty;
    options.AddSmeeDevTunnel(builder.Configuration["GitHub:SmeeChannelUrl"]!);
});

AddSmeeDevTunnel(smeeChannelUrl) registers a SmeeBackgroundService that connects to the channel over Server-Sent Events, re-minimizes the JSON body (smee's relay can reformat it, which would otherwise break HMAC validation), and feeds each delivery into the same SparkWebhookEventProcessor used in production. Signature validation still applies.

Option B — WebSocket forwarding from production

When your app is already deployed, run two GitHub Apps (e.g. MyBot and MyBot-Dev) pointing at the same production webhook URL. Production processes its own app's webhooks and forwards the dev app's webhooks to connected developers over a WebSocket.

using MintPlayer.Spark.Webhooks.GitHub.DevTunnel.Extensions;

// Developer's local Program.cs — do NOT set DevelopmentAppId locally
spark.AddGithubWebhooks(options =>
{
    options.WebhookSecret = builder.Configuration["GitHub:WebhookSecret"] ?? string.Empty;
    options.AddWebSocketDevTunnel(
        builder.Configuration["GitHub:DevWebSocketUrl"]!,   // wss://yourapp.com/spark/github/dev-ws
        builder.Configuration["GitHub:DevGitHubToken"]!);   // your GitHub token
});

AddWebSocketDevTunnel(productionWebSocketUrl, githubToken) registers a WebSocketDevClientService that connects to the production server's dev-WS endpoint. The handshake sends your GitHub token; the server validates it against the GitHub API to determine your username and (if AllowedDevUsers is configured on the server) whether you're allowed to connect. Forwarded deliveries are processed locally through SparkWebhookEventProcessor, exactly as a direct delivery would be.

The production side of this flow (DevelopmentAppId, DevWebSocketPath, AllowedDevUsers) is configured on the core package — see the GitHub Webhooks README.

Extension methods

Method Description
AddSmeeDevTunnel(string smeeChannelUrl) Relay a smee.io channel into the local webhook processor via SSE.
AddWebSocketDevTunnel(string productionWebSocketUrl, string githubToken) Connect to a production server's dev-WS endpoint to receive forwarded dev-app webhooks.

Both are extensions on GitHubWebhooksOptions and are called inside spark.AddGithubWebhooks(...).

Requirements

  • .NET 10.0+
  • MintPlayer.Spark.Webhooks.GitHub (referenced automatically)
  • A GitHub App with a webhook secret (see the core package README)

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.0-preview.39 42 6/9/2026
10.0.0-preview.38 40 6/9/2026
10.0.0-preview.35 46 6/7/2026