try this....
========================================
function FindProxyForURL(url, host)
{
// To bypass proxy for an IP in LAN.
if (isInNet(myIpAddress(), "100.200.101.201", "255.255.0.0"))
return "DIRECT";
// To bypass proxy for a website(url) to access directly.
if (shExpMatch(url, "*flipkart.com") ||
shExpMatch(url, "*apple.com") ||
shExpMatch(url, "*linuxbite.com") ||
shExpMatch(url, "*rediff.com"))
return "DIRECT";
}
========================================
within your code.
hope this will help,
regards
Bimal Kumar
On Wed, 17 Jun 2015 14:46:16 +0530 yashvinder hooda
>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@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users
Get your own FREE website, FREE domain & FREE mobile app with Company email. | Know More > |
_______________________________________________ squid-users mailing list squid-users@xxxxxxxxxxxxxxxxxxxxx http://lists.squid-cache.org/listinfo/squid-users