From 3b4d00564d7671205bec761c789a4a4aedefd3e8 Mon Sep 17 00:00:00 2001 From: "Dmitry D. Chernov" Date: Mon, 11 Feb 2019 18:54:35 +1000 Subject: [PATCH] Detail docstring about the 'proxy' parameter in TelegramClient --- telethon/client/telegrambaseclient.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/telethon/client/telegrambaseclient.py b/telethon/client/telegrambaseclient.py index 76227e35..02cb05e9 100644 --- a/telethon/client/telegrambaseclient.py +++ b/telethon/client/telegrambaseclient.py @@ -61,8 +61,11 @@ class TelegramBaseClient(abc.ABC): By default this is ``False`` as IPv6 support is not too widespread yet. - proxy (`tuple` | `dict`, optional): - A tuple consisting of ``(socks.SOCKS5, 'host', port)``. + proxy (`tuple` | `list` | `dict`, optional): + An iterable consisting of the proxy info. If `connection` is + `ConnectionTcpMTProxy`, then it should contain MTProxy credentials: + ``('hostname', port, 'secret')``. Otherwise, it's meant to store + function parameters for PySocks, like ``(type, 'hostname', port)``. See https://github.com/Anorov/PySocks#usage-1 for more. timeout (`int` | `float`, optional):