Solution for a networking course university assignment to visualize how the routes to a given target domain change over
time. Used technology:
Python 3.10: to develop the application
traceroute: to trace the routes to the target domain
mermaid.js: to visualize the routes
mume: to render markdown into static HTML
This project uses Python 3.10 features (because why not?), so you will need to have Python 3.10 installed.
Create a virtual environment and install the requirements:
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt
The target domains are defined as a static list in
targets. You can edit this list, or just
accept that they are the defaults.
You can start the trace generation by running:
python -m trace_vis.main
This will spawn a process which will trace the domains in
targets every 10 minutes. The results will be stored
trace_runs.json. If you feel like you gathered enough data, you can stop the process (very gracefully) by
After this, you will have to fix he JSON file manually, by placing all the lists into a single list, and removing the
last trailing comma.
As you have probably already guessed, these libraries lead us into the realms of
You can generate markdown files by running:
python -m trace_vis.vis
The files will be located in
You can render the markdown files by installing the necessary
npm packages and executing the
cd md npm i npm run build
index.html file will be generated in the
This project was created in ~1 hour to solve a sub-problem of a university assignment. I am aware of various points
where this tool could be enhanced, such as using Jinja templating to generate the markdown output, or to add a CLI, to
mention the least. Oh, and comments: adding more comments would have been nice too. These are TODOs for an idealistic (
yet improbable) future, in which I do not abandon this project after the assignment’s submission deadline.