I want a very simple proxy written in python that will receive some http requests , it will discard the parameters and then based on the correctness of the parameters it proxy or not the request. Mostly for authentication.So i will write my little own code.What are you proposing? Does it sounds very trivial?
3 Answers
I would use Twisted. It is a good fit for this kind of server.
Here is an example of how to use it as a proxy Scroll to Virtual hosts and proxies
Comments
If you looking to use a proxy to access certain websites that are foreign and you can access locally you would want to add this to your script
Proxy1 = '188.166.174.77:80'
proxies = {
'http': 'http://' + Proxy1 + '',
'https': 'https://' + Proxy1 + ''
}
r1 = requests.get('url', proxies=proxies)