«

»

Feb 12 2011

Proxy only for certain sites

Your public fixed IP banned on a few sites, or you don’t want your real IP to be seen on them  ? Normally by using a proxy you can bypass this problem.

But, by adding a proxy in your IE or Firefox configuration you direct all your HTTP/HTTPS/FTP/SOCKS traffic through the proxy, something you don’t need. Remember, there are only a few websites that need this. ( Proxies are slower ).

Here is a fix for Internet Explore and Firefox ( under Windows ). We need to create a PAC file (Proxy Auto Configuration) and then instruct IE / Firefox to use it.

Create a text file named proxy.txt on your C: drive (for example) and change the sites and proxy address and port as needed.

function FindProxyForURL(url, host) {
host = host.toLowerCase();
if (dnsDomainIs(host, “banned-site.net”) ||
dnsDomainIs(host, “restrictedip.com”))
return “PROXY 50.16.203.143:80“; // (IP:port)

return “DIRECT”;
}

To tell the browsers which sites and which proxy and port to use :

Firefox : Tools -> Options -> Advanced -> Network -> Settings Check : Automatic proxy configuration URL. In the box write : file:///C:/proxy.txt

IE : Tools -> Internet Options  -> Connections -> Lan Settings -> Check : Use automatic configuration script. In the box write : file://C:/proxy.txt

Proxy list here : http://www.samair.ru/proxy/type-01.htm

Firefox instructions from here : http://forums.mozillazine.org/viewtopic.php?f=38&t=281605

To have different proxies for different sites use a file like this :

function FindProxyForURL(url, host) {
host = host.toLowerCase();
if (dnsDomainIs(host, “whatismyip.com”))
return “PROXY 50.16.203.143:80”; // (IP:port)
if (dnsDomainIs(host, “speedtest.net”))
return “PROXY 50.16.209.227:80”; // (IP:port)
if (dnsDomainIs(host, “AAA.BBB.CCC.DDD”))
return “PROXY 50.16.231.22:8081”; // (IP:port)
return “DIRECT”;
}

Tested on Windows7

2 comments

  1. mitkoradev

    You may also use

    return “SOCKS5 50.16.231.22:8081″;

    for a SOCKS 5 type proxy !

  2. Baku

    Script fordifferent proxies for different sites does not work.

Leave a Reply

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

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>

*