proxy -> telegram connection multiplexing
See original GitHub issueIt looks like it’s possible to multiplex many client -> proxy
connections into single proxy -> telegram
server connection based on RPC connection ID
https://github.com/alexbers/mtprotoproxy/blob/ed227da7c3afe67c876cd922661eedd0ec87da78/mtprotoproxy.py#L330 https://github.com/alexbers/mtprotoproxy/blob/ed227da7c3afe67c876cd922661eedd0ec87da78/mtprotoproxy.py#L358
You just have to maintain mapping between client -> proxy
and proxy -> telegram
sockets and send packets as a whole. And, probably, you will need to have some kind of proxy -> telegram
connection pool (separate pool for each dc_id
)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
MTProto · Project V Official - V2Ray
MTProto proxy is a special procol for Telegram. It consists of a pair of inbound and outboud proxies in V2Ray. They are usually...
Read more >How To Use Proxies With Telegram
Step 1. Open Telegram and click on the three vertical lines at the top left of it. ... Step 2. On it's menu,...
Read more >VPN over SSH? The Socks Proxy - Hacker News
I used this feature pretty often, but it has one downside: all connections are multiplexed into single one which is not good for...
Read more >SSH Multiplexing and Master Mode - oooops.dev
Multiplexing is a feature provided by SSH which alleviates these problems. It allows a single TCP connection to carry multiple SSH sessions.
Read more >Mux | V2Ray Beginner's Guide
Mux means multiplexing. In the current proxy tools, only V2Ray has this feature (2018-03-15 Note: there are other software implemented similar ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nice graphs! I think I will forward small messages (<4096 bytes) directly and big messages by parts. Also, for big messages it is possible to implement speed throttling on tcp level.
I tested the official proxy and I managed it to occupy a 1MB per client. The interesting thing, when I tried to test with about 300 clients, the official client always crashes:
I sent the program which predictably crashes a proxy by its address to the official proxy authors, hope they will fix soon.
Isn’t it 64Mb? https://github.com/alexbers/mtprotoproxy/blob/master/mtprotoproxy.py#L304
3 bytes = 24bits and you multiply it by 4, so:
2**24 * 4 / 1024 / 1024 = 64