Http.TLS
1.3.6
dotnet add package Http.TLS --version 1.3.6
NuGet\Install-Package Http.TLS -Version 1.3.6
<PackageReference Include="Http.TLS" Version="1.3.6" />
<PackageVersion Include="Http.TLS" Version="1.3.6" />
<PackageReference Include="Http.TLS" />
paket add Http.TLS --version 1.3.6
#r "nuget: Http.TLS, 1.3.6"
#:package Http.TLS@1.3.6
#addin nuget:?package=Http.TLS&version=1.3.6
#tool nuget:?package=Http.TLS&version=1.3.6
<img src="images/icon.png" width="45" height="45" align="left">
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, dispose on shutdown
using var context = new NativeClientContext("path/to/native-library");
// For AOT builds, register your JsonSerializerContext for custom types
// context.RegisterContext(AppJsonSerializerContext.Default);
Quick Start
using var context = new NativeClientContext("tls-client-windows-64-<version>.dll");
using var client = new RequestClientBuilder()
.WithBrowserType(BrowserType.Chrome133)
.WithTimeout(TimeSpan.FromSeconds(30))
.Build();
var request = new RequestBuilder()
.WithUrl("https://httpbin.org/get")
.Build();
var response = await client.SendAsync(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- ...
RequestClientFactory
Factory for managing multiple named client configurations:
var factory = new RequestClientFactory(o => o.BrowserType = BrowserType.Chrome133);
factory.Register("mobile", o => o.BrowserType = BrowserType.SafariIos17_2);
using var defaultClient = factory.CreateClient();
using var mobileClient = factory.CreateClient("mobile");
using var customClient = factory.CreateClient(o => o.WithProxy("http://proxy:8080"));
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- ...
Examples
GET Request
var request = new RequestBuilder()
.WithUrl("https://httpbin.org/get")
.WithMethod(HttpMethod.Get)
.Build();
var response = await client.SendAsync(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 = await client.SendAsync(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. |
-
.NETStandard 2.0
- System.Text.Json (>= 10.0.3)
-
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.