Oracle iPlanet Web Proxy Server 4.0.14 Administration Guide

Example 1: Proxy All Servers Except Local Hosts

In this example, the browser connects directly to all hosts that are not fully qualified and the ones that are in the local domain. All other hosts go through the proxy called w3proxy.example.com:8080.


Note –

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";
    }