https://github.com/vpalmisano/throttler
A Linux tool that allows to apply network constraints to a single or a group of processes.
https://github.com/vpalmisano/throttler
bitrate latency loss netem network-analysis testing-tools throttle
Last synced: 4 months ago
JSON representation
A Linux tool that allows to apply network constraints to a single or a group of processes.
- Host: GitHub
- URL: https://github.com/vpalmisano/throttler
- Owner: vpalmisano
- License: agpl-3.0
- Created: 2024-09-20T14:45:10.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-27T05:42:07.000Z (5 months ago)
- Last Synced: 2025-05-27T06:33:32.335Z (5 months ago)
- Topics: bitrate, latency, loss, netem, network-analysis, testing-tools, throttle
- Language: TypeScript
- Homepage:
- Size: 1.14 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Throttler
[GitHub page](https://github.com/vpalmisano/throttler) | [Documentation](https://vpalmisano.github.io/throttler)A Linux tool that allows to apply network constraints to a single or a group of processes.
## Install
```bash
npm install -g @vpalmisano/throttler
```System configuration:
```bash
# Allow to run the required comamnds without password:
echo "$(whoami) ALL=(ALL) NOPASSWD: $(which iptables),$(which addgroup),$(which adduser),$(which tc),$(which modprobe),$(which ip)" | sudo tee /etc/sudoers.d/throttler# Install wireshark and allow regular user to capture packets:
sudo apt install -y wireshark
sudo dpkg-reconfigure wireshark-common
sudo usermod -a -G wireshark $(whoami)
# Logout and login again
```## Examples
Throttle all the traffic of a single process (e.g. firefox):
```bash
throttler \
--throttle-config '[{sessions:"0",up:[{delay:20,rate:5000}],down:[{delay:20,rate:5000}]}]' \
--command-config '[{session:0,command:"firefox https://www.speedtest.net"}]'
# press q to stop the throttler
```Throttle the udp traffic of a single process (e.g. firefox) and capture the packets:
```bash
throttler \
--throttle-config '[{sessions:"0",protocol:"udp",capture:"capture.pcap",up:[{delay:50,loss:1,rate:2000}],down:[{delay:20,loss:1,rate:2000}]}]' \
--command-config '[{session:0,command:"firefox https://meet.jit.si/"}]'
```