I tryed to start a simple Pyrogram example but was not working and had issue in connection.
Seems that telegram MTProto is not using dns names due to several reasons: - The system DNS service might be unstable, or even untrustful. - IP addresses and ports need to change frequently to react to network issues. Static IPs could be inaccessible in some regions. Then elastic IPs could be deployed to proxy traffic to data centers. The app should be able to update its endpoint configuration in time. - Solutions like Geo DNS is good for very coarse-grained IP selection. It’s better for the backend to control it directly.
It would be possible to whitelist Telegram IPs instead?