Closed iamyashg closed 1 year ago
Team Replit Answer on this Telethon/Pyrogram Issue —
We have identified the issue. To combat abuse, we require all HTTP traffic to have either an SNI (Server Name Identification) or a Hostname header. Pyrogram connects to raw IP addresses without specifying an SNI or a Hostname header.
The issue here is that Pyrogram will need to update its codebase to support this, or users who intend to run Telegram bots on Replit will need to use a library other than Pyrogram (that is until they fix the issue) if they intend to host their Repl without using Deployments.
Source: https://ask.replit.com/t/pyrogram-network-issue/33679/38
We only allow HTTP traffic out of HTTP ports, such as 443. The issue here is that Telegram clients such as Pyrogram use MTProto (not HTTP) for their connection but run it through 443. So that is why changing the port from 443 to 5222 will work, as we won’t force it to be HTTP traffic.
Source: https://ask.replit.com/t/pyrogram-network-issue/33679/46
Final Solution for TGCF Part —
File Path: venv/lib/python3.10/site-packages/telethon/network/connection/connection.py
Go to line no. 219
Edit the port=self._port,
to port=5222,
I have deployed tgcf on replit (it's always on as I have hacker plan).
Its not forwading any message from source to destination
Below are the logs :
Check below discussion for more info on this..
Originally posted by @iamyashg in https://github.com/aahnik/tgcf/discussions/463