curl_cffi Engine
Mangasurf's HTTP layer — real browser impersonation and a fast async batch engine.
boltWhy curl_cffi
Mangasurf is 100% curl_cffi. The requests package has been removed entirely; every page fetch, image download and batch request flows through mangasurf/http.py. curl_cffi is a thin, native C binding over libcurl and is much faster per request than urllib3, the engine behind requests.
fingerprintBrowser impersonation
By default every request impersonates a real Chrome over TLS, sending a genuine JA3/JA4 fingerprint. Cloudflare and Akamai bot checks that reject vanilla clients are passed automatically.
# Switch the fingerprint at runtime
MANGASURF_IMPERSONATE=safari python gui.py
MANGASURF_IMPERSONATE=firefox python gui.py
speedFast async engine
The chapter downloader sprays every page across a single libcurl multi handle (http.download_many / Source.download_many), so a 30-page chapter arrives in roughly one page's latency instead of thirty round trips. Downloads remain atomic: each page streams to a .part file and is renamed only after magic-byte validation.
from mangasurf import http
responses = http.fetch_many([url1, url2, url3], timeout=15) # concurrent GET
ok = http.download_many([{"url": u, "path": p}, ...]) # concurrent stream
codeRequests-style API
Source plugins keep calling session.get(...).json(), and the exception names you're used to still work — they're aliased to curl_cffi exceptions (RequestException, Timeout, SSLError, HTTPError, ...).
settingsConfiguration
| Variable | Effect |
|---|---|
MANGASURF_IMPERSONATE | Browser profile (default chrome) |
HTTP_PROXY / HTTPS_PROXY | Proxy support for curl_cffi |