CC.UmbracoProxy 1.1.0

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

CC.UmbracoProxy

Drop-in outbound HTTP/SMTP proxy and ForwardedHeaders support for Umbraco.

A single AddProxySupport() call wires:

  • HttpClient.DefaultProxy (eagerly, so SDKs that bypass IHttpClientFactory — e.g. Azure SDK's BlobServiceClient — still route through your proxy)
  • A singleton SocketsHttpHandler used as the primary handler for every IHttpClientFactory client
  • ForwardedHeadersOptions (X-Forwarded-For / Proto / Host, with KnownProxies and CIDR KnownNetworks)
  • A proxy-aware IEmailSender implementation that tunnels SMTP through the configured proxy via MailKit's HttpProxyClient

Requirements

  • Umbraco 17.x (targets net10.0)

Install

dotnet add package CC.UmbracoProxy

Wire it up

In Program.cs:

using CC.UmbracoProxy.Extensions;

var builder = WebApplication.CreateBuilder(args);

builder.CreateUmbracoBuilder()
    .AddBackOffice()
    .AddWebsite()
    .AddDeliveryApi()
    .AddComposers()
    .AddProxySupport()   // <-- one call
    .Build();

var app = builder.Build();

app.UseForwardedHeaders();   // only needed if Proxy:Forwarding:Enabled = true

// ... rest of pipeline

Configure

Add a Proxy section to appsettings.json:

{
  "Proxy": {
    "Forwarding": {
      "Enabled": false,
      "ForwardedHeaders": "XForwardedFor,XForwardedProto,XForwardedHost",
      "KnownProxies": [],
      "KnownNetworks": [ "10.0.0.0/8" ]
    },
    "Outbound": {
      "Enabled": true,
      "UseProxy": true,
      "HttpProxy": "http://10.2.2.241:3128",
      "HttpsProxy": "http://10.2.2.241:3128",
      "BypassOnLocal": true,
      "NoProxy": [ "localhost", "127.0.0.1" ],
      "UseDefaultCredentials": false,
      "Username": "",
      "Password": "",
      "AllowInvalidCertificates": false
    }
  }
}

Options

Proxy:Forwarding — inbound X-Forwarded-* header handling. Configures ASP.NET Core's ForwardedHeadersMiddleware. Leave Enabled: false if you are not behind a reverse proxy / load balancer.

Proxy:Outbound — routing for outbound HTTP/SMTP. Set Enabled: true and UseProxy: true to activate. HttpsProxy is preferred over HttpProxy when both are set. AllowInvalidCertificates: true disables TLS validation on SocketsHttpHandler — use only for corporate proxies with MITM cert inspection.

What gets registered

AddProxySupport() performs the following in this order:

  1. Binds ProxyOptions from the Proxy configuration section (override the section name via the configSection parameter).
  2. Sets HttpClient.DefaultProxy synchronously (for SDKs that bypass IHttpClientFactory).
  3. Configures ForwardedHeadersOptions (parses KnownProxies IPs and KnownNetworks CIDR ranges).
  4. Registers a singleton SocketsHttpHandler carrying the proxy + cert settings.
  5. Wires HttpClientFactoryOptions.HttpMessageHandlerBuilderActions so every IHttpClientFactory-created client uses that handler as its primary handler.
  6. Registers ProxiedUmbracoEmailSender as the unique IEmailSender (replaces Umbraco's default sender).

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
1.1.0 101 5/22/2026