add proxy support powered by PySocks

Read proxy option in imapserver, instantiate a class in imaplibutil
using a self-defined keyword and a socket instance, and use this socket
instance to substitute the default socket instance used in imaplib2.

Signed-off-by: 夏恺(Xia Kai) <xiaket@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
夏恺(Xia Kai)
2015-02-15 22:16:20 +08:00
committed by Nicolas Sebrecht
parent a1383da9b3
commit d36209a305
3 changed files with 104 additions and 18 deletions

View File

@ -380,6 +380,15 @@ remoterepository = RemoteExample
#filterheaders = X-Some-Weird-Header
# This option stands in the [Account Test] section.
#
# Use proxy connection for this account. Usefull to bypass the GFW in China.
# To specify a proxy connection, join proxy type, host and port with colons.
# Available proxy types are SOCKS5, SOCKS4, HTTP.
# You also need to install PySocks through pip.
#
#proxy = SOCKS5:localhost:9999
[Repository LocalExample]
# Each repository requires a "type" declaration. The types supported for