Stealth Chromium that passes every bot detection test. Drop-in Playwright replacement with source-level fingerprint patches. 50+ tests passed.
Python ai-agentsanti-detectantidetect-browserbot-detectionbrowser-automationcaptcha-bypasschromiumcloudflarecloudflare-bypassfingerprintheadless-browserplaywrightpuppeteerpythonrecaptchaseleniumstealth-browserundetectedweb-scrapingwebscraping
fix(license): point exit-78 errors to proxy troubleshooting
CloakHQcda621bdeee9
diff --git a/README.md b/README.mdindex 7e67415..35343db 100644--- a/README.md+++ b/README.md@@ -1263,6 +1263,40 @@ playwright install-deps chromium---+### License check fails behind a proxy (exit code 78)++"Couldn't verify your license" (exit code 78) means the browser's own license check didn't reach cloakbrowser.dev. The browser makes this check itself on every launch, separately from the Python/Node calls that validate your key and download the binary, so those can work while the launch still fails. It typically happens on networks without direct internet access: corporate proxies, CI runners, sandboxed VMs.++1. **Pass the proxy to the launcher.** The license check uses the proxy from `launch(proxy=...)`. It doesn't use the `HTTP_PROXY` / `HTTPS_PROXY` / `NO_PROXY` environment variables.+2. **If something intercepts TLS on direct connections, add `--license-route=proxy`.** By default the check tries a direct connection first and retries through your proxy when the direct one can't connect. A certificate error on the direct connection ends the check instead of retrying, so a network that intercepts direct TLS needs the proxy route forced:++```python+from cloakbrowser import launch_persistent_context++ctx = launch_persistent_context(+ "./profile-1",+ headless=False,+ proxy="http://user:pass@proxy-host:3128",+ geoip=True,+ humanize=True, human_preset="careful",+ args=["--fingerprint-allow-3p-cookies", "--license-route=proxy"],+)+```++3. **If your proxy re-signs TLS with its own CA, trust that CA in Chromium's certificate database.** On Linux, Chromium doesn't read the system bundle (`/etc/ssl/certs`) that curl and Python use. It reads the NSS database in `~/.pki/nssdb`, so curl can work through the proxy while the browser rejects the certificate. Add the CA once, as the user that runs the browser (`certutil` comes from `libnss3-tools` on Debian/Ubuntu):++```bash+mkdir -p ~/.pki/nssdb+certutil -d sql:$HOME/.pki/nssdb -N --empty-password # only if ~/.pki/nssdb has no cert9.db yet+certutil -d sql:$HOME/.pki/nssdb -A -t C,, -n proxy-ca -i /path/to/proxy-ca.pem+```++4. **Proxy credentials are sent after a `407` challenge.** Like regular Chrome, the browser sends the proxy username and password only when the proxy answers `407 Proxy Authentication Required`. If the proxy refuses the connection with another status (for example `403`), the credentials are never sent and the launch fails. curl sends credentials up front, so curl working through the proxy doesn't prove the browser will.++`cloakbrowser info` shows "Launch: ✓" when the binary runs (`--version`). That check doesn't contact the license server or use your proxy.++---+### Sites challenge every visit`launch()` starts with an empty profile each time, so every visit looks like a new visitor. Use `launch_persistent_context()` so cookies and storage carry over and you come back as a returning visitor:diff --git a/cloakbrowser/license.py b/cloakbrowser/license.pyindex f76e05e..5637c97 100644--- a/cloakbrowser/license.py+++ b/cloakbrowser/license.py@@ -118,7 +118,10 @@ _LICENSE_EXIT_MESSAGES = {),78: ("CloakBrowser Pro: couldn't verify your license (license server "- "unreachable or a connection problem)."+ "unreachable or a connection problem). Behind a proxy or without "+ "direct internet access? Pass the proxy to launch(proxy=...) (proxy "+ "environment variables aren't used for this check) and see "+ "https://github.com/CloakHQ/cloakbrowser#license-check-fails-behind-a-proxy-exit-code-78"),79: ("CloakBrowser Pro: local configuration problem. Either ~/.cloakbrowser "diff --git a/dotnet/src/CloakBrowser/License.cs b/dotnet/src/CloakBrowser/License.csindex 959575c..c8cc5d2 100644--- a/dotnet/src/CloakBrowser/License.cs+++ b/dotnet/src/CloakBrowser/License.cs@@ -118,7 +118,7 @@ public static class License{[76] = "CloakBrowser Pro: session limit reached for your plan. Close another running session or upgrade your plan. Always close with await browser.CloseAsync() (e.g. in a finally block). A session that crashed or was killed frees its seat automatically within 4 min (free/trial/solo), 15 min (team) or 30 min (business/scale).",[77] = "CloakBrowser Pro: license key is invalid, expired, or missing. Check CLOAKBROWSER_LICENSE_KEY.",- [78] = "CloakBrowser Pro: couldn't verify your license (license server unreachable or a connection problem).",+ [78] = "CloakBrowser Pro: couldn't verify your license (license server unreachable or a connection problem). Behind a proxy or without direct internet access? Pass the proxy in LaunchOptions.Proxy (proxy environment variables aren't used for this check) and see https://github.com/CloakHQ/cloakbrowser#license-check-fails-behind-a-proxy-exit-code-78",[79] = "CloakBrowser Pro: local configuration problem. Either ~/.cloakbrowser is not writable, or the --license-route value is invalid (use auto, direct, or proxy with a proxy set).",};diff --git a/js/src/license.ts b/js/src/license.tsindex 11c33e5..83f6c61 100644--- a/js/src/license.ts+++ b/js/src/license.ts@@ -74,7 +74,7 @@ export class CloakBrowserLicenseError extends Error {const LICENSE_EXIT_MESSAGES: Record<number, string> = {76: "CloakBrowser Pro: session limit reached for your plan. Close another running session or upgrade your plan. Always close with await browser.close() (e.g. in a finally block). A session that crashed or was killed frees its seat automatically within 4 min (free/trial/solo), 15 min (team) or 30 min (business/scale).",77: "CloakBrowser Pro: license key is invalid, expired, or missing. Check CLOAKBROWSER_LICENSE_KEY.",- 78: "CloakBrowser Pro: couldn't verify your license (license server unreachable or a connection problem).",+ 78: "CloakBrowser Pro: couldn't verify your license (license server unreachable or a connection problem). Behind a proxy or without direct internet access? Pass the proxy to launch({ proxy }) (proxy environment variables aren't used for this check) and see https://github.com/CloakHQ/cloakbrowser#license-check-fails-behind-a-proxy-exit-code-78",79: "CloakBrowser Pro: local configuration problem. Either ~/.cloakbrowser is not writable, or the --license-route value is invalid (use auto, direct, or proxy with a proxy set).",};diff --git a/js/tests/license.test.ts b/js/tests/license.test.tsindex 1f5edf6..4c0a484 100644--- a/js/tests/license.test.ts+++ b/js/tests/license.test.ts@@ -97,7 +97,7 @@ describe("validateLicense", () => {key_sha256: keySha,valid: true,plan: "team",- expires: "2026-12-01",+ expires: "2099-12-31",validated_at: Date.now() / 1000,}));@@ -166,7 +166,7 @@ describe("validateLicense", () => {key_sha256: keySha,valid: true,plan: "solo",- expires: "2026-12-01",+ expires: "2099-12-31",validated_at: Date.now() / 1000 - 90000,}));diff --git a/tests/test_license.py b/tests/test_license.pyindex 0060dfa..3d18aee 100644--- a/tests/test_license.py+++ b/tests/test_license.py@@ -80,7 +80,7 @@ class TestValidateLicense:"key_sha256": key_sha,"valid": True,"plan": "team",- "expires": "2026-12-01",+ "expires": "2099-12-31","validated_at": time.time(),}))@@ -149,7 +149,7 @@ class TestValidateLicense:"key_sha256": key_sha,"valid": True,"plan": "solo",- "expires": "2026-12-01",+ "expires": "2099-12-31","validated_at": time.time() - 90000,}))