Skip to main content

Overview of proxy auto-config files

Describes proxy auto-config (PAC) files: how they work, how to get the URL, addService/removeService customization, chaining, fail-open, unsupported agents, and the services.json preview.

F5 Workforce AI Security provides proxy auto-config (PAC) files that route generative AI (GenAI) traffic through Workforce AI Security for governance and monitoring. A PAC file is a JavaScript function that runs in web browsers and applications. The function determines the proxy server for each network request. Only GenAI traffic goes to Workforce AI Security. All other traffic keeps its typical route.

You can distribute the PAC file URL through a platform for mobile device management (MDM). Examples are Google Workspace, Microsoft Intune, Jamf Pro, and Rippling. The approach needs no agent. It needs no other endpoint software either. Standard browser and operating system support for proxy auto-configuration is enough.

When a PAC file routes GenAI traffic through Workforce AI Security, the platform applies the policies that you set up. These include service access controls, Content Controls, and detection of personally identifiable information (PII). Workforce AI Security records all governed sessions in User Activity for visibility, auditing, and compliance reporting.

How proxy auto-config files work with Workforce AI Security

A PAC file contains a JavaScript function called FindProxyForURL(url, host). The function evaluates each network request and returns a proxy directive. Workforce AI Security PAC files include a list of GenAI service domains. When a browser or application requests a URL, the function checks the destination against known GenAI services. If the destination matches, the request goes through the proxy infrastructure of Workforce AI Security, where policies apply. If not, the request goes directly to its destination without interception.

Because only GenAI traffic uses the proxy, any effect on performance is limited to that traffic. You don't need proxy infrastructure for all web traffic.

Get the address of the proxy auto-config file

To use PAC files, you first create a Proxy connector. The connector generates a unique PAC file URL for your organization. The URL includes authentication and routing information.

  1. In CONFIGURE, go to Connectors.

  2. Select ADD CONNECTOR.

  3. Enter a descriptive name for the connector, for example PAC File - Corporate Devices.

  4. Select Proxy as the connector type.

  5. Save the connector to generate the PAC file URL.

  6. Copy the PAC file URL from the connector details page.

The generated URL follows this format, where {connector-id} is a unique identifier for your connector:

https://config.surepath.ai/pac/{connector-id}/current.pac

Use the URL exactly as the admin interface shows it. When you set up endpoints or an MDM platform, don't change or rebuild the URL by hand.

Deploy proxy auto-config files to endpoints

Copy the PAC file URL. Then send the URL to endpoints with the tool you prefer. You can set the URL in the operating system, the browser, or both.

Common deployment methods:

  • Google Workspace: Use Google Admin Console to set up proxy settings for Chrome browsers and ChromeOS devices across your organization.

  • Microsoft Intune: Create configuration profiles that deploy proxy settings to Windows and macOS devices that Intune manages.

  • Jamf Pro: Use configuration profiles to distribute proxy settings to managed macOS and iOS devices.

  • Rippling: Set up proxy settings through device management policies for macOS and Windows endpoints.

  • Manual configuration: Ask users to set up proxy auto-configuration in the network settings of their browser or operating system.

Ready-made scripts and profiles already contain the PAC file URL of your connector. See Use the Proxy connector deployment files.

Customize the service list

The PAC file includes a default list of public GenAI service domains that Workforce AI Security routes through its proxy. You can add domains to this list or remove domains from it.

Add services

To add domains, append the addService query parameter to the PAC file URL. Use this parameter to intercept traffic to GenAI services in preview features. Use it also for services that the default service list doesn't yet include.

The addService parameter accepts a comma-separated list of domain patterns. You can use the asterisk (*) wildcard to match subdomains.

This example PAC file URL adds two services:

https://config.surepath.ai/pac/{connector-id}/current.pac?addService=*.example.com,api.example.net

In this example, Workforce AI Security routes all subdomains of example.com and the domain api.example.net, in addition to the default service list.

Remove services

To remove domains, append the removeService query parameter to the PAC file URL. When you don't want Workforce AI Security to intercept traffic to specific GenAI services, use this parameter. Examples are services that another governance mechanism controls, or services that must stay unrestricted.

The removeService parameter accepts a comma-separated list of domain patterns. The parameter uses the same wildcard syntax as addService.

This example PAC file URL removes one service:

https://config.surepath.ai/pac/{connector-id}/current.pac?removeService=*.example.org

