Hi,
Also is possible create a virtual machine how proxy with a SO linux, where the QoS is controled by a Squid.
To work with bandwith control, you need know the service or port that you set a min or max in compliance/agreed.
Exist a possibility of you prefer setting for source or destination IP too, all is possible if you work to it.
If you continue with a script to manual setting on machine, please let me know to work together.
gL!