Closed timoilya closed 4 years ago
No, Pyrogram does not support HTTP Proxies.
If you have, you can use a Socks5 Proxy.
@ColinTheShark why is this not supported? any technical nuances?
Pyrogram simply does no utilize any HTTP. It relies on encrypted traffic through Telegrams own MTProto Protocol.
@ColinTheShark but Telethon works with http-proxy
@timoilya HTTP proxies don't work because adding support for them requires adding support for the whole HTTP transport protocol first, to be used instead of the TCP counterpart, and that is technically very different.
Implementing the HTTP protocol would give people access to HTTP proxies, yes, but that would also give access to a much less reliable protocol, with a higher overhead due to both packet size and the use of long polling techniques instead of server's pushes.
A lot of thought have been put into making the TCP-based protocol stack and the whole library reliable enough to enable bots with half a million monthly active users work flawlessly, just to name an example. Doing the same for HTTP means I need to dedicate time to keep up with the quality, but currently this is a low priority feature.
@ColinTheShark but Telethon works with http-proxy
do your proxies work on telethon?
@ColinTheShark but Telethon works with http-proxy
do your proxies work on telethon?
Yes, but it has nothing to do with pyrogram
Yes, but it has nothing to do with pyrogram
can you show an example of telethon code? I have a problem that he does not want through a proxy
Yes, but it has nothing to do with pyrogram
can you show an example of telethon code? I have a problem that he does not want through a proxy
yes. you may write to tlgm by my github-username
Does pyrogram work with an http proxy? Are you planning to add it?