0

what is the difference between return proxyAll; AND return 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; 
    } 
Pit
  • 395
  • 2
  • 11

1 Answers1

1

A PAC script can return multiple proxies, separated by semicolons. The second and subsequent proxies are used if there is an problem with the first proxy. Here's what MDN says:

If there are multiple semicolon-separated settings, the left-most setting will be used, until Firefox fails to establish the connection to the proxy. In that case, the next value will be used, etc.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_(PAC)_file

user1031921
  • 146
  • 2
  • 8