In this example, Workforce AI Security doesn't route subdomains of example.org, including subdomains in the default service list.

Combine add and remove parameters

You can use addService and removeService together to set the exact list of intercepted domains. Each time an endpoint requests the PAC file, Workforce AI Security applies the changes to the default service list.

This example PAC file URL uses both parameters:

https://config.surepath.ai/pac/{connector-id}/current.pac?addService=*.example.com&removeService=*.example.org

Notes about service list customization:

  • Changes apply only to the PAC file request that carries them. Workforce AI Security doesn't store them on the server.

  • Each endpoint uses the service list that the query parameters in its PAC file URL define.

  • Domain patterns must be valid fully qualified domain names or wildcard patterns.

When you change a query parameter, update the PAC file URL on your endpoints. Use your MDM platform or change each endpoint by hand.

Chain proxy auto-config files

If you already have a PAC file, you can chain it to add Workforce AI Security and keep your current proxy configuration. With chaining on, the Workforce AI Security PAC file first checks whether a request matches a GenAI service. If the request matches, it goes through Workforce AI Security. If the request doesn't match, your existing PAC file sets the route.

Your existing PAC file can route traffic through corporate proxies. It can also handle split-tunnel VPN scenarios or apply other network routing policies. Workforce AI Security handles only GenAI traffic, and your existing PAC file sets the route for everything else.

To turn on chaining, append the chain query parameter to the PAC file URL. Set its value to the absolute URL of your existing PAC file. URL-encode the value. Unencoded special characters can break the query string.

For example, if your existing PAC file is at this address:

https://proxy.example.com/corporate.pac

The PAC file URL with chaining is:

https://config.surepath.ai/pac/{connector-id}/current.pac?chain=https%3A%2F%2Fproxy.example.com%2Fcorporate.pac

The encoding replaces the colon (:) with %3A and each forward slash (/) with %2F. Most tools and browsers encode values for you. If you build a URL by hand, apply the encoding yourself.

When a browser or application retrieves this PAC file, the combined logic works in this order:

  1. The logic checks whether the requested URL matches a GenAI service domain.

  2. If the URL matches, the logic routes the request through the proxy infrastructure of Workforce AI Security.

  3. If the URL doesn't match, the logic calls the FindProxyForURL function from the chained PAC file and applies that routing decision.

You can combine chaining with service list customization by using more than one query parameter. Encode each parameter value:

https://config.surepath.ai/pac/{connector-id}/current.pac?chain=https%3A%2F%2Fproxy.example.com%2Fcorporate.pac&addService=*.example.com

Requirements for chaining:

  • The URL of the chained PAC file must be an absolute URL that includes the protocol and host name.

  • When the browser or application runs the PAC function, the endpoint must be able to reach the chained PAC file.

  • When endpoints refresh their PAC file, changes to the chained PAC file take effect. Refresh intervals vary by browser and operating system.

  • When an endpoint retrieves the Workforce AI Security PAC file, an invalid URL for the chained PAC file causes an error.

View the service list (preview feature)

Workforce AI Security PAC files include a services endpoint. The endpoint returns the list of GenAI service domains for a connector in JavaScript Object Notation (JSON). This feature is in preview. It might change in future releases.

To view the service list for a connector, use the services.json path under the connector path:

https://config.surepath.ai/pac/{connector-id}/services.json

The response is a JSON object that contains an array of domain patterns. This example shows only the first entries of the array:

{"publicServices": ["api.openai.com", "chatgpt.com", "gemini.google.com"]}

The endpoint accepts the addService and removeService query parameters. Use them to preview the effective service list with your changes applied:

https://config.surepath.ai/pac/{connector-id}/services.json?addService=*.example.com&removeService=*.example.org

Use the services endpoint in these ways:

  • Check which domains your PAC file configuration intercepts.

  • Review the public GenAI services in the default catalog.

  • Confirm that your addService and removeService changes produce the result you want.

  • Give automation or configuration management tools the effective service list.

The structure and availability of the services endpoint might change based on customer feedback. Don't build critical dependencies on the endpoint in its current form.

Unsupported user agents

Some clients don't fully support proxying over Transport Layer Security (TLS) or PAC semantics. For these unsupported user agents, the PAC output returns DIRECT; for matched GenAI service domains on purpose. The traffic bypasses Workforce AI Security. The failopen parameter can't override this behavior.

Current unsupported user agents:

