Proxy auto-config - Wikipedia, the free encyclopedia
A PAC file is a text file that defines at least one JavaScript function, FindProxyForURL(url, host). By convention, this file is normally named proxy.pac. The WPAD standard uses wpad.dat.
Even though most clients will process the script regardless of the MIME type returned in the HTTP request, for the sake of completeness and to maximize compatibility, you should instruct your web server to declare the MIME type of this file to be either application/x-ns-proxy-autoconfig or application/x-javascript-config.
There is little evidence to favor the use of one MIME type over the other. It would be, however, reasonable to assume that application/x-ns-proxy-autoconfig will be supported in more clients than application/x-javascript-config as it was defined in the original Netscape specification, the latter type coming in to use more recently.
A very simple example of a PAC file is:
function FindProxyForURL(url, host) { return "PROXY proxy.foo.com:8080; DIRECT"; }