mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-30 22:05:28 +00:00
Update docs about Telegram data centers
This commit is contained in:
@@ -134,14 +134,23 @@ in a bunch of seconds:
|
|||||||
import logging
|
import logging
|
||||||
logging.basicConfig(level=logging.INFO)
|
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
|
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:
|
fails or not.
|
||||||
|
|
||||||
- DC1: ``149.154.175.50``
|
What are the IP addresses of Telegram Data Centers?
|
||||||
- DC2: ``149.154.167.51``
|
---------------------------------------------------
|
||||||
- DC3: ``149.154.175.100``
|
|
||||||
- DC4: ``149.154.167.91``
|
Telegram is currently composed by a decentralized, multi-DC infrastructure (each of which can work independently) spread
|
||||||
- DC5: ``91.108.56.149``
|
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!
|
I keep getting PEER_ID_INVALID error!
|
||||||
-------------------------------------------
|
-------------------------------------------
|
||||||
|
@@ -26,6 +26,12 @@ class GetUserDC(BaseClient):
|
|||||||
def get_user_dc(self, user_id: Union[int, str]) -> Union[int, None]:
|
def get_user_dc(self, user_id: Union[int, str]) -> Union[int, None]:
|
||||||
"""Get the assigned data center (DC) of a user.
|
"""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:
|
Parameters:
|
||||||
user_id (``int`` | ``str``):
|
user_id (``int`` | ``str``):
|
||||||
Unique identifier (int) or username (str) of the target chat.
|
Unique identifier (int) or username (str) of the target chat.
|
||||||
|
Reference in New Issue
Block a user