function FindProxyForURL (url,host) {
var hosts = ["my.site1.com","my.site2.com"];
for(var i=0;i<hosts.length;i++) {
if (shExpMatch(url,"*."+hosts[i]+"/*")||shExpMatch(url,"*//"+hosts[i]+"/*")) {
return "PROXY myproxy.company.com:3128; DIRECT";
}
}
return "DIRECT";
}
Now in Windows you would be configuring the path for PAC file in the Under the hood configuration screen. But its not there in Linux. In this case you need to add one line to your .bashrc:
export auto_proxy=file:///home/lzap/my-proxy.pac
Re-login and you are done. Nice.