CurlHttpClient 1.0.0

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

CurlHttpClient

A drop-in HttpMessageHandler that routes HttpClient through a bundled, statically-linked libcurl + OpenSSL native bridge — so your app gets modern TLS 1.2/1.3 on hosts whose Schannel cannot, most notably Windows Server 2012 R2.

No system OpenSSL, no external native dependencies, no VC++ redistributable: the bridge DLL is self-contained (static CRT) and ships in the package.

using var handler = new CurlHttpMessageHandler(new CurlHttpClientOptions
{
    // Optional: point at a CA bundle; a Mozilla cacert.pem ships in the package.
    // CertificateAuthorityBundlePath = "runtimes/win-x64/native/cacert.pem",
});
using var client = new HttpClient(handler);

string body = await client.GetStringAsync("https://example.com/");

Everything is standard HttpClient: SendAsync/Send, streaming with HttpCompletionOption.ResponseHeadersRead, cancellation, timeouts, redirects, decompression, proxies, and HttpClientFactory.

Why

SocketsHttpHandler uses the OS TLS stack. On Windows Server 2012 R2 that is a Schannel that cannot negotiate TLS 1.2 with modern cipher suites (and never TLS 1.3), so calls to up-to-date HTTPS endpoints fail at the handshake. This handler carries its own TLS stack (OpenSSL 3.x) and cipher support, independent of the OS.

Highlights

  • Modern TLS everywhere — TLS 1.2 and 1.3, OpenSSL cipher suites, certificate and hostname verification always on (they cannot be disabled).
  • Self-contained — one native DLL (libcurl 8.x + OpenSSL 3.x + nghttp2/zlib/ brotli, all static) plus a cacert.pem. Windows x64. Loads only Windows 8.1-floor system DLLs (build-gated), so it runs on Server 2012 R2.
  • Two engines — a default dedicated-worker pool, and an opt-in curl_multi event-loop engine (ExecutionEngine = CurlExecutionEngine.MultiEventLoop) with HTTP/2 multiplexing, a shared connection pool, and near-instant cancellation.
  • Production-hardened — streaming with backpressure, bounded memory, deterministic disposal/cancellation, connection reuse, redacted diagnostics (EventSource + ILogger), and a deep adversarial memory-safety/concurrency review.

Dependency injection

// CurlHttpClient.DependencyInjection — registers a named HttpClient.
services.AddCurlHttpClient("modern-tls", _ => new CurlHttpClientOptions
{
    EnableHttp2 = true,
});
// httpClientFactory.CreateClient("modern-tls")

Platform & support notes

  • Windows x64 only. On other platforms, prefer SocketsHttpHandler (already OpenSSL-backed off-Windows).
  • .NET 10. Note that Microsoft does not support the .NET runtime on Server 2012 R2; the native layer is fully 2012 R2 compatible, and a net8.0 retarget is a documented low-risk fallback if the runtime proves unreliable on target.
  • Certificate/hostname verification cannot be turned off. Caller-supplied cipher strings and request-header values are passed through — validate untrusted input yourself.

MIT licensed. See the repository for full documentation, limitations, the security review, and the deployment checklist.

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 (1)

Showing the top 1 NuGet packages that depend on CurlHttpClient:

Package Downloads
CurlHttpClient.DependencyInjection

IHttpClientFactory / dependency-injection integration for CurlHttpClient — AddCurlHttpClient(...) to register the libcurl+OpenSSL-backed HttpMessageHandler.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 54 7/16/2026

See CHANGELOG.md in the repository. 1.0.0: initial public release — modern TLS via bundled libcurl+OpenSSL, dedicated-worker and opt-in curl_multi engines, streaming/cancellation/pooling, and a deep memory-safety/concurrency review.