diff --git a/README.md b/README.md index a0e283f..3412d80 100644 --- a/README.md +++ b/README.md @@ -656,6 +656,8 @@ telebot.logger.setLevel(logging.DEBUG) # Outputs debug messages to console. ``` ### Proxy +For sync: + You can use proxy for request. `apihelper.proxy` object will use by call `requests` proxies argument. ```python @@ -670,6 +672,14 @@ If you want to use socket5 proxy you need install dependency `pip install reques apihelper.proxy = {'https':'socks5://userproxy:password@proxy_address:port'} ``` +For async: +```python +from telebot import asyncio_helper + +asyncio_helper.proxy = 'http://127.0.0.1:3128' #url +``` + + ### Testing You can disable or change the interaction with real Telegram server by using ```python diff --git a/telebot/asyncio_helper.py b/telebot/asyncio_helper.py index be6223b..dde8c85 100644 --- a/telebot/asyncio_helper.py +++ b/telebot/asyncio_helper.py @@ -60,7 +60,7 @@ async def _process_request(token, url, method='get', params=None, files=None, re while not got_result and current_try