Different sites through different ISP or VPN

Suppose I am running squid server with port 3218 and port 8080 is mapped with 3128 port of other squid server / VPN 

and I want the websites microsoft.com 411.com and tlo.com  and whatismyip.com shoud run through VPN then have to write a wpad.dat file like given below

function FindProxyForURL(url, host) {

if (dnsDomainIs(host, "tlo.com") ||
        shExpMatch(host, "(*.tlo.com|tlo.com)"))
        return "PROXY 192.168.100.1:8080";

if (dnsDomainIs(host, "www.411.com") ||
        shExpMatch(host, "(*.411.com|411.com)"))
        return "PROXY 192.168.100.1:8080";

if (dnsDomainIs(host, "www.microsoft.com") ||
        shExpMatch(host, "(*.microsoft.com|microsoft.com)"))
        return "PROXY 192.168.100.1:8080";



if (dnsDomainIs(host, "whatismyip.com") ||
        shExpMatch(host, "(*.whatismyip.com|whatismy.p.com)"))
        return "PROXY 192.168.100.1:8080";


else
return "PROXY 192.168.100.1:3128; DIRECT";      <-- This line can be replaced  by return "DIRECT";    if  the ip is bypassed

 }

 

 and in browser  for example in firefox  in network settings Automatic proxy Configuration url i hav to add the line http://IP web server where wpad file is kept >/wpad.dat

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy This Password *

* Type Or Paste Password Here *

4,473 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>