CC.UmbracoProxy
1.1.0
dotnet add package CC.UmbracoProxy --version 1.1.0
NuGet\Install-Package CC.UmbracoProxy -Version 1.1.0
<PackageReference Include="CC.UmbracoProxy" Version="1.1.0" />
<PackageVersion Include="CC.UmbracoProxy" Version="1.1.0" />
<PackageReference Include="CC.UmbracoProxy" />
paket add CC.UmbracoProxy --version 1.1.0
#r "nuget: CC.UmbracoProxy, 1.1.0"
#:package CC.UmbracoProxy@1.1.0
#addin nuget:?package=CC.UmbracoProxy&version=1.1.0
#tool nuget:?package=CC.UmbracoProxy&version=1.1.0
CC.UmbracoProxy
Drop-in outbound HTTP/SMTP proxy and ForwardedHeaders support for Umbraco.
A single AddProxySupport() call wires:
HttpClient.DefaultProxy(eagerly, so SDKs that bypassIHttpClientFactory— e.g. Azure SDK'sBlobServiceClient— still route through your proxy)- A singleton
SocketsHttpHandlerused as the primary handler for everyIHttpClientFactoryclient ForwardedHeadersOptions(X-Forwarded-For / Proto / Host, withKnownProxiesand CIDRKnownNetworks)- A proxy-aware
IEmailSenderimplementation that tunnels SMTP through the configured proxy via MailKit'sHttpProxyClient
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:
- Binds
ProxyOptionsfrom theProxyconfiguration section (override the section name via theconfigSectionparameter). - Sets
HttpClient.DefaultProxysynchronously (for SDKs that bypassIHttpClientFactory). - Configures
ForwardedHeadersOptions(parsesKnownProxiesIPs andKnownNetworksCIDR ranges). - Registers a singleton
SocketsHttpHandlercarrying the proxy + cert settings. - Wires
HttpClientFactoryOptions.HttpMessageHandlerBuilderActionsso everyIHttpClientFactory-created client uses that handler as its primary handler. - Registers
ProxiedUmbracoEmailSenderas the uniqueIEmailSender(replaces Umbraco's default sender).
License
MIT
| 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
- Umbraco.Cms (>= 17.4.2)
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 |