Http.TLS
1.2.1
.NET 5.0
This package targets .NET 5.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Http.TLS --version 1.2.1
NuGet\Install-Package Http.TLS -Version 1.2.1
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="Http.TLS" Version="1.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Http.TLS" Version="1.2.1" />
<PackageReference Include="Http.TLS" />
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 Http.TLS --version 1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Http.TLS, 1.2.1"
#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 Http.TLS@1.2.1
#: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=Http.TLS&version=1.2.1
#tool nuget:?package=Http.TLS&version=1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Http.TLS
.NET library for HTTP/2 HTTP/3 requests with TLS fingerprinting support. Based on bogdanfinn/tls-client, it allows you to mimic various browser fingerprints to bypass bot protection.
Installation
dotnet add package Http.TLS
Native Library
Download the appropriate native library for your platform from the bogdanfinn/tls-client releases page.
Initialization:
// Initialize once at application startup
RequestClient.Initialize("path/to/native-library");
Quick Start
using Http.TLS;
using Http.TLS.Builders;
using Http.TLS.Core;
using Http.TLS.Core.Request;
// Initialize library
RequestClient.Initialize("path/to/native-library");
// Create client
using var client = new RequestClientBuilder()
.WithBrowserType(BrowserType.Chrome133)
.WithTimeout(TimeSpan.FromSeconds(30))
.Build();
// Send request
var request = new Request
{
RequestUrl = "https://httpbin.org/post",
RequestMethod = "POST",
RequestBody = "{\"message\": \"Hello\"}",
Headers = { ["Content-Type"] = "application/json" }
};
var response = client.Send(request);
Console.WriteLine($"Status: {response.Status}");
Console.WriteLine($"Body: {response.Body}");
RequestClientBuilder
Fluent API for client configuration:
using var client = new RequestClientBuilder()
.WithBrowserType(BrowserType.Chrome133)
.WithTimeout(TimeSpan.FromSeconds(30))
.WithProxy("http://proxy:8080")
.WithCookieJar(true)
.WithDebug(true)
.Build();
Available methods:
WithBrowserType()- browser fingerprint selectionWithTimeout()- request timeoutWithProxy()- proxy configurationWithCookieJar()/WithoutCookieJar()- cookie managementWithInsecureSkipVerify()- skip SSL verification- ...
RequestBuilder
Fluent API for request creation:
var request = new RequestBuilder()
.WithUrl("https://api.example.com/data")
.WithMethod(HttpMethod.Post)
.WithBody(new { name = "John", age = 30 })
.WithHeader("Authorization", "Bearer token")
.WithTimeout(TimeSpan.FromSeconds(30))
.Build();
Available methods:
WithUrl()- request URLWithMethod()- HTTP methodWithBody()- request body (string, object, byte[])WithHeader()/WithHeaders()- headersWithCookie()/WithCookies()- cookies- ...
Features
- HTTP/1.1, HTTP/2, HTTP/3 - MFull protocol support with automatic negotiation
- Protocol Racing - Chrome-like "Happy Eyeballs" for HTTP/2 vs HTTP/3
- TLS Fingerprinting - Mimic Chrome, Firefox, Safari, and other browsers
- HTTP/3 Fingerprinting - Accurate QUIC/HTTP/3 fingerprints matching real browsers
- Custom Header Ordering - Control the order of HTTP headers
- Proxy Support - HTTP and SOCKS5 proxies
- Cookie Jar Management - Built-in cookie handling
- Certificate Pinning - Enhanced security with custom certificate validation ...
Examples
GET Request
var request = new Request
{
RequestUrl = "https://httpbin.org/headers",
RequestMethod = "GET",
Headers = { ["X-Custom"] = "value" }
};
var response = client.Send(request);
POST with JSON
var request = new RequestBuilder()
.WithUrl("https://httpbin.org/post")
.WithMethod(HttpMethod.Post)
.WithBody(new { name = "John", age = 30 })
.Build();
var response = client.Send(request);
Target Frameworks
- .NET Standard 2.0
- .NET 5.0, 6.0, 8.0, 9.0 10.0
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. 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 is compatible. 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- System.Text.Json (>= 10.0.2)
-
net10.0
- No dependencies.
-
net5.0
- No dependencies.
-
net6.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.