python code for proxying http trafic