Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: What is a PAC file ?  (Read 2739 times)

0 Members and 1 Guest are viewing this topic.

Aby

  • Guest
What is a PAC file ?
« on: August 11, 2014, 03:00:02 pm »
What is a PAC file?

A Proxy Auto-Configuration (PAC) file is a JavaScript function definition that determines whether web browser requests (HTTP, HTTPS, and FTP) go direct to the destination or are forwarded to a web proxy server.

PAC files are used to support explicit proxy deployments in which client browsers are explicitly configured to send traffic to the web proxy. The big advantage of PAC files is that they are usually relatively easy to create and maintain.

The use of a PAC file is highly recommended with explicit proxy deployments of Websense Web Security Gateway (for the Content Gateway -- web proxy -- component) and is required to support the hybrid web filtering feature of Web Security Gateway Anywhere


A very simple example of a PAC file is

Code: [Select]

function FindProxyForURL(url, host)
{
return "PROXY proxy.example.com:8080; DIRECT";
}


Description:

This function instructs the browser to retrieve all pages through the proxy on port 8080 of the server proxy.example.com. Should this proxy fail to respond, the browser contacts the Web-site directly, without using a proxy. The latter may fail if firewalls, or other intermediary network devices, reject requests from sources other than the proxy; a common configuration in corporate networks.

----