Groundhog.Agent 1.0.0

dotnet add package Groundhog.Agent --version 1.0.0
                    
NuGet\Install-Package Groundhog.Agent -Version 1.0.0
                    
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="Groundhog.Agent" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Groundhog.Agent" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Groundhog.Agent" />
                    
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 Groundhog.Agent --version 1.0.0
                    
#r "nuget: Groundhog.Agent, 1.0.0"
                    
#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 Groundhog.Agent@1.0.0
                    
#: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=Groundhog.Agent&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Groundhog.Agent&version=1.0.0
                    
Install as a Cake Tool

Groundhog.Agent

The agent of Groundhog, the hosted HTTPS tunnel service for local development, as a library you can embed. It keeps an outbound connection to the Groundhog service and forwards each public request to an app on your machine, keeping the Host header, streaming bodies and passing WebSockets through. Dropped connections are reopened by themselves.

using Groundhog.Agent;

var agent = new GroundhogAgent(new GroundhogAgentOptions
{
    TunnelName = "myapp",
    Credential = new TunnelKeyCredential(Environment.GetEnvironmentVariable("GROUNDHOG_KEY")!),
    LocalTarget = new Uri("http://localhost:5173"),
});
var run = agent.RunAsync(cancellationToken);
await foreach (var status in agent.WatchStatusAsync())
{
    Console.WriteLine($"{status.State} {status.PublicAddress} {status.Reason}");
}
var reason = await run;

In an ASP.NET Core or worker app, let the host run it instead:

builder.Services.AddGroundhogAgent(options =>
{
    options.TunnelName = "myapp";
    options.Credential = new TunnelKeyCredential(builder.Configuration["Groundhog:Key"]!);
    options.LocalTarget = new Uri("http://localhost:5000");
});
  • The agent connects to the hosted Groundhog service; there's no service address to configure.
  • GroundhogCredential is the extension point for sign-in methods; TunnelKeyCredential (scheme GroundhogKey) is built in.
  • LocalTarget accepts HTTP or HTTPS. TLS uses the target hostname while the app receives the public Host. HTTPS uses platform trust; optional LocalCaFile or InsecureLocal controls apply only to loopback HTTPS.
  • Optional VisitorAccess declares who may visit the tunnel (anyone, workspace members, API keys, IP ranges, per path). API keys, which callers send to reach a path, are separate from the tunnel's connection key. Pass them as plaintext from your secrets; only their SHA-256 hashes are sent.
  • Status is the current state; WatchStatusAsync streams it and every change: connecting, connected (with the public address), reconnecting (with the reason and the wait) and stopped. Each stream is buffered separately and never holds up the agent.
  • OnRequestCompleted reports each request's method, path (without query string), status and duration.
  • Metrics go to the Groundhog.Agent meter: groundhog.agent.request.duration and groundhog.agent.connections.
  • RunAsync returns why the agent stopped: cancelled, credential rejected, not allowed, unknown tunnel, unsupported protocol, replaced by a newer session, or a service that doesn't support declared visitor access rules.

Requires the ASP.NET Core shared framework (.NET 10 or later). See docs/agent.md in the source repository for the full guide.

MIT licensed.

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 (1)

Showing the top 1 NuGet packages that depend on Groundhog.Agent:

Package Downloads
Groundhog.Aspire.Hosting

.NET Aspire integration for Groundhog: run a tunnel agent as an AppHost resource and expose its public address.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 43 10/17/2026
0.4.0-preview.7 50 10/14/2026
0.4.0-preview.6 49 10/14/2026
0.4.0-preview.5 47 10/13/2026
0.4.0-preview.4 52 10/13/2026
0.4.0-preview.3 49 10/13/2026
0.4.0-preview.2 137 10/13/2026
0.4.0-preview.1 59 10/12/2026
0.3.0-preview.3 102 10/11/2026
0.3.0-preview.2 51 10/11/2026
0.3.0-preview.1 72 10/11/2026
0.2.0-preview.4 67 10/10/2026
0.2.0-preview.3 65 10/10/2026
0.2.0-preview.2 56 10/10/2026
0.2.0-preview.1 52 10/10/2026