Tzar
Tzar

Reputation: 1819

Creating a URL filter for a proxy in python

I've been working on a small project which requires me to create a proxy with access to only a few sites.

Am using the code from here: https://github.com/labnol/google-proxy

Now, basically am a PHP guy, but haven't found anything as better as the above for setting up a web proxy server.

What I need here is:

  1. A way to filter out URLs. Like I want people to access only the sites I allow.
  2. In the allowed sites, I'd like to block certain scripts. e.g. On wikipedia.org, the person shouldn't be allowed to login.

Am a complete noob in Python. Can anyone suggest me something here, or provide a code snippet which I can use?

Thanks! :)

P.S.: For a PHP version, I've tried using Glype and miniProxy. But not as good as the one I mentioned. They break the CSS/JS of the websites.

Upvotes: 1

Views: 1611

Answers (1)

ychaouche
ychaouche

Reputation: 5092

You may install Squid and write your own filtering rules.

Upvotes: 1

Related Questions