[squid-users] bypass proxy
brendan kearney
bpk678 at gmail.com
Wed Jun 17 12:24:59 UTC 2015
Look into the pacparser project on github. It allows you to evaluate a pac
file and test the logic.
Hi All,
I have 2 issues
First one: How can i bypass proxy for an IP in LAN.
Second one:
I am running squid on openwrt and i want to allow some websites to bypass
proxy and want to allow them go direct.
For that i am using wpad with PAC file but the problem is for some websites
it works and for some it doesn't.
Here is my PAC file
function FindProxyForURL(url, host)
{
// The 1st if function tests if the URI should be by-passed
// Proxy By-Pass List
if (
// ignore RFC 1918 internal addreses
isInNet(host, "10.0.0.0", "255.0.0.0") ||
isInNet(host, "172.16.0.0", "255.240.0.0") ||
isInNet(host, "192.168.0.0", "255.255.0.0") ||
// is url is like http://server by-pass
isPlainHostName(host) ||
// localhost!!
localHostOrDomainIs(host, "127.0.0.1") ||
// by-pass internal URLS
dnsDomainIs(host, ".flipkart.com") ||
dnsDomainIs(host, ".apple.com") ||
dnsDomainIs(host, ".linuxbite.com") ||
dnsDomainIs(host, ".rediff.com") ||
// by-pass FTP
// shExpMatch(url, "ftp:*")
url.substring(0, 4)=="ftp:"
)
// If True, tell the browser to go direct
return "DIRECT";
// If False, it's not on the by-pass then Proxy the request if you
fail to connect to the proxy, try direct.
return "PROXY 192.168.1.1:3128";
//return "DIRECT";
}
To be precise it works for apple.com but doesn't work for rest of the
websites.
Please enlighten me.
--
Regards,
Yashvinder
_______________________________________________
squid-users mailing list
squid-users at lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20150617/6c5f1305/attachment.html>
More information about the squid-users
mailing list