This repository was archived by the owner on May 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Working Behind a Proxy
Noam Meltzer edited this page Apr 19, 2018
·
11 revisions
PTB will obtain its proxy configuration in the following order (the first to be found will be used):
- Programmatic.
- Using
HTTPS_PROXYenvironment variable. - Using
https_proxyenvironment variable.
TOKEN='YOUR_BOT_TOKEN'
REQUEST_KWARGS={
'proxy_url': 'URL_OF_THE_PROXY_SERVER',
# Optional, if you need authentication:
urllib3_proxy_kwargs = {
'username': 'PROXY_USER',
'password': 'PROXY_PASS',
}
}
updater = Updater(TOKEN, request_kwargs=REQUEST_KWARGS)This is configuration is supported, but requires an optional/extra python package. To install:
pip install python-telegram-bot[socks]Wiki of python-telegram-bot © Copyright 2015-2022 – Licensed by Creative Commons
- Types of Handlers
- Advanced Filters
- Storing data
- Making your bot persistent
- Adding Defaults
- Exception Handling
- Job Queue
- Arbitrary
callback_data - Avoiding flood limits
- Frequently requested design patterns
- Code snippets
- Performance Optimizations
- Webhooks
- Telegram Passport
- Bots built with PTB
- Automated Bot Tests