Per location PAC files

Hello everyone,

as we have a lot of local proxy exceptions for regional branch offices where we require direct access for websites which only allow access from IPs coming from inside the country I was wondering if there is a way to create PAC files for specific locations (per location pac files) while using the Zapp.

Currently we use our own internal PAC files when inside the corporate network and the Zapp enforces this but we are considering using the Zapp tunnels internally as well for which we need to switch to pac files hosted with Zscaler. But since we have so many different local PAC files for the mentioned exceptions I cannot currently implement this as I do not want to configure every exception globally.

Regards
Thomas

The Zscaler-specific Source IP Variable for PAC files should allow this without needing separate PAC files per location.

Example Code:

    	var egressip = "${SRCIP}";

    	// Office Location: Austin, TX
    	if (egressip=="198.51.100.10" && 
    		(shExpMatch(host,"domain.com") || 
    			shExpMatch(host,"*.domain.com") || 
    			shExpMatch(host,"x.domain.com") || 
    			shExpMatch(host,"y.domain.com") || 
    			shExpMatch(host,"z.domain.com"))) {
    		return "DIRECT";}
    		
    	// Office Location: San Francisco, CA
    	if (egressip=="198.51.100.20" && 
    		(shExpMatch(host,"domain.com") || 
    			shExpMatch(host,"*.domain.com") || 
    			shExpMatch(host,"a.domain.com") || 
    			shExpMatch(host,"b.domain.com") || 
    			shExpMatch(host,"c.domain.com"))) {
    		return "DIRECT";}
    		
    ;}

Alternatively you may consider the use of the Country Variable in your PAC files depending on the use-case.

Note: PAC files must be hosted on Zscaler to benefit from Zscaler-Specific Variables

First of all thanks for the replies.

The first Suggestion won’t work as we have too many Locations with dynamic IPs.
With the second Suggestion I fear that the PAC file will become too large. We have locations in almost 100 countries and quite a few proxy exceptions for various reasons.

But since there seems to be no possibility to make PAC files per Location or locationg Group I guess I will have to investigate the option of using the Country Variable more closely.