function FindProxyForURL(url, host) { // Define the return string for using the SOCKS proxy for CMS var proxy_socks_cms = "SOCKS5 127.0.0.1:1080"; // Define the return string for using the SOCKS proxy for 904 var proxy_socks_904 = "SOCKS5 127.0.0.1:1081"; // Define the return string for not using the proxy var proxy_no = "DIRECT"; // Variable for proxy return value var proxy; // our local URLs don't need a proxy: if (dnsDomainIs(host, ".cms") || shExpMatch(host,"10.176.*.*")) { proxy = proxy_socks_cms; } else { if (dnsDomainIs(host, ".cms904") || shExpMatch(host,"10.192.*.*")) { proxy = proxy_socks_904; } else { proxy = proxy_no; } } // BEWARE of un-commenting the line below as it creates a LOT of popup windows. //alert("URL = "+url+"; HOST = "+host+" => PROXY = "+proxy); return proxy; }