Skip to content

ProxyConfiguration

Carl edited this page Apr 11, 2022 · 8 revisions

Since release 71.0.3578.88 it is possible to fully configure proxies used by Bromite.

The user-specified proxy configuration in Bromite takes precedence over the Android system proxy configuration, if any.

NOTE: DNS-over-HTTPS does not use these proxy settings.

The proxy configuration page is available under Settings -> Privacy -> Proxy configuration, or directly by visiting the chrome:https://proxy URL.

The proxy lists must be specified in PAC format; you will use PAC rules and not PAC scripts.

Examples

PROXY w3proxy.netscape.com:8080; PROXY mozilla.netscape.com:8081
PROXY w3proxy.netscape.com:8080; PROXY mozilla.netscape.com:8081; DIRECT
PROXY w3proxy.netscape.com:8080; SOCKS socks:1080

Bypass rules

Bypass rules are used to describe the set of URLs that should bypass the use of a proxy. The rules are expressed as an ordered list of rules, which can be thought of as being evaluated left-to-right. Order only matters when mixing "negative rules" with "positive rules".

Adds a rule given by the string |raw|. The format of |raw| can be any of the following:

(1) [ URL_SCHEME ":https://" ] HOSTNAME_PATTERN [ ":" <port> ]

Match all hostnames that match the pattern HOSTNAME_PATTERN.

Examples:

    "foobar.com", "*foobar.com", "*.foobar.com", "*foobar.com:99",
    "https://x.*.y.com:99"

(2) "." HOSTNAME_SUFFIX_PATTERN [ ":" PORT ]

Match a particular domain suffix.

Examples:

    ".google.com", ".com", "http:https://.google.com"

(3) [ SCHEME ":https://" ] IP_LITERAL [ ":" PORT ]

Match URLs which are IP address literals.

Conceptually this is the similar to (1), but with special cases to handle IP literal canonicalization. For example matching on "[0:0:0::1]" would be the same as matching on "[::1]" since the IPv6 canonicalization is done internally.

Examples:

    "127.0.1", "[0:0::1]", "[::1]", "http:https://[::1]:99"

(4) IPV4_LITERAL "/" PREFIX_LENGTH_IN_BITS

Match any URL that is an IPv4 literal that falls between the given range.

Examples:

    "192.168.1.1/16"

(5) IPV6_LITERAL "/" PREFIX_LENGTH_IN_BITS

Match any URL that is an IPv6 literal that falls between the given range.

Note that IPV6_LITERAL must not be bracketed. "[fefe::/40]" for instance is not valid, but "fefe::/40" is. This notation comes from macOS's proxy bypass rules which supports IPv6 (Windows bypass rules do not).

Examples:

    "fefe:13::abc/33".

(6) "<local>"

Matches hostnames without a period in them (and are not IP literals).

This is equivalent to the same named bypass rule on Windows.

(7) "<-loopback>"

Subtracts the implicit proxy bypass rules (localhost and link local addresses), so they are no longer bypassed.

This is equivalent to the same named bypass rule on Windows.

How does auto-detect work?

Auto-detect performs the following attempts in sequence:

  1. WPAD DHCP: attempts to retrieve the most appropriate PAC script configured via DHCP
  2. WPAD DNS: attempts to retrieve directly the PAC script at http:https://wpad/wpad.dat

Notes about the DNS approach

Note that we not use DNS devolution to find the WPAD host, since that could be dangerous should our top level domain registry become out of date.

Instead we directly resolve "wpad", and let the operating system apply the DNS suffix search paths. This is the same approach taken by Firefox, and compatibility hasn't been an issue.

For more details, also check out this comment: http:https://code.google.com/p/chromium/issues/detail?id=18575#c20

(from https://github.com/chromium/chromium/blob/71.0.3578.88/net/proxy_resolution/pac_file_decider.cc#L48)

Read more about Proxy auto-config using WPAD in Chromium: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/proxy_auto_config.md

Clone this wiki locally