I'm running a Linux box (Lubuntu 12.04) in an Windows environment where a pac file is used to configure internet access.
proxy.pac file:
function FindProxyForURL(url, host){
var proxy_yes = "PROXY xxx.xxx.xxx.xxx:8000";
var proxy_no = "DIRECT";
if (shExpMatch(url, "*//yyy.*")) { return proxy_no; }
if (shExpMatch(url, "*//zzz.zzz.*")) { return proxy_no; }
if (shExpMatch(url, "*foo.com*")) { return proxy_no; }
//Proxy anything else
return proxy_yes;
}
Lubuntu, as far as I know, has no global proxy system.
Instead of trying to mess around with shell variables like HTTP_PROXY that only some programs respect (not Chromium, for instance), I was thinking that iptables could be used to transparently redirect all traffic through the proxy, effectively implementing a global proxy.
Is this possible, and if it is, how would I go about doing it?
EDIT: I should clarify that I'm not an administrator, nor am I trying to set up a proxy. The proxy is already set up and getting machines to connect to the interent requires enabling automatic proxy configuration and pointing it at the pac file above. Direct connections are blocked.
Instead of configuring every application individually I was hoping to use iptables to automatically route the traffic over the proxy.