Does M2Crypto support https through proxies??

whale whale at mycameo.com
Mon Mar 31 05:28:00 EST 2003


ngps at netmemetic.com (Ng Pheng Siong) wrote in message news:<b60b9i$ilm$1 at mawar.singnet.com.sg>...
> 
> What does your Python program know about proxy configuration in IE?
> Are you certain your program is talking thru your proxy?
> 
I set 192.72.xxx.xxx:3128(squid proxy server) in IE configuration.
(IE -> Tools -> Internet option -> proxy server -> secure)
For certaining the program is talking thru proxy,
I added one line code in httpslib.py of M2crypto module.
class HTTPSConnection(HTTPConnection):
    ...
    def connect(self):
        print "host:", self.host, "port:", self.port
        self.sock = SSL.Connection(self.ssl_ctx)
        self.sock.connect((self.host, self.port))
        print "connect finish..."
When I executed the command "u.open('https://www.myserver.com')",
I saw the python program to print the following messages
host: 192.72.xxx.xxx port: 3128

And before printing "connect finish..." message, the exception was raised.

If I didn't set proxy in IE configuration, the program printed 
"host: www.myserver.com port: 443", and the command worked well.




More information about the Python-list mailing list