pyamsoft / tetherfi

TetherFi - Internet sharing without Root
Apache License 2.0
386 stars 29 forks source link

Bandwidth Limit/Cap for Connected Devices #279

Closed juliusm254 closed 2 months ago

juliusm254 commented 6 months ago

Feature request. Can we have a bandwidth limit setting for devices in list? This would be super cool.

Screenshot_20240309-134149_TetherFi

pyamsoft commented 6 months ago

Interesting.

I'll look at some way to track the amount of data used per client.

Assuming I am able to keep track, I would be able to then add a hard data usage limit, but I'm not sure about actively limiting bandwidth during usage. I'll certainly look at it though.

Thanks!

pyamsoft commented 6 months ago

Dev notes:

We can track the number of bytes used as a ulong, which will track up to 18446 petabytes, that's fine for now.

We have to change joinTo to copyTo finally close to track byte counts, but once we do that we should be good.

From there we can setup and enforce bandwidth usage limits per IP client.

juliusm254 commented 6 months ago

Great.

Thanks

pyamsoft commented 2 months ago

With the release of version 43, I have added the ability to define a bandwidth limit for each connected device, as well as define a device by a nick-name.

Thank you for your contribution to the project!