open-wa
DocsProxying a session

Proxying a session

Route Chromium traffic through an outbound proxy when your network requires it.

Proxying a session

The Easy API starts Chromium with the browser arguments in chromiumArgs. Use Chromium's --proxy-server option when the session must use an outbound proxy. The current runtime does not apply proxy username/password credentials from proxyServerCredentials; use a proxy that allows the runtime host's IP or another network-level authentication method.

Configure an HTTP proxy

Create wa.config.mjs with the proxy address supplied by your provider:

export default {
  sessionId: 'sales',
  host: '127.0.0.1',
  port: 8080,
  chromiumArgs: ['--proxy-server=http://proxy.example:1234'],
};

Start Easy API with the same session and address values:

npx @open-wa/wa-automate@5.1.0 \
  --config ./wa.config.mjs \
  --session-id sales \
  --host 127.0.0.1 \
  --port 8080

The CLI flags make the selected session and listener explicit. Keep the proxy hostname reachable from the machine or container running Chromium. For a SOCKS proxy, pass the scheme and endpoint your provider supports, such as --proxy-server=socks5://proxy.example:1080.

Check the connection

From the runtime host, check that the proxy accepts a request:

curl -x 'http://proxy.example:1234' https://api.ipify.org

This checks the proxy route from the shell; it does not confirm Chromium used the same route. After the session starts, complete authentication and exercise the browser paths your application depends on, including reconnect and media transfer. Review the runtime logs for navigation, WebSocket, or network errors.

Authentication limits

The proxyServerCredentials config shape is present in the configuration schema, but the current runtime does not wire its username or password into Chromium. Do not put credentials in --proxy-server URLs or checked-in config. Use a provider that supports source-IP allowlisting, a proxy reachable only on a protected network, or an authentication mechanism configured outside this runtime.

Was this helpful?

Your answer includes the page path and docs version.

On this page