Archived Forum Post

Index of archived forum posts

Question:

problem using socks5 declaration with python and gmail

Jan 17 '14 at 22:56

Hi to every one,

This is my first post here. I've been trying mainly the imap module, first in vbs and now in python, in both cases I'm interested in using a proxy/socks5. In vbs there is no problem, it runs smoothly, but in python is another story. The first problem is that the chilkat.CkImap() class is no heritable, which is no big deal because is just a matter to declare every thing in the main part of the script. The second is that it can't connect to the gmail server if the proxy is declared first (server/port/socks5, it doesn't use user/pass), the proxy has to be declared after, which causes that the connection to the gmail server is done under no proxy, and the rest of the process is.... There's have to be a way to do the whole process through a proxy. If any one can give me a hint, it'll be much appreciated.

Gerardo


ps: I'm using python 3.3 under windows 8


ps2: I've seen the example in http://www.example-code.com/python/imap_socks_proxy.asp, but it doesn't work with a gmail server (may be because chilkat.CkImap in python forces some kind of configuration besides the ssl and the port?)


Answer

A SOCKS proxy server simply passes bytes, unmodified and unexamined, bidirectionally to/from both ends. Once the proxy connections are made, there couldn't be anything specific about GMAIL (or any other server) that would make a difference. From the GMail server's point of view, it doesn't even know that it's a proxy connection. It would appear just like any IMAP client connection.


Answer

Thank you, the proxy part is clear, any word in how to make it heritable the chilkat.CkImap class?