As a Cloud SWG administrator, my goal is to grasp how the agent utilizes a proxy/PAC to manage application-generated traffic.
Additionally, I aim to leverage a PAC file for executing application-layer redirection or routing within browsers or any proxy-aware application.
Symantec Enterprise Agent
Symantec Cloud SWG Agent
SEP Agent (Tunnel Mode)
Proxy-Auto Configuration (PAC) File
The agent does not modify or suppress the proxy settings on the device.
The agent monitors proxy traffic in the system, ensuring that proxy requests from applications are routed through Cloud SWG by utilizing the designated proxy destination, ep.threatpulse.net.
This functionality is enforced even for proxies operating on RFC-1918 addresses.
To Exempt a specific proxy: Add the IP address(es) of the proxy to the Cloud SWG portal Bypassed IPs/Subnets list. Refer to Prevent IP/Subnet From Routing to Cloud SWG and Prevent a Domain From Routing to Cloud SWG.
Note: The on-prem proxy IP needs to be added even if the proxy is hosted on an RFC1918 address. Even though RFC1918 addresses are bypassed automatically by the agent, the proxy detection does NOT automatically skip RFC1918 addresses.
Performing application-layer redirection is achievable through a PAC file as follows:
Note:
At the application layer, when the request is directed to ep.threatpulse.net. The agent, operating at the network layer, does not conduct protocol analysis on the content encapsulated within the proxy request, therefore, the executable/IP/domain bypass will not be honored.
You will need to add the domain/IP to be sent DIRECT in the PAC file, at this point, the request will be intercepted by the agent. Subsequently, the agent will determine whether to bypass the request or send it through Cloud SWG proxies.
Therefore, anything you bypass in the Cloud SWG bypassed traffic list will also need to be bypassed in the PAC file.
It is recommended that ALL Domain/IP/App bypasses are added in the Cloud SWG Portal.
Note:
ep.threatpulse.net is an internal destination that cannot be bypassed, therefore, It will always be tunnelled.
The destination ep.threatpulse.net is not available outside of the Cloud SWG tunnel, and as such, your PAC file can use that for “fallback” functionality when the agent is disconnected. For example, returning “PROXY ep.threatpulse.net:80,1.2.3.4:8080” as a PAC file directive will connect to the cloud proxy when a tunnel is established and will fall back to 1.2.3.4:8080 in the event there is no agent tunnel to the Cloud SWG service.
function FindProxyForURL(url, host) {
// Send example1.com direct - example1.com is also bypassed in Cloud SWG configuration
if (shExpMatch(host, "(*.example1.com|example1.com)")) {
return "DIRECT";}
// Send example2.com to internal proxy - 10.1.2.3 is also bypassed in Cloud SWG configuration
if (shExpMatch(host, "(*.example2.com|example2.com)")) {
return "PROXY 10.1.2.3:8080";}
// Send example3.com to external proxy - example3.com is also bypassed in Cloud SWG configuration
if (shExpMatch(host, "(*.example3.com|example3.com)")) {
return "PROXY 1.2.3.4:8080";}
// Always send example4.com explicitly through Cloud SWG proxy if no Tunnel failback to on-prem proxy
if (shExpMatch(host, "(*.example4.com|example4.com)")) {
return "PROXY ep.threatpulse.net:80,1.2.3.4:8080";}
// DEFAULT RULE: send everything else direct
return "DIRECT"}
Documentation Link: Agents and Proxy Auto-Configuration