PeakSWC.WebServerTransporter 0.0.7-pre

This is a prerelease version of PeakSWC.WebServerTransporter.
dotnet add package PeakSWC.WebServerTransporter --version 0.0.7-pre                
NuGet\Install-Package PeakSWC.WebServerTransporter -Version 0.0.7-pre                
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="PeakSWC.WebServerTransporter" Version="0.0.7-pre" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PeakSWC.WebServerTransporter --version 0.0.7-pre                
#r "nuget: PeakSWC.WebServerTransporter, 0.0.7-pre"                
#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.
// Install PeakSWC.WebServerTransporter as a Cake Addin
#addin nuget:?package=PeakSWC.WebServerTransporter&version=0.0.7-pre&prerelease

// Install PeakSWC.WebServerTransporter as a Cake Tool
#tool nuget:?package=PeakSWC.WebServerTransporter&version=0.0.7-pre&prerelease                

WebServerTransporter

WebServerTransporter is a nuget package that allows a developer to easily modify a dot net core Kestrel web server that resides on a private IP network (the "PrivateServer") and expose the server on the public network via a proxy called the "Transporter" server.

This functionality is useful when the Private Server cannot be moved to the public cloud because either it interacts with local hardware or depends on legacy systems that would be difficult or expensive to deploy in the cloud.

How it Works

The Private Server connects to the Transporter via a WebSocket connection on port 80. Next, user web requests to the Transporter are routed via the WebSocket to the Private Server. Finally, the Private Server sends the web reponses back to the Transporter which then forwards the responses back to the user's web browser.

Quick Start

Create a razor sample web site

dotnet new razor

Add the reference to the nuget package in the razor.csproj file

 <ItemGroup>
    <PackageReference Include="PeakSWC.WebServerTransporter" Version="0.0.7-pre" />
  </ItemGroup>

Modify the Startup.cs as follows:

using PeakSWC.WebServerTransporter;

Insert "AddWebServerTransporter" to ConfigureServices as follows:

 public void ConfigureServices(IServiceCollection services)
 {
     services.AddRazorPages();
     services.AddWebServerTransporter(new Uri("http://localhost:53343"));
 }

Finally, insert "app.UseWebServerTransporter();" into the Configure method as follows:

 if (env.IsDevelopment())
 {
     app.UseDeveloperExceptionPage();
 }
 else
 {
     app.UseExceptionHandler("/Error");
     // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
     app.UseHsts();
 }

 app.UseHttpsRedirection();
 app.UseWebServerTransporter();

Download the TransporterServer.exe from https://github.com/budcribar/WebServerTransporter/releases

Start the Transporter server and specify a port as follows

./Transporter.exe http://localhost:53343

Start the razor sample server

dotnet run

Now open a web browser using the URL of the transporter (http://localhost:53343) and try it out. At this point you can host the TransporterServer.exe in the public cloud and have access to your Private Server !

Limitations

Most of the basic functions of the Kestrel web server are supported. However, there a limitations such as Cookie Authentication that is not yet supported

Problems

Please open a bug or feature request here: https://github.com/budcribar/WebServerTransporter/issues/new/choose

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
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
0.0.7-pre 332 2/17/2020 0.0.7-pre is deprecated because it is no longer maintained.
0.0.6-pre 336 12/22/2019