Automatic proxy configuration is supported in a browser by setting a particular URL that contains a JavaScript file with .pac or .js extension. This file contains a function called FindProxyForURL that contains the logic to determine which proxy server to use when the browser receives a connection request.
During startup, the Java Plug-in downloads the JavaScript file to the local machine using direct connection. Then whenever it needs to make a new connection, it executes the FindProxyForURL function to obtain the proxy information using the JavaScript engine in IE.
Can anyone tell me - is it possible to access/execute the FindProxyForUrl function from within a java applet? How does the plug-in do it? Is the Sun Java plug-in source code available anywhere?