Playwright + Browser-Use Agents Behind Corporate Proxies: How to prevent TLS inspection certificate errors and CDP WebSocket drops in Docker?
We containerized our Playwright / Browser-Use autonomous web agents in mcr.microsoft.com/playwright/python Docker images for enterprise customers behind corporate TLS-inspecting proxies (Zscaler / Palo Alto).
What Fails
Even after copying the corporate root .crt into /usr/local/share/ca-certificates/ and running update-ca-certificates + export NODE_EXTRA_CA_CERTS=...:
- Headless Chromium still aborts external HTTPS navigation with
net::ERR_CERT_AUTHORITY_INVALID. - Worse,
HTTP_PROXY/HTTPS_PROXYcauses Playwright's own internal CDP WebSocket (ws://127.0.0.1:xxxxx) traffic to attempt routing through the corporate proxy, hangingpage.goto()indefinitely!
Why does Chromium ignore Linux /etc/ssl/certs inside Docker, and how do we properly wire the corporate CA without disabling TLS verification globally?