-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Description
Running a Telegram bot behind a proxy server that inspects traffic results in an SSL certificate error. Setting REQUESTS_CA_BUNDLE
or SSL_CERT_FILE
does not work because python-telegram-bot
uses certifi
which respects neither of the environment variables.
python-telegram-bot/telegram/utils/request.py
Lines 148 to 154 in d08172b
kwargs = dict( | |
maxsize=con_pool_size, | |
cert_reqs='CERT_REQUIRED', | |
ca_certs=certifi.where(), | |
socket_options=sockopts, | |
timeout=urllib3.Timeout(connect=self._connect_timeout, read=read_timeout, total=None), | |
) |
My feature request is that a parameter "use system certificates" or an argument for the certificates file path on the Updater
(and probably on Bot
as well because that class actually instantiates the Request
class) gets added.
It could also be an argument on the Request
class that we can set by passing the request_kwargs
to the Updater
or a Request
object directly to the Bot
.
Metadata
Metadata
Assignees
Labels
No labels