Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
"""
Quick and dirty filtering HTTP proxy using only Python stdlib
Change REMOTE_HOST below and adjust the regexp to suit your needs
"""
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from urllib import urlopen, basejoin
import re