I manage many HTTPS proxies (these proxies that have their own SSL connection). I am creating a diagnostic tool in python that tries to connect to a page through each proxy and send me an email if it cannot connect through one of them.
The way I decided to do this is to use urllib to connect through each proxy and return a page that should say βsuccessβ with the code below.
def fetch(url): connection = urllib.urlopen( url, proxies={'http':"https://"+server+':443'} ) return connection.read() print fetch(testURL)
This selection on the page, I want the problem is that it will still find the page I need, even if the proxy server information is incorrect or the proxy server is inactive. Thus, either he never uses a proxy server, or tries to connect without him when he fails.
How can i fix this?
Edit: No one knows how to do this. I'm going to start reading through libraries of other languages ββto see if they can handle it better. Does anyone know if this is easier in another language like Go?
Edit: I wrote this only in the comment below, but I think it might be a misunderstanding. "The proxy server has its own ssl connection. Therefore, if I go to google.com, I will first do a key exchange with foo.com, and then another with the destination address bar.com or the destination address baz.com. The destination should not be https, proxy - https "
source share