FixedServersProxyConfig
Sends traffic through the proxy servers named in proxyRules.
Example
import { session } from '@mobrowser/api';
session.setProxy({
mode: 'fixedServers',
proxyRules: 'http=proxy.example.com:80;https=proxy.example.com:443',
exceptions: 'localhost,127.0.0.1,*.internal.example.com'
})
Properties
mode
readonly mode: 'fixedServers';
Names the configuration as the fixed-servers one, which is set with
proxyRules and, where some hosts are to be left alone, exceptions.
proxyRules
readonly proxyRules: string;
The proxy servers to use, as a semicolon-separated list of
<scheme>=<proxy> entries such as
'http=proxy.example.com:80;https=secure.example.com:443'.
A bare 'proxy.example.com:80' with no scheme applies to every scheme.
A proxy may name its own scheme, as in 'socks5://proxy.example.com';
without one it is treated as an HTTP proxy.
exceptions
readonly exceptions?: string;
The hosts reached without a proxy, as a comma-separated list of patterns
such as '*.internal.example.com,192.168.0.0/16'.
Loopback addresses are always reached without a proxy, whether or not
they appear here, which is worth knowing when a proxy appears to be
ignored while testing against a local server. Include the '<-loopback>'
pattern to route them through the proxy after all.
Every other host goes through the proxy when this is omitted.