Chrome Flags Reference

Chrome command line switches and startup flags for automation, headless mode, and debugging.

--ip-address-space-overrides

What does --ip-address-space-overrides do?

Specifies manual overrides to the IP endpoint -> IP address space mapping. This allows running local tests against "public" and "local" IP addresses. This switch is specified as a comma-separated list of overrides. Each override is an equals-separated "<endpoint|ip-range>=<address space>" pair. Grammar, in pseudo-BNF format: switch := override-list override-list := override “,” override-list | <nil> override := (ip-endpoint | ip_range) “=” address-space address-space := “public” | “private” | “local” | "loopback" ip-endpoint := ip-address ":" port ip-address := see `net::ParseURLHostnameToAddress()` for details port := integer in the [0-65535] range ip-range := ip-address "/" bitmask bitmask := integer in the [0-128] range Any invalid entries in the comma-separated list are ignored. If the port specified is 0, all ports for the given ip-address will be overridden. See also the design doc: https://docs.google.com/document/d/1-umCGylIOuSG02k9KGDwKayt3bzBXtGwVlCQHHkIcnQ/edit# And the Web Platform Test RFC #72 behind it: https://github.com/web-platform-tests/rfcs/blob/master/rfcs/address_space_overrides.md Note that since the doc and the RFC were written, the address space names have changed slightly due to Local Network Access (LNA) replacing Private Network Access (PNA).

Usage

CLILaunch Chrome with --ip-address-space-overrides using CLI

chrome --ip-address-space-overrides

PuppeteerLaunch Chrome with --ip-address-space-overrides using Puppeteer

const browser = await puppeteer.launch({
  args: ['--ip-address-space-overrides']
});

PlaywrightLaunch Chrome with --ip-address-space-overrides using Playwright

const browser = await chromium.launch({
  args: ['--ip-address-space-overrides']
});

SeleniumLaunch Chrome with --ip-address-space-overrides using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--ip-address-space-overrides')

driver = webdriver.Chrome(options=options)