Groundhog.Agent
1.0.0
dotnet add package Groundhog.Agent --version 1.0.0
NuGet\Install-Package Groundhog.Agent -Version 1.0.0
<PackageReference Include="Groundhog.Agent" Version="1.0.0" />
<PackageVersion Include="Groundhog.Agent" Version="1.0.0" />
<PackageReference Include="Groundhog.Agent" />
paket add Groundhog.Agent --version 1.0.0
#r "nuget: Groundhog.Agent, 1.0.0"
#:package Groundhog.Agent@1.0.0
#addin nuget:?package=Groundhog.Agent&version=1.0.0
#tool nuget:?package=Groundhog.Agent&version=1.0.0
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.
GroundhogCredentialis the extension point for sign-in methods;TunnelKeyCredential(schemeGroundhogKey) is built in.LocalTargetaccepts HTTP or HTTPS. TLS uses the target hostname while the app receives the publicHost. HTTPS uses platform trust; optionalLocalCaFileorInsecureLocalcontrols apply only to loopback HTTPS.- Optional
VisitorAccessdeclares 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. Statusis the current state;WatchStatusAsyncstreams 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.OnRequestCompletedreports each request's method, path (without query string), status and duration.- Metrics go to the
Groundhog.Agentmeter:groundhog.agent.request.durationandgroundhog.agent.connections. RunAsyncreturns 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 | Versions 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. |
-
net10.0
- Groundhog.Protocol (>= 1.0.0)
- Yarp.ReverseProxy (>= 2.3.0)
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 |