mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-10-23 17:36:26 +02:00
Updated Working Behind a Proxy (markdown)
parent
e37ccb766a
commit
2a1af6b928
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ proxy_url = 'http://USERNAME:PASSWORD@PROXY_HOST:PROXY_PORT' # can also be a ht
|
|||
app = ApplicationBuilder().token("TOKEN").proxy(proxy_url).get_updates_proxy(proxy_url).build()
|
||||
```
|
||||
|
||||
In the last line, we setup the proxy such that it'll be used both for making requests to the Bot API like `Bot.send_message` ([`proxy_url()`](https://python-telegram-bot.readthedocs.io/telegram.ext.applicationbuilder.html#telegram.ext.ApplicationBuilder.proxy_url)) and for fetching updates from Telegram ([`get_updates_proxy_url`](https://python-telegram-bot.readthedocs.io/telegram.ext.applicationbuilder.html#telegram.ext.ApplicationBuilder.get_updates_proxy_url)). It is not necessary to setup a proxy for both, you can do it for either of them.
|
||||
In the last line, we setup the proxy such that it'll be used both for making requests to the Bot API like `Bot.send_message` ([`proxy()`](https://docs.python-telegram-bot.org/en/v20.7/telegram.ext.applicationbuilder.html#telegram.ext.ApplicationBuilder.proxy)) and for fetching updates from Telegram ([`get_updates_proxy`](https://docs.python-telegram-bot.org/en/v20.7/telegram.ext.applicationbuilder.html#telegram.ext.ApplicationBuilder.get_updates_proxy)). It is not necessary to setup a proxy for both, you can do it for either of them.
|
||||
|
||||
# Working Behind a Socks5 Server
|
||||
This configuration is supported, but requires an optional/extra python package.
|
||||
|
|
Loading…
Reference in a new issue