View Single Post
Old 02-17-2005, 12:55 AM   #8 (permalink)
MeOrSo
Registered User
 
Join Date: Feb 2005
Posts: 5
MeOrSo is on a distinguished road
Exclamation

i've done it now. for anyone looking for the code:

function FindProxyForURL(url, host)
{
var proxy_yes = "PROXY ProxyIP:Proxyport; DIRECT";
var proxy_no = "DIRECT";
if (shExpMatch(url, "http://www.whatever.com*")) {return proxy_yes;}
else if (shExpMatch(url, "http://en.wikipedia.org*")) {return proxy_yes;}
else if (shExpMatch(url, "http://www.anotherpage.com*")) {return proxy_yes;}
else {return proxy_no;}
}

ProxyIP ist the IP of the proxyserver or the hostname, Proxyport is the port where Squid gets the requests (default is 3128)

thank you idx
MeOrSo is offline   Reply With Quote