Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Dec 26 '12 at 9:05

This question came from our site for professional and enthusiast programmers.

1 Answer 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.

share|improve this answer
    
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 Dec 26 '12 at 15:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.