Configuration of PAC file for controlling traffic flow to direct traffic to Proxy and bypass certain services that might not work well with proxied traffic (Microsoft Office 365, Cisco Webex, Zoom etc.)
SGOS 6.7.x/7.3.x/7.4.x
A PAC file is a universal/standardized JavaScript file with a .pac extension that contains instructions on when and whether the Web browser should use the ProxySG appliance appliance for retrieving requested content. Network administrators like to use PAC files because they are centrally administered, and easy to update.
EXAMPLE CONFIG: test.pac
function FindProxyForURL(url, host) {
// If the hostname matches, send direct. Hostname or domains are send
//
directly to the Gateway without being checked by Proxy.
if (dnsDomainIs(host, "support.broadcom.com") ||
shExpMatch(host, "(*.broadcom.com|broadcom.com)"))
return "DIRECT";
// If the protocol or URL matches, send direct to Gateway.
if (url.substring(0, 4)=="ftp:" ||
shExpMatch(url, "http://broadcom.com/folder/*"))
return "DIRECT";
// If the requested website is hosted within the internal
//
network subnets,
send direct to Gateway.
if (isPlainHostName(host) ||
shExpMatch(host, "*.local") ||
isInNet(dnsResolve(host), "10.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "172.16.0.0", "255.240.0.0") ||
isInNet(dnsResolve(host), "192.168.0.0", "255.255.0.0") ||
isInNet(dnsResolve(host), "127.0.0.0", "255.255.255.0"))
return "DIRECT";
// If the IP address of the local machine is within a defined
// subnet, send to a specific proxy.
if (isInNet(myIpAddress(), "192.168.1.20", "255.255.255.0"))
return "PROXY 1.2.3.4:8080";
// DEFAULT RULE: All other traffic, use below proxies, in fail-over order.
return "PROXY 4.5.6.7:8080; PROXY 7.8.9.10:8080";
}
You can modify last part of the PAC file, so if even Proxies are down for specific traffic, users will be connected exceptionally via PAC stored on external HTTP server.
// DEFAULT RULE: All other traffic, use below proxies, in fail-over order.
return "PROXY 4.5.6.7:8080; PROXY 7.8.9.10:8080; DIRECT";
#################################
WINDOWS CLIENT IMPLEMENTATION
#################################
On Windows, the support for Proxy Autoconfiguration (PAC) appears seamless due to the integration with the WinHTTP client, which resides in a DLL accessible to all applications through a public API. Many applications on Windows leverage WinHTTP, simplifying the implementation of proxy autoconfiguration.
Windows > Control Panel > Network & Internet > Proxy > Automatic proxy setup
WINDOWS CLIENT CONFIGURATION: https://techdocs.broadcom.com/us/en/symantec-security-software/web-and-network-security/edge-swg/7-3/authentication_co/IWA_configure_st/IWA_Direct_st/IWA_browser_config_ta/explicit_proxy_browser_config_st/set_up_a_PAC_file_ta.html
AFTER PAC implementation on client TRAFFIC FLOW looks as follows: CLIENT REQUEST >> PAC FILE >> DIRECT ROUTE OR PROXY >> GATEWAY >> INTERNET
############################
LINUX CLIENT CONFIGURATION
############################
Most of the Linux distros have an option to pass the traffic to the specified Proxy, but commands can differ from each Linux flavor.
In contrast to Windows PAC file implementation, on Linux, individual applications often handle their own socket calls and employ their unique HTTP protocol implementations. While there are HTTP libraries available, it is less common for applications on Linux to include a JavaScript interpreter required for processing a Proxy Autoconfiguration (PAC) file.
Implementation of the PAC file can differ from each LINUX distribution and might take additional steps to implement if you’d like to differentiate what resources can be accessed by Linux client directly or which requires a connection via Proxy. This would require check on specific Linux documentation in order to achieve.
If the PAC file is not applicable this can be achieved also by setting static routes to specific websites on switch between client & proxy that would omit Proxy connection.
#################################################################################
PLEASE NOTE: Universal PAC file creation, customization and implementation on client machines are up to customer itself and it’s not a part of Technical Support activities. If customer requires help in implementation, customization of a PAC file in their existing environment to control traffic flow going to Proxies, additional help of Professional Service for implementation purposes is needed - https://www.broadcom.com/support/fibre-channel-networking/services/professional-services
#################################################################################
KB ARTICLES: