tcgui
A lightweight Python-based Web-GUI for Linux traffic control (tc) to set, view and delete traffic shaping rules.
Science Score: 52.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
✓Institutional organization owner
Organization tum-lkn has institutional domain (www.ei.tum.de) -
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.4%) to scientific vocabulary
Keywords
Repository
A lightweight Python-based Web-GUI for Linux traffic control (tc) to set, view and delete traffic shaping rules.
Basic Info
Statistics
- Stars: 169
- Watchers: 14
- Forks: 57
- Open Issues: 1
- Releases: 0
Topics
Metadata Files
README.md
tcgui
A lightweight Python-based Web-GUI for Linux traffic control (tc) to set, view and delete traffic shaping rules. The Web-GUI is intended for short-term isolated testbeds or classroom scenarios and does not contain any security mechanisms.

Requirements
netemtools &python3-flaskare required- Ubuntu 18.04 : Install with
sudo apt install iproute2 python3-flask - Ubuntu 20.04 : Install with
sudo apt install iproute2 python3-flask - Ubuntu 22.04 : Install with
sudo apt install iproute2 python3-flask
- Ubuntu 18.04 : Install with
- More information:
Usage
Execute the main.py file and go to http://localhost:5000:
```shell sudo python3 main.py
--ip IP The IP where the server is listening --port PORT The port where the server is listening --dev [DEV [DEV ...]] The interfaces to restrict to --regex REGEX A regex to match interfaces --debug Run Flask in debug mode ```
The tool will read your interfaces and the current setup every time the site is reloaded
Docker
You can use docker to run this application. Run with host network (--network host) and network admin capabilities (--cap-add=NET_ADMIN). Site will be available on default port Ex: http://dockerhost:5000
shell
docker run -dit --restart unless-stopped --network host --cap-add=NET_ADMIN ncareau/tcgui:latest
You can change the configuration using these Environment Variables:
- TCGUI_IP - Default
0.0.0.0- Use to change listening address - TCGUI_PORT - Default
5000- Use to change the listening port - TCGUI_DEV - The interfaces to restrict to
- TCGUI_REGEX - A regex to match interfaces
Docker-Compose
```shell docker compose up --build
To run in the background:
docker compose up -d --build ```
Make sure you read the line of
network_modeinside thedocker-compose.yml
If using an interface bridge, docker might cause issue with the bridge. (askubunut)
To fix this, create a file /etc/docker/daemon.json with the following contents:
json
{
"iptables" : false
}
Test & Develop
You can use the supplied Vagrantfile to test tcgui quickly. Vagrant will setup two machines, sender (192.168.210.2) and a receiver (192.168.210.3):
shell
vagrant up
Afterwards connect to the sender and start the GUI:
shell
vagrant ssh sender
cd /vagrant
sudo python3 main.py --ip 0.0.0.0 --debug
Start a receiver in the receiving VM:
shell
vagrant ssh receiver
iperf3 -s
Send a packet stream from the sender to the receiver:
shell
vagrant ssh sender
iperf3 -c 192.168.210.3 -t 300
Now access the GUI at http://192.168.210.2:5000/ and change the rate of interface eth1. You should see the sending/receiving rate to decrease to the set amount.
pre-commit git hooks
Setup
We use pre-commit to manage our git pre-commit hooks.
pre-commit is automatically installed from requirements.txt.
To set it up, call
sh
git config --unset-all core.hooksPath # may fail if you don't have any hooks set, but that's ok
pre-commit install --overwrite
Usage
With pre-commit, you don't use your linters/formatters directly anymore, but through pre-commit:
sh
pre-commit run --file path/to/file1.cpp tools/second_file.py # run on specific file(s)
pre-commit run --all-files # run on all files tracked by git
pre-commit run --from-ref origin/master --to-ref HEAD # run on all files changed on current branch, compared to master
pre-commit run <hook_id> --file <path_to_file> # run specific hook on specific file
Owner
- Name: TUM-LKN
- Login: tum-lkn
- Kind: organization
- Website: https://www.ei.tum.de/en/lkn/
- Repositories: 29
- Profile: https://github.com/tum-lkn
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Heß" given-names: "Benedikt" - family-names: "Sieber" given-names: "Christian" - family-names: "Hofbauer" given-names: "Markus" orcid: "https://orcid.org/0000-0002-8167-5485" - name: "TUM LKN team" title: "tcgui: A lightweight Python-based Web-GUI for Linux traffic control" date-released: 2016-07-05 url: "https://github.com/tum-lkn/tcgui"
GitHub Events
Total
- Watch event: 11
- Pull request event: 1
- Fork event: 3
Last Year
- Watch event: 11
- Pull request event: 1
- Fork event: 3
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 8
- Total pull requests: 22
- Average time to close issues: 11 days
- Average time to close pull requests: 24 days
- Total issue authors: 7
- Total pull request authors: 11
- Average comments per issue: 1.63
- Average comments per pull request: 1.55
- Merged pull requests: 15
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- eliaahadi (2)
- shawndcorn (1)
- amol7a (1)
- snyderra (1)
- darkbunny (1)
- sschalamon (1)
- pavolpolacek (1)
Pull Request Authors
- benjisho (4)
- ncareau (4)
- hofbi (4)
- riuriuriu (2)
- garaemon (2)
- AlexMeuer (1)
- maelk (1)
- marco-sacchi (1)
- mon (1)
- vozvivan (1)
- tjcomserv (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- black *
- flask *
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- github/codeql-action/analyze v2 composite
- github/codeql-action/autobuild v2 composite
- github/codeql-action/init v2 composite
- python 3.8-alpine build