Dear Yashvinder,<br />
<br />
try this....<br />
<br />
  ========================================<br />
<br />
function FindProxyForURL(url, host)<br />
{<br />
<br />
// To bypass proxy for an IP in LAN.<br />
<br />
        if (isInNet(myIpAddress(), "100.200.101.201", "255.255.0.0"))<br />
        return "DIRECT";<br />
<br />
// To bypass proxy for a website(url) to access directly.<br />
<br />
        if (shExpMatch(url, "*flipkart.com") ||<br />
                shExpMatch(url, "*apple.com") ||<br />
                shExpMatch(url, "*linuxbite.com") ||<br />
                shExpMatch(url, "*rediff.com"))<br />
        return "DIRECT";<br />
<br />
<br />
}<br />
<br />
  ========================================<br />
<br />
within your code.<br />
<br />
hope this will help,<br />
<br />
regards<br />
<br />
Bimal Kumar<br />
<br />
On Wed, 17 Jun 2015 14:46:16 +0530 yashvinder hooda <yashvinder.edx@gmail.com> wrote<br />
>Hi All,<br />
<br />
I have 2 issues<br />
<br />
First one: How can i bypass proxy for an IP in LAN.<br />
<br />
<br />
Second one: <br />
I am running squid on openwrt and i want to allow some websites to bypass proxy and want to allow them go direct.<br />
For that i am using wpad with PAC file but the problem is for some websites it works and for some it doesn';t.<br />
<br />
Here is my PAC file<br />
<br />
<br />
<br />
function FindProxyForURL(url, host)<br />
{<br />
    // The 1st if function tests if the URI should be by-passed<br />
    // Proxy By-Pass List<br />
    if (<br />
        // ignore RFC 1918 internal addreses<br />
        isInNet(host, "10.0.0.0", "255.0.0.0") ||<br />
        isInNet(host, "172.16.0.0", "255.240.0.0") ||<br />
        isInNet(host, "192.168.0.0", "255.255.0.0") ||<br />
<br />
        // is url is like http://server by-pass<br />
        isPlainHostName(host) ||<br />
<br />
        // localhost!!<br />
        localHostOrDomainIs(host, "127.0.0.1") ||<br />
<br />
        // by-pass internal URLS<br />
        dnsDomainIs(host, ".flipkart.com") ||<br />
        dnsDomainIs(host, ".apple.com") ||<br />
        dnsDomainIs(host, ".linuxbite.com") ||<br />
        dnsDomainIs(host, ".rediff.com") ||<br />
<br />
        // by-pass FTP<br />
//        shExpMatch(url, "ftp:*")<br />
        url.substring(0, 4)=="ftp:"<br />
        )<br />
<br />
        // If True, tell the browser to go direct<br />
        return "DIRECT";<br />
<br />
        // If False, it';s not on the by-pass then Proxy the request if you fail to connect to the proxy, try direct.<br />
<br />
return "PROXY 192.168.1.1:3128";<br />
//return "DIRECT";<br />
}<br />
<br />
<br />
<br />
To be precise it works for apple.com but doesn';t work for rest of the websites.<br />
Please enlighten me.<br />
-- <br />
Regards,<br />
Yashvinder <br />
<br />
<br />
<br />
<br />
_______________________________________________<br />
<br />
squid-users mailing list<br />
<br />
squid-users@lists.squid-cache.org<br />
<br />
http://lists.squid-cache.org/listinfo/squid-users<br />
<br />
<br><Table border=0 Width=100% Height=57 cellspacing=0 cellpadding=0 style="font-family:Verdana;font-size:11px;line-height:15px;"><TR><td><A HREF="https://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?" target="_blank"><IMG SRC="https://sigads.rediff.com/RealMedia/ads/adstream_nx.ads/www.rediffmail.com/signatureline.htm@Middle"></A></td></TR></Table><table cellpadding="0" cellspacing="0"><tbody><tr><td><div style="font-family: Arial, Helvetica, sans-serif; font-size:14px">Get your own <span style="padding-bottom: 0px; background-color: #cc0000; padding-left: 3px; padding-RIGHT: 3px; font-family: Arial, Helvetica, sans-serif; color: #ffffff; font-size: 12px; padding-top: 0px"><b>FREE</b></span> website,  <span style="padding-bottom: 0px; background-color: #c00; padding-left: 3px; padding-RIGHT: 3px; font-family: Arial, Helvetica, sans-serif; color: #ffffff; font-size: 12px; padding-top: 0px"><b>FREE</b></span> domain & <span style="padding-bottom: 0px; background-color: #c00; padding-left: 3px; padding-RIGHT: 3px; font-family: Arial, Helvetica, sans-serif; color: #ffffff; font-size: 12px; padding-top: 0px"><b>FREE</b></span> mobile app with Company email.  </div></td><td><a href="http://track.rediff.com/click?url=___http://businessemail.rediff.com?sc_cid=sign-1-10-13___&cmp=host&lnk=sign-1-10-13&nsrv1=host" style="font-family: Arial, Helvetica, sans-serif; color: #fff; font-size: 14px; color:#0000cc" target="_blank"><b>Know More ></b></a><!-- <in-put type="button" cl-ass="button" on-click="parent.location='http://track.rediff.com/click?url=___http://businessemail.rediff.com/company-email-hosting-services?sc_cid=signature-23-9-13___&cmp=signature-23-9-13&lnk=mypagelogout&nsrv1=host'" value="Know more >"> </input> --></td></tr></tbody></table>