ProxyConfig Type
When mode is unspecified, pacScript and proxyRules are provided together, the proxyRules option is ignored and pacScript configuration is applied.The
proxyRules has to follow the rules below:For example:* http=foopy:80;ftp=foopy2 - Use HTTP proxy foopy:80 for http:// URLs, and HTTP proxy
foopy2:80 for ftp:// URLs.* foopy:80 - Use HTTP proxy foopy:80 for all URLs.* foopy:80,bar,direct:// - Use HTTP proxy foopy:80 for
all URLs, failing over to bar if foopy:80 is unavailable, and after that using no proxy.* socks4://foopy - Use SOCKS
v4 proxy foopy:1080 for all URLs.* http=foopy,socks5://bar.com - Use HTTP proxy foopy for http URLs, and fail over to the
SOCKS5 proxy bar.com if foopy is unavailable.* http=foopy,direct:// - Use HTTP proxy foopy for http URLs, and use no proxy
if foopy is unavailable.* http=foopy;socks=foopy2 - Use HTTP proxy foopy for http URLs, and use socks4://foopy2 for all other URLs.The
proxyBypassRules is a comma separated list of rules described below:* [ URL_SCHEME "://" ] HOSTNAME_PATTERN [ ":"
Constructors
| Constructor |
Description
|
Full Usage:
ProxyConfig(?mode, ?pacScript, ?proxyRules, ?proxyBypassRules)
Parameters:
Mode
-
The proxy mode. Should be one of direct, auto_detect, pac_script, fixed_servers or system. Defaults to pac_script proxy mode if
pacScript option is specified otherwise defaults to fixed_servers.
?pacScript : string
-
The URL associated with the PAC file.
?proxyRules : string
-
Rules indicating which proxies to use.
?proxyBypassRules : string
-
Rules indicating which URLs should bypass the proxy settings.
Returns: ProxyConfig
|
|
Instance members
| Instance member |
Description
|
Full Usage:
this.mode
|
The proxy mode. Should be one of direct, auto_detect, pac_script, fixed_servers or system. Defaults to pac_script proxy mode if pacScript option is specified otherwise defaults to fixed_servers. |
Full Usage:
this.pacScript
|
The URL associated with the PAC file. |
Full Usage:
this.proxyBypassRules
|
Rules indicating which URLs should bypass the proxy settings. |
Full Usage:
this.proxyRules
|
Rules indicating which proxies to use. |
fable-electron-docs-api