In this example, Netscape Navigator connects directly to all hosts that are not fully qualified and the ones that are in the local domain. Everything else goes through the proxy called w3proxy.example.com:8080.
If the proxy goes down, connections become direct automatically.
function FindProxyForURL(url, host) { if (isPlainhost name(host) || dnsDomainIs(host, ".example.com") || dnsDomainIs(host, ".mcom.com")) return "DIRECT"; else return "PROXY w3proxy.example.com:8080; DIRECT"; }