[squid-users] bypass proxy

yashvinder hooda yashvinder.edx at gmail.com
Wed Jun 17 09:07:01 UTC 2015


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20150617/6c4a6fde/attachment.html>


More information about the squid-users mailing list