Skip to content

blackjack4494/mtr-web

 
 

Repository files navigation

mtr-web

mtr-web is a WebSockets-based frontend for mtr, built with Flask (Python), AngularJS, and angular-websocket, allowing you to ping/traceroute a network from a remote HTTP server. This is a useful diagnostic tool while making changes to your own network configuration.

Example

Works with ipv4+6!
http://mtr.bambusmedia.de/

Installation

mtr

Compile mtr yourself
https://github.com/blackjack4494/mtr-ext

or use the following:

(NOTE! was built on Ubuntu18.04 - May not work everywhere!)
There is a compiled version of mtr in this project included.
I may provide more precompiled version (right now I have ubuntu18 - included - and one for arm rpi2 - not included)

You may need execute

sudo chmod +x mtr

Keep in mind mtr needs root privilege (mtr-packet will use raw sockets)

Core

sudo apt-get install mtr python python-pip -y
git clone https://github.com/blackjack4494/mtr-web
cd mtr-web
pip install Flask-Sockets gunicorn

Usage (client with integrated server)

gunicorn -b 0.0.0.0 -k flask_sockets.worker mtr-web:app

http://[your-ip]:8000

Nginx reverse proxy

For easier usage set up an nginx reverse proxy

location / {
                proxy_pass http://localhost:8000/;
}

You can also bind it to a specific subdomain (e.g. mtr)

Separate Client and Server

Client

To set up a client-only use

gunicorn -b 0.0.0.0 -k flask_sockets.worker mtr-client-web:app

You can input your websocket source (needs mtr-srv)

Server

To set up a server-only use

gunicorn -b 0.0.0.0:8070 -k flask_sockets.worker mtr-srv:app

You can now input the ip of your server with your running mtr-srv in the web client. Right now you need to add the port [ip]:8070 to your ip.

Run mtr-web as a 24/7 service

Right now you can easily use

screen

You just need to put it infront of the commands above.

About

A WebSockets-based frontend for mtr.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 83.0%
  • Python 17.0%