return proxyAll之间有什么区别AND返回proxySingle
function FindProxyForURL (url, host)
{
var proxySingle = "PROXY 1.2.2.1:80";
var proxyAll = "PROXY 1.2.2.1:80;PROXY 1.2.2.2:80;PROXY 1.2.2.3:80;PROXY 1.2.2.4:80;PROXY 1.2.2.5:80;";
// difference between return proxyAll AND return proxySingle
return proxyAll; // return proxySingle;
}
PAC脚本可以返回多个代理,用分号分隔。如果第一个代理出现问题,则使用第二个和后续代理。MDN说:
如果有多个分号分隔的设置,将使用最左边的设置,直到Firefox无法建立到代理的连接。在这种情况下,将使用下一个值,等等
https://developer.mozilla.org/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_(PAC(_file