Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@tgwf/greentrace-cli

thegreenwebfoundation21Apache-2.00.2.0

A bit like traceroute, but for green internet. Libraries used in Greentrace

tgwf, sustainability, green, web, trace, route, geolite

readme

Greentrace lib

The standalone library used by the GreenTrace App to show

  • where packets are hoping through the world when you make a request from your machine, based on the Geolite IP Database

  • which hops pass through infrastructure running on green energy, as listed by the Green Web Foundation

Usage

As a command line tool

This will run a traceroute, then print to STDOUT a GeoJSON file with coordinates for every IP address, as looked up in the GeoIP database.

npx greentrace --domain=yourdomain.com

Note: it's not fast. I'd welcome pointers on making this run faster, without losing too much info.

As a library

You can also run this as a library in a larger application. You can see this in use in the greentrace electron app, designed plot these hops on a map.

import GreenTrace from "@tgwf/greentrace-lib"

// return a Promise, that resolves to an array
const hops = await GreenTrace.trace(domainName)

// make this into something we can put on a map
const hopsAsgeoJSON = hops.toGeoJSON()

Licenses

There are two licenses, for the code and data. See the LICENSE file for details.

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[0.2.0]

Added

  • Added method to generate data suitable for ArcLayers in deck.gl

Changed

  • Tidy up code for fetching IP addresses from data structures returned by GeoLiteDB.

[0.1.0] - 2020-03-03

Added

  • Added a changelog at last!
  • Added a binary to make it easier to run after installing

Changed

  • Updated README with a bit more background information.

[0.0.2] - Summer 2019

Added

  • First published to npm