Skip to Content
Open source editionGuidesConfigure a proxy

Configure a proxy

Lightpanda supports HTTP and HTTPS proxies with basic or bearer authentication. You can configure the proxy when starting the browser.

Configure HTTP proxy

Use the CLI option --http_proxy when starting Lightpanda to configure the proxy. Ensure your proxy address starts with http:// or https://.

Use a local proxy with the fetch command:

./lightpanda fetch --http_proxy http://127.0.0.1:3000 https://lightpanda.io

Or configure the proxy with serve for the CDP server. All outgoing requests will use the proxy.

./lightpanda serve --http_proxy http://127.0.0.1:3000

HTTP proxy with basic auth

You can configure basic auth for the proxy using the username:password@ format in the proxy address. It works for both fetch and serve commands.

./lightpanda fetch --http_proxy 'http://me:my-password@127.0.0.1:3000' https://lightpanda.io

HTTP proxy with bearer auth

Lightpanda supports bearer auth to authenticate with the --proxy_bearer_token. It works for both fetch and serve commands.

This option will add a Proxy-Authorization header all the outgoing requests.

./lightpanda fetch --http_proxy 'http://127.0.0.1:3000' --proxy_bearer_token 'MY-TOKEN' https://lightpanda.io