Is there a HTTP proxy server that uses another proxy for certain sites (in black list) and access directly otherwise?

3

Some websites are blocked in my network, so I have to use a proxy outside my local network to access them. In order to maximize the speed, only blocked sites be accessed through proxy.

Currently, my browser(with a plugin named SwitchySharp) is doing the job of unlocking the blocked sites. However, it would be much better if a proxy server, which determines whether the requested sites are blocked or not, could do the work.

I don't know if I'm understood. The diagram below expresses the same idea.

Browser || Local Proxy: If the requested URL is in black list, then use a proxy outside the network to access it. If not, go for it directly.

I am in China, where a lot of websites are blocked. If there is such software, life can be much better: once the proxy is set, phones, tablets, laptops etc. can suddenly access all the world wide web has to offer.

I am asking this because if there isn't such thing, I will write one myself.

Thank you for reading this. Best regards.

strongwillow

Posted 2012-12-25T15:08:13.217

Reputation: 31

Answers

1

You can use Proxy Automatic Configuration (PAC) files to achieve this.

The configuration is inside the IE: Internet Options / LAN settings / Automatic configuration

For example: I can use file://c:/test.pacinside the address (below "Use automatic configuration script")

And here is the example of test.pac content:

function FindProxyForURL(url, host)
{
if (url == "http://www.google.com/")
return "DIRECT";
else
return "PROXY 192.168.0.9:8088";
}

For more syntax about pac file, you can refer: http://findproxyforurl.com/example-pac-file/

Note: The automatic configuration script's address can not only be file://, it can also be http://, thus it provide more convenient way for management.

NCola.L

Posted 2012-12-25T15:08:13.217

Reputation: 21

Thank you. Actually, what I want is a proxy server that could parse PAC-like file. Guess I'll have to write one myself then~ – strongwillow – 2012-12-26T15:35:46.830