If tls-client still gets a 403 "Just a moment..." page from Cloudflare, the fingerprint is probably not the problem. bogdanfinn's tls-client, and the Python wrappers built on it, copy a browser's TLS and HTTP/2 handshake, but they have no JavaScript engine, so they cannot pass a Cloudflare challenge. The Python wrapper's maintainer put it plainly: "Getting past bot protection takes more than a TLS fingerprint, so it's out of scope for this library."
So first check what Cloudflare sent. A challenge needs a cf_clearance cookie replayed with a matching profile, User-Agent and IP. Any other 403 is usually a stale profile, headers that contradict it, or the IP. This guide covers both, plus the shared-library and EOF errors specific to tls-client. Facts are from the projects' READMEs, source, PyPI and issues, checked 2026-12-01.
Quick answer: what your tls-client result means
Match your symptom, then jump to the fix.
- 403 + <title>Just a moment...</title> / cf-mitigated: challenge
- A JavaScript challenge. No TLS profile passes it. Get cf_clearance from a browser or solver and replay it with a matching profile, UA and IP.
- 403 with no challenge marker, 200 in a real browser
- Profile, headers or IP. Use a current profile, a User-Agent for the same browser and version, a realistic header order, and a better proxy.
- OSError: Error relocating .../tls_client/dependencies/tls-client-x86.so: __vfprintf_chk: symbol not found
- The prebuilt library cannot load on Alpine/musl (Python-Tls-Client #92). Use a glibc image such as python:3.x-slim; tls-client 2.0.0 raises UnsupportedPlatformError on musl instead.
- incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')
- Wrong native binary for your CPU (Python-Tls-Client #65). Upgrade the wrapper and run an interpreter that matches your machine's architecture.
- failed to do request: Get "https://...": EOF / unexpected EOF
- The connection closed mid-request (tls-client #66). The issue names proxies limiting concurrent connections and MTU problems with post-quantum key exchange; test without the proxy and with a non-PQ profile.
- Memory keeps growing in Python
- Native sessions and responses are not freed (tls-client #165). Close sessions (Session.close() in tls-client 2.0.0) so freeMemory runs, and reuse sessions instead of creating one per request.
- My client_identifier seems to be ignored
- The name is not in your wrapper version's list. Check tls_client/settings.py; the wrapper's README and source disagree on whether unknown names raise or fall back silently.
- 429 or Error 1015 after a burst
- Rate limiting. Slow down, reuse sessions and spread load over IPs.
Error strings are quoted from GitHub issues in bogdanfinn/tls-client and FlorianREGAZ/Python-Tls-Client; versions from GitHub releases and PyPI, checked 2026-12-01.
What tls-client fixes, and what it cannot
bogdanfinn/tls-client (BSD-3-Clause, about 2,000 stars) is a Go "net/http.Client like HTTP Client with options to select specific client TLS Fingerprints". It is actively maintained: v1.18.1 shipped on 2026-11-11 and added chrome_154, chrome_154_PSK and safari_27_2 profiles. Alongside Chrome it ships Firefox, Safari, iOS Safari, Opera and OkHttp profiles. Python, Node.js and C# use it through FFI bindings to a prebuilt shared library.
That fixes one layer: Cloudflare can identify clients by their TLS (JA3/JA4) and HTTP/2 fingerprint, and plain Python requests or Go net/http fail there. It does not fix the next layer. When Cloudflare serves a challenge page, the browser must run JavaScript to earn cf_clearance, and tls-client is an HTTP client built on fhttp and utls with no JavaScript runtime. Python-Tls-Client issue #121, "Unable to bypass cloudflare's protection", was closed by the maintainer with exactly that answer.
Step 1: find out which layer blocked you
Cloudflare marks challenge pages with the cf-mitigated: challenge response header, and they carry the "Just a moment..." title. Error 1020 ("you have been blocked") is a firewall rule with nothing to solve, and 1015 or 429 is a rate limit. Only a 403 with none of these markers is worth fixing with profiles and headers.
import tls_client
session = tls_client.Session(
client_identifier="chrome_120", # must exist in tls_client/settings.py of YOUR version
random_tls_extension_order=True,
)
try:
r = session.get("https://target-site.com/", proxy="http://user:pass@host:port")
html = r.text
print(r.status_code, r.headers.get("cf-mitigated"), r.headers.get("cf-ray"))
if r.headers.get("cf-mitigated") == "challenge" or "<title>Just a moment" in html:
print("JS challenge: no TLS profile passes this, you need cf_clearance")
elif "1020" in html or "you have been blocked" in html:
print("Firewall rule: nothing to solve, change IP or ask the site owner")
elif r.status_code == 429 or "1015" in html:
print("Rate limited: slow down")
else:
print("No challenge marker: check profile, headers and IP")
finally:
session.close() # tls-client 2.0.0+: frees the native sessionStep 2: make the profile, User-Agent and headers agree
The most common self-inflicted 403 is a contradiction: a chrome_120 handshake under a User-Agent that claims Chrome 150, or a Firefox UA on a Chrome profile. Cloudflare sees both. Pick a recent profile, send the User-Agent of that exact browser and version, and set a browser-like header order (fhttp's HeaderOrderKey in Go). Keep cookies in one jar per identity so cookies Cloudflare sets come back on the next request.
Do not randomise into nonsense. random_tls_extension_order mirrors what Chrome itself does, but inventing combinations that no real browser sends makes you stand out more than an old profile would.
package main
import (
"fmt"
http "github.com/bogdanfinn/fhttp"
tls_client "github.com/bogdanfinn/tls-client"
"github.com/bogdanfinn/tls-client/profiles"
)
func main() {
jar := tls_client.NewCookieJar()
options := []tls_client.HttpClientOption{
tls_client.WithTimeoutSeconds(30),
tls_client.WithClientProfile(profiles.Chrome_150), // the README's example profile
tls_client.WithNotFollowRedirects(),
tls_client.WithCookieJar(jar),
tls_client.WithProxyUrl("http://user:pass@host:port"),
}
client, err := tls_client.NewHttpClient(tls_client.NewNoopLogger(), options...)
if err != nil {
panic(err)
}
req, _ := http.NewRequest(http.MethodGet, "https://target-site.com/", nil)
req.Header = http.Header{
// The UA must describe the SAME browser and version as the profile
"user-agent": {"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36"},
"accept": {"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
"accept-language": {"en-US,en;q=0.9"},
http.HeaderOrderKey: {"user-agent", "accept", "accept-language"},
}
resp, err := client.Do(req)
if err != nil {
panic(err) // "failed to do request: ... EOF" usually means proxy or network trouble
}
defer resp.Body.Close()
fmt.Println(resp.StatusCode, resp.Header.Get("cf-mitigated"))
}Step 3: pick a maintained Python wrapper
Several Python packages load the same Go library. Their state on 2026-12-01:
- Profile names differ between the Go library and wrappers. The Go library had chrome_154 on 2026-12-01; the FlorianREGAZ wrapper's list stopped at chrome_152. Check the wrapper's settings.py before relying on a name.
- hrequests combines tls-client with a Camoufox/Patchright browser mode. It worked well in its time, but with no update since December 2024 its fingerprints are old; prefer a maintained client.
| PyPI package | Latest release | Notes |
|---|---|---|
| tls-client (FlorianREGAZ) | 2.0.0, 2026-10-10 | Active again after a 2.5-year gap; adds AsyncSession and Session.close(); profiles up to chrome_152, firefox_148, safari_ios_26_0. |
| noble-tls | 0.1.9, 2026-02-27 | Async; auto-updates the bogdanfinn library. |
| wrapper-tls-requests (import tls_requests) | 1.2.5, 2026-02-23 | requests-like API built on tls-client. |
| async-tls-client | 2.2.0, 2026-03-23 | Async fork. |
| hrequests | 0.9.2, 2024-12-01 | No release in two years; newest fingerprints Chrome 132 and Firefox 131. |
Sources: PyPI JSON and each project's repository, checked 2026-12-01. There is no PyPI package named tls-requests.
Step 4: shared-library, EOF and memory errors
- Alpine/musl: "Error relocating ... tls-client-x86.so: __vfprintf_chk: symbol not found" (#92). The prebuilt libraries target glibc. Use a Debian-based image; tls-client 2.0.0 now raises UnsupportedPlatformError on musl instead of crashing.
- Apple Silicon and ARM: "incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')" (#65) means the interpreter and the library do not match. Upgrade the wrapper and check that python -c "import platform; print(platform.machine())" prints the architecture you expect.
- "failed to do request: ... EOF": tls-client issue #66 lists proxies that limit concurrent connections and MTU trouble with post-quantum key exchange as causes. Test the same request without the proxy, then with a profile that has no _PQ suffix.
- Memory growth: issue #165 reported RSS climbing on large responses; a contributor showed it returns to baseline after freeMemory and garbage collection. Close sessions, and reuse one session per identity instead of creating thousands.
Step 5: the IP is part of the fingerprint
If the same code gets 200 from a home connection and 403 from a server, the IP is the problem. Datacenter ranges are challenged far more often. Use a better proxy, keep one IP per session (a cf_clearance earned on one IP and replayed from another is usually challenged again) and rotate between sessions, not inside one.
Replay cf_clearance with a matching Safari iOS profile
When every response carries cf-mitigated: challenge, let something that runs JavaScript earn the cookie and keep tls-client as the fast fetcher. Three things must match the client that earned it: the exact User-Agent, the egress IP, and a TLS fingerprint from the same browser family. See the cf_clearance cookie guide for why.
NSLSolver's challenge type returns cookies (including cf_clearance) and a user_agent, solving server-side with no browser on your machines. The clearance is issued for an iPhone Safari browser, so replay it with an iOS Safari profile (safari_ios_26_0 in the Python wrapper) through the same proxy.
import requests
import tls_client
TARGET = "https://target-site.com/"
PROXY = "http://user:pass@sticky-proxy.example.com:8080" # same exit IP for solve AND replay
data = requests.post(
"https://api.nslsolver.com/solve",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"type": "challenge",
"url": TARGET,
"site_key": "0x4AAAAAAA...", # the challenge widget id
"proxy": PROXY, # required for challenge
# no user_agent: the clearance is issued for an iPhone Safari browser
},
timeout=120,
).json()
# Replay with an iOS Safari TLS profile so fingerprint and UA describe one browser
session = tls_client.Session(client_identifier="safari_ios_26_0")
session.headers.update({"User-Agent": data["user_agent"]})
session.cookies.update(data["cookies"]) # includes cf_clearance
try:
r = session.get(TARGET, proxy=PROXY)
print(r.status_code, r.headers.get("cf-mitigated"))
finally:
session.close()When to use a solver API
Profiles, headers and proxies fix fingerprint and reputation problems; none of them fixes a challenge. If challenges are your bottleneck, NSLSolver's Cloudflare Challenge solver returns cf_clearance in about 3.3 seconds on average for $1.00 per 1,000. For pages with a Turnstile widget, the Turnstile solver returns a token in about 250 ms for $0.80 per 1,000. Failed solves are free, and new accounts get free credit with Google, Gmail or Proton sign-up. Error 1020 blocks cannot be solved by anyone. Only automate sites you own or are authorised to access.
Related guides
- Cloudflare Challenge solver API: cf_clearance plus the user_agent to replay.
- curl_cffi Cloudflare 403: the other popular impersonating client.
- Cloudflare 403 Forbidden in Python requests: where plain requests stops.
- The cf_clearance cookie explained: what it is bound to and how long it lasts.
- Open-source CAPTCHA solvers in 2026: the wider landscape by protection type.
Sources (checked 2026-12-01)
- GitHub: bogdanfinn/tls-client (README, releases)
- tls-client profiles.go (profile names, default profile)
- tls-client issue #66: failed to do request EOF
- tls-client issue #165: memory growth from Python
- GitHub: FlorianREGAZ/Python-Tls-Client
- Python-Tls-Client issue #121: unable to bypass Cloudflare
- Python-Tls-Client issue #92: Alpine symbol not found
- PyPI: tls-client 2.0.0
- PyPI: noble-tls
- GitHub: daijro/hrequests
- Cloudflare docs: JA3/JA4 fingerprint