TlsClient.Core
0.3.1
This library is no longer available. Use "TlsClient.Native" or "TlsClient.Api" instead.
See the version list below for details.
dotnet add package TlsClient.Core --version 0.3.1
NuGet\Install-Package TlsClient.Core -Version 0.3.1
<PackageReference Include="TlsClient.Core" Version="0.3.1" />
<PackageVersion Include="TlsClient.Core" Version="0.3.1" />
<PackageReference Include="TlsClient.Core" />
paket add TlsClient.Core --version 0.3.1
#r "nuget: TlsClient.Core, 0.3.1"
#:package TlsClient.Core@0.3.1
#addin nuget:?package=TlsClient.Core&version=0.3.1
#tool nuget:?package=TlsClient.Core&version=0.3.1
TlsClient.Core
Core library for TlsClient.NET.
Provides primitives to configure and build a TlsClient with advanced TLS capabilities (fingerprinting, browser identifiers, user-agent control, redirect & timeout policies, certificate validation toggles, cookie handling, etc.).
This package is the foundation used by subpackages like:
TlsClient.HttpClient(viaTlsClientHandler)TlsClient.RestSharp(viaTlsRestClientBuilder)
📦 Installation
Install from NuGet:
dotnet add package TlsClient.Core
🚀 Quick Start
Example 1 – Direct Options
using TlsClient.Core;
TlsClient.Initialize("{LIBRARY_PATH}");
var tlsClient = new TlsClient(
new TlsClientOptions
{
TlsClientIdentifier = TlsClientIdentifier.Chrome132,
FollowRedirects = true,
Timeout = TimeSpan.FromSeconds(15),
InsecureSkipVerify = true,
DefaultHeaders = new()
{
{ "User-Agent", new() { "TlsClient.NET 1.0" } }
}
}
);
Example 2 – Fluent Builder
using TlsClient.Core;
TlsClient.Initialize("{LIBRARY_PATH}");
var tlsClient = new TlsClientBuilder()
.WithIdentifier(TlsClientIdentifier.Chrome132)
.WithUserAgent("TestClient 1.0")
.WithFollowRedirects()
.WithTimeout(TimeSpan.FromSeconds(15))
.WithDefaultCookieJar()
.Build();
ℹ️ Use
TlsClient.HttpClientorTlsClient.RestSharpto integrate into existing stacks.
⚠️ Without
TlsClient.Initialize(path)the library will not work.
⚙️ Options (TlsClientOptions)
| Property | Type | Default | Description |
|---|---|---|---|
TlsClientIdentifier |
TlsClientIdentifier? |
null |
Predefined browser/profile identifier. |
ProxyURL |
string? |
null |
Proxy URL (e.g. "http://127.0.0.1:8888"). |
Timeout |
TimeSpan |
00:01:00 |
Global timeout. |
FollowRedirects |
bool |
false |
Auto-follow HTTP redirects. |
InsecureSkipVerify |
bool |
false |
Skip cert validation. |
WithDefaultCookieJar |
bool |
false |
Enable default cookie jar. |
WithoutCookieJar |
bool |
false |
Disable all cookies. |
WithDebug |
bool |
false |
Enable debug logging. |
CertificatePinningHosts |
Dictionary<string,List<string>>? |
null |
Host → fingerprints. |
HeaderOrder |
List<string>? |
null |
Custom header ordering. |
🧰 Builder (TlsClientBuilder)
Fluent API to configure a TlsClient.
| Method | Parameters | Description |
|---|---|---|
WithIdentifier |
TlsClientIdentifier id |
Sets client identifier. |
WithUserAgent |
string ua |
Sets User-Agent. |
WithProxyUrl |
string url, bool isRotating=false |
Configures proxy. |
WithTimeout |
TimeSpan t |
Sets timeout. |
WithFollowRedirects |
bool enabled=true |
Enables redirects. |
WithDefaultCookieJar |
bool enabled=true |
Enables cookie jar. |
WithoutCookieJar |
bool enabled=true |
Disables cookie jar. |
WithHeader |
string key, string value |
Adds header. |
WithCertificatePinning |
string host, List<string> pins |
Adds pinning. |
Build |
— | Creates TlsClient. |
Example 1 – Proxy + Headers
TlsClient.Initialize("{LIBRARY_PATH}");
var tlsClient = new TlsClientBuilder()
.WithIdentifier(TlsClientIdentifier.Chrome132)
.WithProxyUrl("http://127.0.0.1:8080", isRotating: true)
.WithHeader("Accept-Language", "en-US,en;q=0.9")
.Build();
Example 2 – With Pinning
TlsClient.Initialize("{LIBRARY_PATH}");
var tlsClient = new TlsClientBuilder()
.WithIdentifier(TlsClientIdentifier.Chrome132)
.WithCertificatePinning("example.com", new List<string>
{
"sha256/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
})
.Build();
Tabii 👍 İşte sadece Request kısmı (tüm property’ler dahil, Markdown formatında döküm):
📦 Request (Request)
The Request class represents a single HTTP request configuration.
Below are all available properties:
| Property | Type | Default | Description |
|---|---|---|---|
TlsClientIdentifier |
TlsClientIdentifier? |
null |
Overrides global TLS client identifier. |
CustomTlsClient |
CustomTlsClient? |
null |
Custom TLS client for this request. |
TransportOptions |
TransportOptions? |
null |
Advanced transport options. |
Headers |
Dictionary<string,string> |
empty | Request headers (single values). |
DefaultHeaders |
Dictionary<string,List<string>>? |
null |
Multi-value default headers. |
ConnectHeaders |
Dictionary<string,List<string>>? |
null |
Headers for proxy CONNECT. |
CertificatePinningHosts |
Dictionary<string,List<string>>? |
null |
Host → SHA256 pins. |
LocalAddress |
string? |
null |
Local bind address. |
ServerNameOverwrite |
string? |
null |
Override SNI / TLS server name. |
ProxyUrl |
string? |
null |
Per-request proxy URL. |
RequestBody |
string? |
null |
Raw request body. |
RequestHostOverride |
string? |
null |
Override Host header. |
SessionId |
Guid? |
null |
Session identifier override. |
StreamOutputBlockSize |
int? |
null |
Block size for streaming output. |
StreamOutputEOFSymbol |
string? |
null |
EOF marker in stream. |
StreamOutputPath |
string? |
null |
Stream response to file path. |
RequestMethod |
HttpMethod |
HttpMethod.Get |
HTTP method. |
RequestUrl |
string |
"" |
Target request URL (required). |
HeaderOrder |
List<string>? |
[] |
Custom header order. |
RequestCookies |
List<TlsClientCookie>? |
null |
Cookies for this request. |
TimeoutMilliseconds |
int? |
null |
Timeout in milliseconds. |
TimeoutSeconds |
int? |
null |
Timeout in seconds. |
CatchPanics |
bool? |
null |
Catch panics from native TLS client. |
FollowRedirects |
bool? |
null |
Request-level redirect policy. |
ForceHttp1 |
bool? |
null |
Force HTTP/1.1. |
InsecureSkipVerify |
bool? |
null |
Skip certificate validation (testing only). |
IsByteRequest |
bool |
false |
Marks request body as byte-based. |
IsByteResponse |
bool |
false |
Return response as raw bytes. |
IsRotatingProxy |
bool? |
null |
Indicates rotating proxy usage. |
DisableIPV6 |
bool? |
null |
Disable IPv6. |
DisableIPV4 |
bool? |
null |
Disable IPv4. |
WithDebug |
bool? |
null |
Enable debug logging. |
WithDefaultCookieJar |
bool? |
null |
Enable default cookie jar. |
WithoutCookieJar |
bool? |
null |
Disable cookie jar. |
WithRandomTLSExtensionOrder |
bool? |
null |
Randomize TLS extension order. |
🧰 Request Builder (RequestBuilder)
Simplifies building a Request.
| Method | Parameters | Description |
|---|---|---|
WithUrl |
string url |
Sets target URL. |
WithMethod |
HttpMethod m |
Sets HTTP method. |
WithHeader |
string k, string v |
Adds header. |
WithBody |
string/json/bytes |
Sets body. |
WithCookie |
string n, string v |
Adds cookie. |
WithStreamOutputPath |
string path |
Stream response to file. |
Build |
— | Returns Request. |
Example 1 – JSON POST
var req = new RequestBuilder()
.WithUrl("https://httpbin.org/post")
.WithMethod(HttpMethod.Post)
.WithBody(new { email = "user@example.com", active = true })
.WithHeader("Content-Type", "application/json")
.Build();
Example 2 – GET with Cookies
var req = new RequestBuilder()
.WithUrl("https://example.com/report")
.WithMethod(HttpMethod.Get)
.WithCookie("session", "abcdef")
.WithStreamOutputPath("C:\\temp\\report.bin")
.Build();
🧯 Error Handling
- Builders throw
ArgumentException/InvalidOperationExceptionfor invalid inputs. - Network/TLS issues bubble up as standard .NET exceptions.
🧪 Testing Tips
- Use
https://httpbin.orgto test headers, cookies, TLS behavior. - Toggle
InsecureSkipVerifyonly in controlled test environments.
📜 License
MIT License – see the root LICENSE file.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 was computed. 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 was computed. 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 | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | 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.1
- System.Text.Json (>= 9.0.8)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on TlsClient.Core:
| Package | Downloads |
|---|---|
|
TlsClient.HttpClient
Addon of TlsClient for HttpClient. |
|
|
TlsClient.Native
TlsClient.Native is a .NET Standard library that provides direct/native bindings to the TlsClient Go library. |
|
|
TlsClient.Provider.HttpClient
TlsClient.HttpClient is an addon for the TlsClient library that provides seamless integration with .NET's HttpClient. |
|
|
TlsClient.Api
TlsClient.Api is a .NET Standard library that provides an API-based wrapper for the TlsClient Go library. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 0.4.7 | 0 | 6/11/2026 | |
| 0.4.6 | 2,301 | 3/13/2026 | |
| 0.4.5 | 260 | 3/13/2026 | |
| 0.4.4 | 1,625 | 1/20/2026 | |
| 0.4.3 | 775 | 9/8/2025 | |
| 0.4.2 | 481 | 9/8/2025 | |
| 0.3.1 | 452 | 9/4/2025 | |
| 0.2.2 | 415 | 8/15/2025 | |
| 0.2.1 | 289 | 8/15/2025 | |
| 0.2.0 | 642 | 8/1/2025 | |
| 0.1.9 | 394 | 7/14/2025 | |
| 0.1.7 | 344 | 6/21/2025 | |
| 0.1.6 | 495 | 5/16/2025 | |
| 0.1.5 | 450 | 5/14/2025 | |
| 0.1.4 | 445 | 5/13/2025 | |
| 0.1.3 | 514 | 4/17/2025 | |
| 0.1.2 | 417 | 4/16/2025 | |
| 0.1.1 | 403 | 4/16/2025 |