From 7fd966014fe424f690fc6680f21ea8d91626e5c4 Mon Sep 17 00:00:00 2001 From: Daniel Dolezal Date: Sun, 3 May 2026 12:42:59 +0200 Subject: [PATCH] set alpn protocol to browser-cli prevent h2/http1.1 ALPN confusion --- browser_cli/client.py | 1 + 1 file changed, 1 insertion(+) diff --git a/browser_cli/client.py b/browser_cli/client.py index 9dca4b5..3bffe7b 100644 --- a/browser_cli/client.py +++ b/browser_cli/client.py @@ -250,6 +250,7 @@ def _send_remote(endpoint: str, msg: dict, private_key=None) -> bytes | None: if port == 443: import ssl ctx = ssl.create_default_context() + ctx.set_alpn_protocols(["browser-cli"]) # prevent h2/http1.1 ALPN confusion sock = ctx.wrap_socket(raw_sock, server_hostname=host) else: sock = raw_sock