Limit on bandwidth per user/connection/secret
Is there any way to configure it in a such way that I could limit on bandwidth per secret, connection or ~user?
Thanks.
Hi. There is no such functionality currently. It might be easy to implement for "inbound" traffic (eg, users uploading image/video), but not that easy to do for "outbound" traffic (users downloading images/videos etc) because of multiplexing. Because with multiplexing many "telegram app -> mtproxy" connections are multiplexed to a single "proxy -> telegram server" connection and there is no way for proxy to do a TCP backpressure for a single specific client. We can try to implement, but there is a risk proxy would use much more RAM then (because Telegram server will be sending data to proxy very fast, while proxy will be sending this data to client with limited speed, so, need to cache the data in memory).
It should be much more easy to implement in Python proxy, because it does not support multiplexing.