This chapter includes the following topics:
For enterprise customers it is important to be able to set up secure computing environments within their companies, and proxy configuration is an essential part of doing that. Proxy configuration acts as a security barrier; it ensures that the proxy server monitors all traffic between the Internet and the intranet. This is normally an integral part of security enforcement in corporate firewalls within intranets. Enterprise customers who want to use Java Plug-in to deploy applets on their intranet web pages may also set up proxy support. This support is required for Java Plug-in to work in an intranet environment and can be set up through the Java Plug-in Control Panel.
"Use browser settings"
Manual configuration through the Protocol-Address-Port table
"Automatic proxy configuration URL"
If "Use browser settings" is selected, then proxy information is entered entirely through the browser. For Internet Explorer, go to Tools>Internet Options ... and select the Connections tab and then LAN Settings ... ; for Netscape, go to Edit>Preferences ... and select Advanced under Category and then Proxies. How this works and the three types of connections that can be set up through the browser-Direct, Manual, and Automatic-are described in the following sections.
If you select manual configuration in the Control Panel, then you must enter in the table for each protocol the address and port for the proxy server. Note that you may select to exclude some hosts from requiring proxy servers by listing them in the field labeled "No proxy host".
Because browsers on different platforms store proxy information differently, there is no generic mechanism to obtain proxy information. Here's how Java Plug-in obtains proxy information for three different browser-platform combinations:
Internet Explorer on Win32: Internet Explorer stores proxy information in the same set of keys in the windows registry. Java Plug-in obtains this information directly.
Netscape Navigator browser on Win32: Navigator 4 stores proxy information in the user preference file on the local machine. Java Plug-in reads and parses the user preference file to obtain the Navigator 4 proxy information. Netscape 6 has an API for obtaining proxy information. findProxyForURL(URL) returns proxy configuration information for the URL passed to it.
Netscape Navigator browser on the Solaris operating environment and Linux: Navigator stores proxy information in a file in the local machine. Java Plug-in reads and parses this file to obtain the proxy information. For Netscape 6 the process is the same as described in the previous section.
Java Plug-in obtains proxy information at startup time. If you change the proxy setting after Java Plug-in has started, you may force Java Plug-in to reload the proxy information from the browser through the p option in the Java Console.
Direct connection does not use a proxy. For certain situations, such as when mobile users connect to the company through a modem, direct connection to the intranet environment is required, and proxies should not be used in these cases.
Both Internet Explorer and Netscape Navigator support manual proxy configuration. Users can specify the proxy server and port for each protocol. Users can also specify one proxy server and port for all protocols. To minimize the workload of the proxy server, some sites might bypass the proxy server completely when a machine is connecting to another machine inside the intranet environment. To do this, network administrators and users can specify the proxy server bypass list in the browser's setting.
Internet Explorer: Java Plug-in recognizes and supports the proxy server and port setting associated with the protocol. Internet Explorer supports various syntaxes in the proxy server bypass list, as follows:
IP address/hostname only
IP address/hostname with wildcard
IP address/hostname with protocol
"220.127.116.11" is requested
the URL hostname ends with ".eng"
the URL protocol is http and the URL hostname ends with ".com"
Currently, Java Plug-in supports the first two syntaxes in the proxy server bypass list in Internet Explorer. Internet Explorer also supports bypassing the proxy server for local (intranet) addresses without using the proxy server bypass list. Java Plug-in supports this option by bypassing the proxy server if the URL hostname is plain; i.e., the hostname contains no dot (.).
Netscape Navigator:Java Plug-in recognizes and supports the proxy server and port setting associated with the protocol. For example, if you specify ".eng,.sun.com" in the proxy server bypass list in the Netscape Navigator browser, it bypasses the proxy whenever the URL hostname ends with ".eng" or ".sun.com". Java Plug-in fully supports this syntax in the proxy server bypass list in Navigator.
For more information about manual proxy configuration in your browser, please consult the user guide for your browser.
Function dnsResolve() always returns an empty string if the host is not an IP address
Function isResolvable() always returns false if the host is not an IP address.
Function isInNet() always returns false if the host is not an IP address.
If "DIRECT" is in the string, Java Plug-in assumes direct connection.
If "PROXY" is in the string, it uses the first proxy setting for the connection.
If "SOCKS" is in the string, it uses the SOCKS v4 for the connection.
Otherwise, the proxy information in the string is incorrect. In this cases, Java Plug-in assumes direct connection.
For more information about automatic proxy configuration in your browser, consult the user guide for your browser.