m2crypto w or w/out proxy
Ng Pheng Siong
ngps at netmemetic.com
Fri Jun 6 08:18:07 EDT 2003
According to Glauco <glauco at allevatori.com>:
> I wrote a package for connection throw HTTP with or without proxy .
> How can i configure proxy use in M2Crypto (or reuse Opener from urllib) ?
HTTPS proxying is different from HTTP proxying. In HTTPS proxying, the
client CONNECTs to the proxy to request an SSL tunnel to the target. See
RFC 2616, HTTP 1.1. (Or a newer version.)
A quick glance thru urllib2.py didn't turn up 'CONNECT', so possibly it is
not supported. You'll have to subclass CustomProxy to do the CONNECT stuff.
When your code CONNECTs and gets a 2xx, it means the proxy is ready to
relay your traffic, at which point you turn the socket into an
SSL.Connection.
HTH.
--
Ng Pheng Siong <ngps at netmemetic.com>
http://firewall.rulemaker.net -+- Manage Your Firewall Rulebase Changes
http://www.post1.com/home/ngps -+- Open Source Python Crypto & SSL
More information about the Python-list
mailing list