Skip to content

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

fix(bin): honor cloakserve headed mode (#652)

Matt Van Horn09b1bf62a2fa
diff --git a/bin/cloakserve b/bin/cloakserve
index 6753c19..0f16e04 100755
--- a/bin/cloakserve
+++ b/bin/cloakserve
@@ -878,7 +878,6 @@ def parse_cli_args(argv: list[str]) -> tuple[dict, list[str]]:
config["exit_after_idle"] = _parse_idle_timeout(arg.split("=", 1)[1], "--exit-after-idle")
elif arg == "--headless=false" or arg == "--headless=False":
config["headless"] = False
- passthrough.append(arg)
elif arg.startswith(consumed_prefixes):
pass # Strip these silently
# Route through build_args() so companion flags are set correctly
diff --git a/tests/test_cloakserve.py b/tests/test_cloakserve.py
index 46303e0..27ebe34 100644
--- a/tests/test_cloakserve.py
+++ b/tests/test_cloakserve.py
@@ -100,11 +100,11 @@ class TestParseCliArgs:
config, _ = parse_cli_args(["--port=8080"])
assert config["port"] == 8080
- def test_headless_false(self):
- config, passthrough = parse_cli_args(["--headless=false"])
+ @pytest.mark.parametrize("flag", ["--headless=false", "--headless=False"])
+ def test_headless_false(self, flag):
+ config, passthrough = parse_cli_args(["--no-sandbox", flag, "--disable-gpu"])
assert config["headless"] is False
- # headless flag still passed through to Chrome
- assert "--headless=false" in passthrough
+ assert passthrough == ["--no-sandbox", "--disable-gpu"]
def test_strips_remote_debugging_flags(self):
args = ["--remote-debugging-port=9999", "--remote-debugging-address=0.0.0.0", "--no-sandbox"]