Library (embed)
NuGet package Titanium.Web.Proxy (MIT). Target framework: .NET 10.
shell
dotnet add package Titanium.Web.ProxyExplicit MITM proxy
csharp
using System.Net;
using Titanium.Web.Proxy;
using Titanium.Web.Proxy.Models;
using var proxyServer = new ProxyServer();
proxyServer.BeforeRequest += async (sender, e) =>
{
// Inspect or rewrite e.HttpClient.Request
};
var endPoint = new ExplicitProxyEndPoint(IPAddress.Loopback, 8000, decryptSsl: true);
proxyServer.AddEndPoint(endPoint);
proxyServer.CertificateManager.EnsureRootCertificate(
userTrustRootCertificate: true,
machineTrustRootCertificate: false);
proxyServer.Start();Capabilities
- Intercept, modify, redirect, or block HTTP and HTTPS
- Explicit, transparent, and SOCKS4/5 endpoints
- HTTP/2 on by default (
ProxyServer.EnableHttp2); HTTP/3 opt-in (EnableHttp3, experimentalTWP001) - Upstream HTTP/HTTPS/SOCKS + system proxy detection
- Proxy auth, mTLS, Kerberos, NTLM
- Connection, certificate, and buffer pooling
- Built-in async logging and opt-in request timing
Reverse proxy
Use ForwardHost on a transparent endpoint for a zero-cost terminate-lite path, or declarative routes/clusters (also used by the CLI). See Configuration and Protocol support.
API reference
- ProxyServer
- Full API tree under /api/
Examples in the repo
examples/Titanium.Web.Proxy.Examples.Basicexamples/Titanium.Web.Proxy.Examples.Wpfexamples/Titanium.Web.Proxy.Examples.WindowsService