Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit on bandwidth per user/connection/secret #72

Open
arpanetus opened this issue Jan 10, 2022 · 1 comment
Open

Limit on bandwidth per user/connection/secret #72

arpanetus opened this issue Jan 10, 2022 · 1 comment

Comments

@arpanetus
Copy link

Is there any way to configure it in a such way that I could limit on bandwidth per secret, connection or ~user?

Thanks.

@seriyps
Copy link
Owner

seriyps commented Jan 10, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants