A Proxy Auto-Configuration (PAC) file is a JavaScript function that determines whether web browser requests (HTTP, HTTPS, and FTP) go directly to the destination or are sent to a web proxy server. It contains a JavaScript function that routes the web requests via some web proxy server instead of sending these directly to the destination.

The function defined in the PAC using JavaScript is as follows:

function FindProxyForURL(url, host) {
// …
}

The FindProxyForURL function contains the following arguments:

  • url: The URL of the request in the form protocol://hostname.port/path. The host name can be a domain name or IP address. Port number is optional if the default port is used for the given protocol—for example, port 80 or http URLs or port 443 for https URLs. Example: https://www.example.com:8443/mypage.htm

  • host: The host name extracted from the URL string. Example: For the URL in the example above, the host is www.example.com. 

To enable a PAC file that you've configured, do the following

  1. Set enable_pac_proxy to truein admin_settings.yaml file.

  2. On your Microsoft Windows device, browse to Settings > Network & Internet and then select Proxy.

  3. Under Automatically proxy setup:

    1. Toggle Automatically detect settings to On.

    2. Next to Use setup script, select Edit.

  4. In the Edit setup scrip window,

    1. Toggle Use setup script to On.

    2. Enter the script address (for example: http://proxy.company.com/proxy.pac)

  5. Select Save

To download the latest admin_settings.yaml file, refer to Downloading the admin_settings file.