Code Monkey home page Code Monkey logo

traceroute-maps's Introduction

Traceroute visualization

The traceroute utility allows you to see all the network hops a network request makes before arriving at its destination. This is an useful tool for debugging, but it also provides an interesting insight into physical infrastructure - namely, datacenters and the internet backbone.

main.go accepts a single host as an argument:

go run main.go google.com

And then runs a traceroute of your request. From the output, it plucks the IP addresses, geolocates them with a free API, and then uses the always-handy Google Maps API to render the lines onto a map.

The program then spits out some HTML that is written to index.html, which I then view with php -S localhost:8080 and point my browser to that address.

The results are a not-so great estimation of what the internet backbone looks like (lukewarm applause)! My hope was that the lines would line up somewhat with the physical infrastructure of the Internet Backbone, but of course the hops are drawn in a straight line, which doesn't correspond to reality. See below hop from Denver-Miami-Kansas City-Oklahoma:

hops.png

But apparently, google has a datacenter in Pryor, OK, so I learned something new.

Most geolocation APIs are free. Google Map requires a card but there's a free threshold of requests that I don't plan to exceed.

TODO:

  • force-directed graph
  • lookup IP initially and start rendering draw from there
  • center map on the initial lookup

traceroute-maps's People

Contributors

abgordon avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.