GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Skip To Content
  • Packages
  • Upload
  • Statistics
  • Documentation
  • Downloads
  • Blog
  • Sign in

This view

  • Original page
  • New address

GeezerVison is showing www.nuget.org — WebHop.Origin 2.2.0



WebHop.Origin 2.2.0

.NET 7.0 This package targets .NET 7.0. The package is compatible with this framework or higher.
  • .NET CLI
  • PMC
  • PackageReference
  • CPM
  • Paket CLI
  • Script & Interactive
  • File-Based Apps
  • Cake
dotnet add package WebHop.Origin --version 2.2.0
                    
NuGet\Install-Package WebHop.Origin -Version 2.2.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="WebHop.Origin" Version="2.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WebHop.Origin" Version="2.2.0" />
                    
Directory.Packages.props
<PackageReference Include="WebHop.Origin" />
                    
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 WebHop.Origin --version 2.2.0
                    
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: WebHop.Origin, 2.2.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 [email protected]
                    
#: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=WebHop.Origin&version=2.2.0
                    
Install as a Cake Addin
#tool nuget:?package=WebHop.Origin&version=2.2.0
                    
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
  • README
  • Frameworks
  • Dependencies
  • Used By
  • Versions

WebHop.Origin

Serve an ASP.NET Core app through a WebHop gateway from behind NAT or a firewall, with no inbound ports. The app opens WebSocket tunnels out to the gateway, and Kestrel serves them like ordinary connections, so your middleware, endpoints, WebSockets and server-sent events work unchanged.

browser ──HTTP──▶ WebHop gateway ◀──WebSocket tunnels── your app (WebHop.Origin)
                  (public host)                          (behind NAT, no open ports)

You need a running gateway and a token for it; see the quick start.

Usage

dotnet add package WebHop.Origin
var builder = WebApplication.CreateBuilder(args);
builder.WebHost.UseWebHop();   // instead of listening on a port

Start the app with its token. The token, wh_…, says where the gateway is, what the app serves there and its origin id, so the app needs nothing else:

export WEBHOP_TOKEN=<token>
dotnet run --no-launch-profile

--urls, or applicationUrl in launchSettings.json, takes the place of the token's gateway: its scheme, host and port, never a path. Leave it out (that's why --no-launch-profile above), unless the token serves paths alone and so names no gateway. In code:

builder.WebHost.UseWebHop("https://gateway.example.com/", options =>
{
    options.MaxConnections = 32;
});

The app reconnects on its own when the gateway restarts. Requests arrive with the client's scheme and IP address restored from the gateway's forwarded headers.

Token

The app refuses to start without a token. It comes from the WEBHOP_TOKEN environment variable, the WebHop:AuthToken configuration key, or options.AuthToken. Whoever issues tokens for the gateway makes one with webhop token issue. Keep it out of appsettings.json in source control: whoever reads it can serve as your app until it expires or is revoked.

WebHopServer.Status says why the gateway refuses the token: Unauthorized (bad, expired or revoked), Forbidden (it doesn't serve the host the app connects to) or Conflict (another process serves the same origin id with a token for something else). The app keeps retrying, so it connects once the token is replaced.

Options

UseWebHop reads these from the WebHop configuration section (appsettings.json, environment variables such as WebHop__MaxConnections, …). Values set in the callback win.

Option Default Meaning
AuthToken WEBHOP_TOKEN The app's token, wh_…
MaxConnections 10 Tunnels kept open; caps concurrent requests and WebSockets. The token (3 unless it says otherwise) and the gateway may set a lower limit, and the smallest wins
MaxReconnectDelay 30 s Upper bound of the reconnect backoff
KeepAliveInterval 15 s WebSocket ping interval

Notes

  • Requests no connected app serves get a 503 from a standalone gateway. A request that gets no response within 120 s gets 504.
  • The gateway closes the app's tunnels when its token expires; until it has a new one, it reports Unauthorized.
  • Requests carry X-Webhop-Origin-Id and X-Webhop-Request-Id; the request id becomes HttpContext.TraceIdentifier.
  • When you run the app from Visual Studio in Development, pages opened through the gateway may trigger a browser prompt about apps on your device. That is Visual Studio's Browser Link and Hot Reload script connecting back to localhost; it doesn't happen outside Development.

More

Documentation, the gateway and the webhop command line tool: https://github.com/elebree/WebHop

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

    • WebHop.Core (>= 2.2.0)
  • net7.0

    • WebHop.Core (>= 2.2.0)
  • net8.0

    • WebHop.Core (>= 2.2.0)
  • net9.0

    • WebHop.Core (>= 2.2.0)

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Include prerelease
Include vulnerable
Include deprecated
Version Downloads Last Updated
2.2.0 96 11/22/2026
2.1.0 95 11/21/2026
2.0.4 96 11/13/2026
2.0.3 120 10/20/2026
2.0.2 109 10/11/2026
2.0.0 111 10/10/2026
Downloads
Full stats →
Total 627
Current version 96
Per day average 12
About
  • Last updated 11/22/2026
  • Project website
  • Source repository
  • MIT license
  • Download package  (86.88 KB)
  • Download symbols  (60.15 KB)
  • Open in NuGet Package Explorer
  • Open in NuGet Trends
  • Report package
Owners
Contact owners →
  • elebree gravatar elebree

Copyright (c) 2026 elebree

Use the Atom feed to subscribe to new versions of WebHop.Origin

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.