Skip to content
A lightweight Python-based Web-GUI for Linux traffic control (tc) to set, view and delete traffic shaping rules.
Python HTML
Branch: master
Clone or download
Benedikt Hess
Benedikt Hess removed spelling error
Latest commit 51ab15d Oct 4, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
templates units of the rate can now be changed Sep 30, 2019
.gitignore Added Vagrantfile for test and development purposes. Mar 20, 2019
LICENSE Added names to LICENSE Jul 5, 2016
README.md Add screenshot to README Oct 1, 2019
Vagrantfile Bugfix Mar 20, 2019
main.py removed spelling error Oct 4, 2019
tcgui.png Add screenshot to README Oct 1, 2019

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.

No further changes are planned right now, but pull requests are welcome.

tcgui screenshot

Requirements

Usage

  • Execute the main.py file and go to http://localhost:5000:

    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

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):

vagrant up

Afterwards connect to the sender and start the GUI:

vagrant ssh sender
cd /vagrant
sudo python3 main.py --ip 0.0.0.0 --debug

Start a receiver in the receiving VM:

vagrant ssh receiver
iperf3 -s

Send a packet stream from the sender to the receiver:

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.

You can’t perform that action at this time.