Objet ProxyConfig
modestring (facultatif) - Le mode de proxy. Doit êtredirect,auto_detect,pac_script,fixed_serversousystem. Defaults topac_scriptproxy mode ifpacScriptoption is specified otherwise defaults tofixed_servers.direct- En mode direct, toutes les connexions sont créées directement, sans aucun proxy.auto_detect- In auto_detect mode the proxy configuration is determined by a PAC script that can be downloaded at http://wpad/wpad.dat.pac_script- In pac_script mode the proxy configuration is determined by a PAC script that is retrieved from the URL specified in thepacScript. This is the default mode ifpacScriptis specified.fixed_servers- In fixed_servers mode the proxy configuration is specified inproxyRules. This is the default mode ifproxyRulesis specified.system- In system mode the proxy configuration is taken from the operating system. Notez que le mode system est différent de celui obtenu en absence de configuration de proxy. In the latter case, Electron falls back to the system settings only if no command-line options influence the proxy configuration.
pacScriptstring (optional) - The URL associated with the PAC file.proxyRulesstring (optional) - Rules indicating which proxies to use.proxyBypassRulesstring (optional) - Rules indicating which URLs should bypass the proxy settings.
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:
proxyRules = schemeProxies[";"<schemeProxies>]
schemeProxies = [<urlScheme>"="]<proxyURIList>
urlScheme = "http" | "https" | "ftp" | "socks"
proxyURIList = <proxyURL>[","<proxyURIList>]
proxyURL = [<proxyScheme>"://"]<proxyHost>[":"<proxyPort>]
Par exemple :
http=foopy:80;ftp=foopy2- Use HTTP proxyfoopy:80forhttp://URLs, and HTTP proxyfoopy2:80forftp://URLs.foopy:80- Use HTTP proxyfoopy:80for all URLs.foopy:80,bar,direct://- Use HTTP proxyfoopy:80for all URLs, failing over tobariffoopy:80is unavailable, and after that using no proxy.socks4://foopy- Use SOCKS v4 proxyfoopy:1080for all URLs.http=foopy,socks5://bar.com- Use HTTP proxyfoopyfor http URLs, and fail over to the SOCKS5 proxybar.comiffoopyis unavailable.http=foopy,direct://- Use HTTP proxyfoopyfor http URLs, and use no proxy iffoopyis unavailable.http=foopy;socks=foopy2- Use HTTP proxyfoopyfor http URLs, and usesocks4://foopy2for all other URLs.
The proxyBypassRules is a comma separated list of rules described below:
-
[ URL_SCHEME "://" ] HOSTNAME_PATTERN [ ":" <port> ]Correspond à tous les noms d'hôte qui correspondent au pattern HOSTNAME_PATTERN.
Examples: "foobar.com", "*foobar.com", "*.foobar.com", "*foobar.com:99", "https://x.\\*.y.com:99"
-
"." HOSTNAME_SUFFIX_PATTERN [ ":" PORT ]Correspond à un suffixe de domaine particulier.
Examples: ".google.com", ".com", "http://.google.com"
-
[ SCHEME "://" ] IP_LITERAL [ ":" PORT ]Correspond aux URLs qui sont des adresses IP littérales.
Examples: "127.0.1", "[0:0::1]", "[::1]", "http://[::1]:99"
-
IP_LITERAL "/" PREFIX_LENGTH_IN_BITSMatch any URL that is to an IP literal that falls between the given range. La plage IP est spécifiée en utilisant la notation CIDR.
Examples: "192.168.1.1/16", "fefe:13::abc/33".
-
<local>Correspond aux adresses locales. The meaning of
<local>is whether the host matches one of: "127.0.0.1", "::1", "localhost".