WinHttp-Autoproxy-Service/5.1

When a request comes from an unsupported user agent:

  • Matched GenAI traffic goes directly to the destination. Workforce AI Security doesn't govern that traffic.

  • Sessions don't appear in User Activity. Configured policies and Content Controls don't apply.

  • PAC file chaining doesn't change this behavior for matched domains. The result stays DIRECT;.

Windows components that use WinHTTP networking get no interception. To get governance for this traffic:

  • Use applications and configurations that rely on browser or system networking stacks with full HTTPS proxy and PAC support.

  • Route the traffic through supported clients, or use another integration method that Workforce AI Security provides.

Proxy auto-config retrieval for unsupported user agents

Workforce AI Security builds the PAC content for the user agent that retrieves the PAC file. If an unsupported component downloads the PAC file, the returned PAC file embeds DIRECT; for matched domains. An example is a system auto-proxy service. Any client that later uses that PAC file follows the embedded DIRECT; logic, including clients that support HTTPS proxying. The component that fetches the PAC file must represent the clients that use the file. If the fetching component doesn't represent those clients, change your configuration.

Override the behavior for unsupported user agents

By default, requests from unsupported user agents use DIRECT mode for matched GenAI service domains. To override this behavior, append the ignoreUnsupported query parameter to the PAC file URL.

To bypass the check for unsupported user agents, use a URL like this one:

https://config.surepath.ai/pac/{connector-id}/current.pac?ignoreUnsupported=true

When you set ignoreUnsupported=true:

  • Workforce AI Security bypasses the check for unsupported user agents. Traffic from these user agents goes through the Workforce AI Security proxy instead of going direct.

  • Fail-open logic still applies on its own. If the user agent is in the fail-open list, the PAC file adds a DIRECT; fallback after the proxy directive. If you set failopen=true, the PAC file also adds the fallback.

  • The cache key for the PAC file includes the query string. A PAC file with ignoreUnsupported differs from a PAC file without it, so each endpoint gets the right PAC content.

Test a user agent from the unsupported list. If the user agent completes TLS proxying in your environment, use this parameter. You can also use this parameter to try proxy routing for all traffic, regardless of the user agent.

Fail-open behavior

When a client can't complete proxy authentication or TLS proxying, fail open controls what happens for matched GenAI service domains. When fail open is active, the PAC output adds a DIRECT; fallback after the proxy directive. The request then proceeds without interception.

Behavior, where <PROXY_ADDRESS> stands for the proxy address in the PAC output:

  • Typical behavior (no fail open): The PAC file returns HTTPS/PROXY <PROXY_ADDRESS>; for matched services, with no DIRECT; fallback.

  • Fail-open behavior: The PAC file returns HTTPS <PROXY_ADDRESS>; DIRECT; (or PROXY <PROXY_ADDRESS>; DIRECT;), which gives a direct egress path for failed proxy negotiation.

Control fail open with a query parameter:

  • ?failopen=true: Forces fail open for the request, regardless of user agent.

  • ?failopen=false: Forces typical proxy behavior, even if the client would otherwise get fail open.

  • Omitted: Turns on fail open automatically for some user agents. The platform bases the choice on known support for HTTPS proxies.

Proxy auto-config retrieval and fail open

When an endpoint requests the PAC file, Workforce AI Security sets the fail-open behavior in the generated PAC content. For example, the content gets a DIRECT; fallback. If a system component retrieves the PAC file and triggers fail open, all later clients get the DIRECT; fallback. The fallback applies regardless of the capabilities of each client. To avoid unintended fail open, force typical behavior with ?failopen=false. Or make sure a representative client retrieves the PAC file.

Notes:

  • Fail open applies to matched GenAI service domains only. Traffic that doesn't match continues to follow DIRECT;.

  • Fail open doesn't affect unsupported user agents. Matched domains are always DIRECT; for them.

  • Chaining doesn't change fail-open selection for matched domains. The fallback applies only after the Workforce AI Security proxy directive.

Updates to proxy auto-config files

Workforce AI Security keeps the PAC file content current with the latest public service catalog entries. When Workforce AI Security adds a GenAI service to the catalog or updates one, the PAC file changes to match. Endpoints receive current routing logic without manual work.

After you set the PAC file URL on endpoints, you don't need to update the URL itself. The URL stays the same for the life of the Proxy connector. Workforce AI Security changes the service list and routing logic behind the same URL.

Did this answer your question?