safing / portmaster

🏔 Love Freedom - ❌ Block Mass Surveillance
https://safing.io
GNU General Public License v3.0
9.31k stars 299 forks source link

Speed limiter & priority #382

Closed skyemk closed 1 year ago

skyemk commented 3 years ago

What would you like to add or change?: A speed limiter that can be applied system-wise and app-wise. Priority to determine which software gets bandwidth.

Why do you and others need this?:

Set up a speed limit on a pc that only needs bare minimum bandwidth so it doesn't disrupt the rest of the network. (Currently using wondershaper on a nuc to achieve it)

While gaming, It will allow games to be the most prioritized in terms of download and upload speed, so, for example, music streaming will be considered less priority when speed drops or whatnot. Add in more applications, like twitch streaming, background updates from other apps etc (using netlimiter on windows to achieve this).

Limiting how much background apps or other services can take bandwidth away from priority applications.

Since priority is given to one exclusive application, let's say a syncing service or similar starts downloading or uploading, which will slow down the foreground experience in case the service that's taking up bandwidth decides to use up all available bandwidth.

PS: included software names so devs could look into them and not for advertising of any sort.

dhaavi commented 3 years ago

Hey @skyemk7777, thanks for the suggestion!

I think this is a great idea! With the current performance focused design of the Portmaster this will take a fair amount of work. Though what might happen earlier is that we implement traffic prioritization within the SPN. This would not impose a direct limit, but would make traffic from prioritized application always be handled first, only giving the rest to other applications.

A direct traffic limiting system would also be viable when using the SPN.

I will definitely bring this idea up with the team. For future reference, we are now tracking this internally with CC#2018.

github-actions[bot] commented 2 years ago

Assuming the original need was handled, this will be automatically closed now.

dhaavi commented 2 years ago

Sorry, issue was closed by misconfigured bot.

Rexadev commented 2 years ago

@dhaavi There are some apps on Windows having QoS and Bandwisth control example NetLimit and c_FosSpeeed

I think you don't realize the potential of PortMaster.

Duplicate I Posted - https://github.com/safing/portmaster/issues/616 https://github.com/safing/portmaster/issues/617

JamesYeoman commented 2 years ago

There are some apps on Windows having QoS and Bandwisth control example NetLimit and c_FosSpeeed

The problem is they're not open source, and they're paid apps. There's nothing FOSS out there. And your QoS issue is conflating two different ideas. QoS refers to the router's ability to prioritise the traffic from specific applications based on QoS packets (e.g. Discord's QoS High Packet Priority feature), or predefined routes set by the Network Admin.

Bandwidth limiting has nothing to do with Quality of Service. Bandwidth limiting is very different to priority-based network scheduling.

I think you don't realise the potential of PortMaster

Where did this come from? Is this in reference to your original issue where you were told that generic priority-based scheduling was infeasible? A developer gave you a very specific reason why it was infeasible. I appreciate that rejection is difficult to handle, but the fact is, some things just can't be done.

Networking can get messy, and there are a lot of variables that come into play. One step forwards would be to be able to mark specific tabs as high priority, so all requests that come from that specific tab automatically include the High Packet Priority. This isn't something that can be easily done by a firewall. You would need to physically intercept the packets, which I presume is why Dhaavi mentioned the SPN.

Many games include a QoS Packet feature. For example CS:GO.

If you really need priority-based routing, I highly suggest obtaining a new router. Preferably something that you can flash OpenWRT onto. See here for an example of Netgear-based QoS rules.

Rexadev commented 1 year ago

@dhaavi please reconsider its priority

DSDV commented 1 year ago

I noticed portmaster due to its extensive marketing campaign. But sadly since i switched to linux i miss the QoS Policy GUI from Windows. Every time a Program needs traffic all real time applications get high latency. Please add a feature to enable us setting DSCP values or some form of QoS.

Please <3

Rexadev commented 1 year ago

But sadly since i switched to linux i miss the QoS Policy GUI from Windows.

WIndows How ?

DSDV commented 1 year ago

@Rexadev i think its not beloning here but since one cant write private messages on github here is the explenation:

1 From the windows menu type "group policy" and click edit group policy. 2 Click on Computer Configuration > Windows Settings and right click "Policy Based QoS" 3 Create new policy and Name it (Counter-Strike is mine, any name's fine) 4 For Specify DSCP value enter 46 (leave throttling unchecked) click next. 5 Chose "Only Applications with this executable name" and type "csgo.exe" 6 Click next, leave everything and click next again 7 Choose TCP and UDP from the dropdown box leave all the other settings and click next. (Source: https://www.reddit.com/r/GlobalOffensive/comments/24xq5f/ )

dhaavi commented 1 year ago

I still think this is a great idea, but we currently do not have the resources to tackle this in the near future.

To improve our focus, I am closing this issue for now.