Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determine proxy type

I have the following code to download a URL through a proxy:

proxy_handler = urllib2.ProxyHandler({'http': p})
opener = urllib2.build_opener(proxy_handler)
urllib2.install_opener(opener)
req = urllib2.Request(url)
sock = urllib2.urlopen(req)

How can I use Python to determine the type of proxy it is (transparent, anonymous, etc)? One solution would be to use an external server, but I want to avoid that kind of dependency if possible.

like image 525
hoju Avatar asked Nov 23 '25 09:11

hoju


1 Answers

One solution would be to use an external server

You must have a server of some sort.

The best option you can hope of doing is to host your own web server and print the headers to see if it is leaking any variables.

like image 129
Unknown Avatar answered Nov 25 '25 23:11

Unknown



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!