Monday, May 6, 2013

Chrome browser commandline switches

Chrome has a prodigious number of command line switches to control all sorts of behaviour. I recently ran into this one, which I think will be handy. From the review log:
Added the flag --host-resolver-rules=XXX in r39342.

Where XXX is a comma separated list of rules that control how hostnames are resolved.

For example:
    "MAP * 127.0.0.1" --> Forces all hostnames to be resolved to 127.0.0.1
    "MAP *.google.com proxy" --> Forces all google.com subdomains to be
                                 resolved to "proxy".
    "MAP test.com [::1]:77 --> Forces "test.com" to resolve to IPv6 loopback.
                               Will also force the port of the resulting
                               socket address to be 77.
    "MAP * baz, EXCLUDE www.google.com" --> Remaps everything to "baz",
                                            except for "www.google.com".

No comments: