To ignore the information in the Proxies for Domains and Subdomains list, enable the Automatic Proxy Configuration feature.
When using a Proxy Auto Configuration (PAC) file:
Portal Server, Gateway, Netlet, and Proxylet use Rhino software to parse the PAC file. You can install the SUNWrhino package from the Java Enterprise System Accessory CD.
This package contains the js.jar file which must be present in the /usr/share/lib directory. Add this directory to the webserver/appserver class path on the Gateway and Portal Server machine, otherwise the Portal Server, Gateway, Netlet, and Proxylet cannot parse the PAC file.
The js.jar must be present in the $JRE_HOME/lib/ext directory on the Gateway machine, otherwise the Gateway cannot parse the PAC file.
The Gateway fetches the PAC file at bootup from the location specified in the gateway profile Automatic Proxy Configuration File location field.
The Gateway uses the URLConnection API to reach this location. If the proxy needs to be configured to reach the Gateway, the proxy needs to be configured in the following way:
From the command-line, edit the following file:
/etc/opt/SUNWportal/platform.conf.gateway-profile-name
Add the following entries:
http.proxyHost=web-proxy-hostname
http.proxyPort=web-proxy-port
http.proxySet=true
Restart the Gateway to use the specified proxy:
./psadmin start-sra-instance –u amadmin – f <password file> –N <profile name>– t <gateway>
If PAC file initialization fails, then the Gateway uses the information in the Proxies for Domains and Subdomains list.
If "" (empty string) or "null" is returned from the PAC file, then the Gateway assumes that the host does not belong to the intranet. This is similar to the host not being in the Proxies for Domains and Subdomains list.
If you want the Gateway to use a direct connection to the host, return "DIRECT". See Example with Either DIRECT or NULL Return.
Gateway only uses the first proxy returned when multiple proxies are specified. It does not try to failover or loadbalance among the various proxies specified for a host.
Gateway ignores SOCKS proxies and attempts a direct connection and assumes that the host is part of the intranet.
To specify a proxy to be used to reach any host not part of the intranet, use the proxy type STARPROXY. This proxy type is an extension of the PAC file format and is similar to the entry * proxyHost:port in Proxies for Domains and Subdomains section of the gateway profile. See Example with STARPROXY Return
The following examples show the URLs listed in the Proxies for Domains and Subdomains list and the corresponding PAC file.
If these proxies are used for domains and subdomains:
*intranet1.com proxy.intranet.com:8080
intranet2.com proxy.intranet1.com:8080
the corresponding PAC file is:
// Start of the PAC File function FindProxyForURL(url, host) { if (dnsDomainIs(host, ".intranet1.com")) { return "DIRECT"; } if (dnsDomainIs(host, ".intranet2.com")) { return "PROXY proxy.intranet1.com:8080"; } return "NULL"; } //End of the PAC File |
If these proxies are used for domains and subdomains:
intranet1.com
intranet2.com.proxy.intranet1.com:8080
internetproxy.intranet1.com:80
the corresponding PAC file is:
// Start of the PAC File function FindProxyForURL(url, host) { if (dnsDomainIs(host, ".intranet1.com")) { return "DIRECT"; } if (dnsDomainIs(host, ".intranet2.com")) { return "PROXY proxy.intranet1.com:8080;" + "PROXY proxy1.intranet1.com:8080"; } return "STARPROXY internetproxy.intranet1.com:80"; } //End of the PAC File |
In this case, if the request is for a host in .intranet2.com domain, the Gateway contacts proxy.intranet1.com:8080. If proxy.intranet1.com:8080 is down, the request fails. The Gateway does not failover and contacts proxy1.intranet1.com:8080.
The format for specifying the location of the PAC file depends upon it’s location as follows:
If the PAC file resides on a Web server, the PAC URL is:
http://hostname/pacfile_name.pac
If the pacfile is a local file (for example, c:\\pacfile\\sample.pac), for Java 1.4.1_x, enter the PAC URL as:
file://c:/pacfile/sample.pac
If the PAC file is a local file (for example, c:\\pacfile\\sample.pac), for Java 1.4.2_x, enter the PAC URL as:
file:///c:/pacfile/sample.pac