Skip to content

Stealth Chromium that passes every bot detection test. Drop-in Playwright replacement with source-level fingerprint patches. 50+ tests passed.

fix(cloakserve): run the GeoIP lookup off the event loop

CloakHQ8a5dafd5520f
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4484060..c5a967b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,8 @@ Changes are tagged: **[wrapper]** for Python/JS wrapper, **[binary]** for Chromi
## [Unreleased]
- **[wrapper]** `cloakserve`: `geoip=true` now works without a proxy and sets the timezone and locale from the machine's public IP (#658)
+- **[wrapper]** `cloakserve`: the GeoIP lookup runs off the event loop, so other connected clients no longer stall while a `geoip=true` launch resolves its timezone and locale
+- **[wrapper]** `cloakserve --headless=false` now runs headed. The flag was also forwarded to Chrome, which treats any `--headless` switch as headless, so no window opened on the display (#651)
- **[docker]** The Docker image ships Node.js 24 LTS instead of Node.js 20 (end of life). The JS wrapper still supports Node `^20.19.0 || >=22.12.0`.
## [0.7.3] — 2026-11-20
diff --git a/README.md b/README.md
index ba734bc..cc5002b 100644
--- a/README.md
+++ b/README.md
@@ -1018,6 +1018,9 @@ b3 = pw.chromium.connect_over_cdp(
"http://localhost:9222?fingerprint=33333"
"&proxy=http://proxy:8080&geoip=true"
)
+
+# No proxy: geoip=true uses the machine's own public IP
+b4 = pw.chromium.connect_over_cdp("http://localhost:9222?fingerprint=44444&geoip=true")
```
Supported query params: `fingerprint`, `timezone`, `locale`, `platform`, `platform-version`, `gpu-vendor`, `hardware-concurrency`, `device-memory`, `screen-width`, `screen-height`, `proxy`, `geoip`. Same seed reuses the same process (first connection's params win). No seed = shared default process (backward compatible).
@@ -1426,7 +1429,8 @@ Issues and PRs welcome. If something isn't working, [open an issue](https://gith
- [@pujitha24](https://github.com/pujitha24) — cloakserve WebSocket heartbeat for vanished clients
- [@w21180239](https://github.com/w21180239) — Playwright-compatible `context.close(reason=...)`
- [@alkaz-nodemaven](https://github.com/alkaz-nodemaven) — GeoIP private proxy address fix
-- [@mvanhorn](https://github.com/mvanhorn) — Python `build_launch_options()` for your own Playwright instance
+- [@mvanhorn](https://github.com/mvanhorn) — Python `build_launch_options()` for your own Playwright instance, cloakserve headed mode fix
+- [@adityaanikam](https://github.com/adityaanikam) — cloakserve GeoIP without a proxy
## Star History
diff --git a/bin/cloakserve b/bin/cloakserve
index 2d9cd92..be73dd4 100755
--- a/bin/cloakserve
+++ b/bin/cloakserve
@@ -349,7 +349,10 @@ class ChromePool:
# Resolve geoip if requested
exit_ip = None
if geoip:
- timezone, locale, exit_ip = maybe_resolve_geoip(True, proxy, timezone, locale, extra_args)
+ # Blocking network lookup: run it off the event loop so other clients' CDP traffic keeps flowing
+ timezone, locale, exit_ip = await asyncio.to_thread(
+ maybe_resolve_geoip, True, proxy, timezone, locale, extra_args
+ )
# Build Chrome args via shared logic
fp_extra = [f"--fingerprint={actual_seed}"]
diff --git a/tests/test_cloakserve.py b/tests/test_cloakserve.py
index 5c22be6..d92159d 100644
--- a/tests/test_cloakserve.py
+++ b/tests/test_cloakserve.py
@@ -5,6 +5,7 @@ import importlib.machinery
import importlib.util
import json
import sys
+import threading
from pathlib import Path
from types import SimpleNamespace
from unittest.mock import MagicMock, patch
@@ -659,12 +660,20 @@ class TestConnectionTracking:
mock_popen.return_value = MagicMock(pid=12345, **{"poll.return_value": None})
pool = self._make_pool()
resolved = ("Asia/Kolkata", "en-IN", None)
+ threads = []
+
+ def fake_resolve(*args):
+ threads.append(threading.current_thread())
+ return resolved
+
with patch.object(pool, "_wait_for_cdp", return_value=True), patch.object(
- _mod, "maybe_resolve_geoip", return_value=resolved
+ _mod, "maybe_resolve_geoip", side_effect=fake_resolve
) as resolve:
await pool.get_or_launch("seed1", geoip=True)
resolve.assert_called_once_with(True, None, None, None, None)
+ # The blocking lookup must not run on the event loop thread
+ assert threads[0] is not threading.main_thread()
assert "--fingerprint-timezone=Asia/Kolkata" in mock_popen.call_args.args[0]
asyncio.run(run())