Update docs about Telegram data centers

This commit is contained in:
Dan 2019-06-08 11:33:52 +02:00
parent b46ffe1414
commit 2e05c81a5c
2 changed files with 22 additions and 7 deletions

View File

@ -134,14 +134,23 @@ in a bunch of seconds:
import logging
logging.basicConfig(level=logging.INFO)
Another way to confirm you aren't able to connect to Telegram is by pinging these IP addresses and see whether ping
fails or not:
Another way to confirm you aren't able to connect to Telegram is by pinging the IP addresses below and see whether ping
fails or not.
- DC1: ``149.154.175.50``
- DC2: ``149.154.167.51``
- DC3: ``149.154.175.100``
- DC4: ``149.154.167.91``
- DC5: ``91.108.56.149``
What are the IP addresses of Telegram Data Centers?
---------------------------------------------------
Telegram is currently composed by a decentralized, multi-DC infrastructure (each of which can work independently) spread
in 5 different locations. However, two of the less busy DCs have been lately dismissed and their IP addresses are now
kept as aliases.
- **DC1** - MIA, Miami FL, USA: ``149.154.175.50``
- **DC2** - AMS, Amsterdam, NL: ``149.154.167.51``
- **DC3*** - MIA, Miami FL, USA: ``149.154.175.100``
- **DC4*** - AMS, Amsterdam, NL: ``149.154.167.91``
- **DC5** - SIN, Singapore, SG: ``91.108.56.149``
***** Alias DC
I keep getting PEER_ID_INVALID error!
-------------------------------------------

View File

@ -26,6 +26,12 @@ class GetUserDC(BaseClient):
def get_user_dc(self, user_id: Union[int, str]) -> Union[int, None]:
"""Get the assigned data center (DC) of a user.
.. note::
This information is approximate: it is based on where the user stores their profile pictures and does not by
any means tell you the user location. More info at
`FAQs <../faq#what-are-the-ip-addresses-of-telegram-data-centers>`_.
Parameters:
user_id (``int`` | ``str``):
Unique identifier (int) or username (str) of the target chat.