[tor-commits] [metrics-web/master] Update contents on Tools page.

karsten at torproject.org karsten at torproject.org
Mon Jan 9 17:03:42 UTC 2017


commit 46b10f20a015523c9fc777b05a28e051a27489fb
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Wed Dec 14 20:29:39 2016 +0100

    Update contents on Tools page.
---
 website/etc/categories.json                        | 11 ++-
 .../org/torproject/metrics/web/GraphServlet.java   |  1 +
 .../org/torproject/metrics/web/LinkServlet.java    | 27 ++++++
 .../org/torproject/metrics/web/TableServlet.java   | 13 +++
 website/web/WEB-INF/link.jsp                       | 32 +++++++-
 website/web/WEB-INF/table.jsp                      |  4 +
 website/web/WEB-INF/tools.jsp                      | 95 +++++++++++++++++++++-
 7 files changed, 178 insertions(+), 5 deletions(-)

diff --git a/website/etc/categories.json b/website/etc/categories.json
index 103ac9d..9a10aea 100644
--- a/website/etc/categories.json
+++ b/website/etc/categories.json
@@ -12,7 +12,8 @@
       "userstats-bridge-version",
       "userstats-relay-table",
       "userstats-censorship-events",
-      "userstats-bridge-table"
+      "userstats-bridge-table",
+      "oxford-anonymous-internet"
     ]
   },
   {
@@ -24,7 +25,10 @@
       "networksize",
       "relayflags",
       "versions",
-      "platforms"
+      "platforms",
+      "uptimes",
+      "networkchurn",
+      "bubbles"
     ]
   },
   {
@@ -38,7 +42,8 @@
       "advbwdist-perc",
       "advbwdist-relay",
       "bwhist-flags",
-      "dirbytes"
+      "dirbytes",
+      "uncharted-data-flow"
     ]
   },
   {
diff --git a/website/src/org/torproject/metrics/web/GraphServlet.java b/website/src/org/torproject/metrics/web/GraphServlet.java
index 5e90499..917980b 100644
--- a/website/src/org/torproject/metrics/web/GraphServlet.java
+++ b/website/src/org/torproject/metrics/web/GraphServlet.java
@@ -135,6 +135,7 @@ public class GraphServlet extends MetricServlet {
       return;
     }
     List<String[]> categories = new ArrayList<String[]>();
+    /* TODO Some of the following code should move to init(). */
     for (Category category :
         ContentProvider.getInstance().getCategoriesList()) {
       if (category.getMetrics().isEmpty()
diff --git a/website/src/org/torproject/metrics/web/LinkServlet.java b/website/src/org/torproject/metrics/web/LinkServlet.java
index fc413f5..c8f4d46 100644
--- a/website/src/org/torproject/metrics/web/LinkServlet.java
+++ b/website/src/org/torproject/metrics/web/LinkServlet.java
@@ -4,6 +4,8 @@
 package org.torproject.metrics.web;
 
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
@@ -28,8 +30,33 @@ public class LinkServlet extends MetricServlet {
       response.sendError(HttpServletResponse.SC_BAD_REQUEST);
       return;
     }
+    List<String[]> categories = new ArrayList<String[]>();
+    /* TODO Some of the following code should move to init(). */
+    for (Category category :
+        ContentProvider.getInstance().getCategoriesList()) {
+      if (category.getMetrics().isEmpty()
+          || this.categories.get(requestedId).equals(category)) {
+        categories.add(new String[] { "", category.getHeader() });
+      } else {
+        categories.add(new String[] { category.getMetrics().get(0),
+            category.getHeader() });
+      }
+    }
+    request.setAttribute("categories", categories);
     request.setAttribute("id", requestedId);
     request.setAttribute("title", this.titles.get(requestedId));
+    if (this.categories.containsKey(requestedId)) {
+      Category category = this.categories.get(requestedId);
+      request.setAttribute("categoryHeader", category.getHeader());
+      request.setAttribute("categoryDescription", category.getDescription());
+      List<String[]> categoryTabs = new ArrayList<String[]>();
+      for (String metricId : category.getMetrics()) {
+        categoryTabs.add(new String[] {
+            this.titles.get(metricId),
+            requestedId.equals(metricId) ? null : metricId });
+      }
+      request.setAttribute("categoryTabs", categoryTabs);
+    }
     request.setAttribute("description",
         this.descriptions.get(requestedId));
     request.setAttribute("data", this.data.get(requestedId));
diff --git a/website/src/org/torproject/metrics/web/TableServlet.java b/website/src/org/torproject/metrics/web/TableServlet.java
index 035c0be..a47a720 100644
--- a/website/src/org/torproject/metrics/web/TableServlet.java
+++ b/website/src/org/torproject/metrics/web/TableServlet.java
@@ -48,6 +48,19 @@ public class TableServlet extends MetricServlet {
       response.sendError(HttpServletResponse.SC_BAD_REQUEST);
       return;
     }
+    List<String[]> categories = new ArrayList<String[]>();
+    /* TODO Some of the following code should move to init(). */
+    for (Category category :
+        ContentProvider.getInstance().getCategoriesList()) {
+      if (category.getMetrics().isEmpty()
+          || this.categories.get(requestedId).equals(category)) {
+        categories.add(new String[] { "", category.getHeader() });
+      } else {
+        categories.add(new String[] { category.getMetrics().get(0),
+            category.getHeader() });
+      }
+    }
+    request.setAttribute("categories", categories);
     request.setAttribute("id", requestedId);
     request.setAttribute("title", this.titles.get(requestedId));
     if (this.categories.containsKey(requestedId)) {
diff --git a/website/web/WEB-INF/link.jsp b/website/web/WEB-INF/link.jsp
index 08f7d7b..096fddb 100644
--- a/website/web/WEB-INF/link.jsp
+++ b/website/web/WEB-INF/link.jsp
@@ -12,8 +12,38 @@
 <body>
   <div class="center">
     <div class="main-column">
+        <h2><a href="/"><img src="images/metrics-logo.png" width="153" height="200" alt="Metrics logo"><img src="images/metrics-wordmark.png" width="384" height="50" alt="Metrics wordmark"></a></h2>
+        <br>
+
+<p>"Tor metrics are the ammunition that lets Tor and other security
+advocates argue for a more private and secure Internet from a position
+of data, rather than just dogma or perspective."
+<i>- Bruce Schneier (June 1, 2016)</i></p>
+
+        <!-- Navigation start -->
+        Metrics |
+        <a href="about.html">About</a> |
+        <a href="news.html">News</a> |
+        <a href="sources.html">Sources</a> |
+        <a href="tools.html">Tools</a> |
+        <a href="research.html">Research</a>
+        <br>
+        <br>
+        <!-- Navigation end -->
+
+<c:forEach var="category" items="${categories}"><c:if test="${fn:length(category[0]) > 0}"><a href="${category[0]}.html"></c:if>${category[1]}<c:if test="${fn:length(category[0]) > 0}"></a></c:if> |
+</c:forEach>
+<br>
+
+<h2>${categoryHeader}</h2>
+
+<p>${categoryDescription}</p>
+
+<c:forEach var="tab" items="${categoryTabs}">
+<c:if test="${fn:length(tab[1]) > 0}"><a href="${tab[1]}.html"></c:if>${tab[0]}<c:if test="${fn:length(tab[1]) > 0}"></a></c:if> |
+</c:forEach>
+<br>
 
-<h2><a href="."><img src="images/metrics-wordmark-small.png" width="138" height="18" alt="Metrics wordmark"></a> — ${title}</h2>
 <br>
 ${description}
 
diff --git a/website/web/WEB-INF/table.jsp b/website/web/WEB-INF/table.jsp
index eece114..1e867a8 100644
--- a/website/web/WEB-INF/table.jsp
+++ b/website/web/WEB-INF/table.jsp
@@ -31,6 +31,10 @@ of data, rather than just dogma or perspective."
         <br>
         <!-- Navigation end -->
 
+<c:forEach var="category" items="${categories}"><c:if test="${fn:length(category[0]) > 0}"><a href="${category[0]}.html"></c:if>${category[1]}<c:if test="${fn:length(category[0]) > 0}"></a></c:if> |
+</c:forEach>
+<br>
+
 <h2>${categoryHeader}</h2>
 
 <p>${categoryDescription}</p>
diff --git a/website/web/WEB-INF/tools.jsp b/website/web/WEB-INF/tools.jsp
index d935989..c1a2512 100644
--- a/website/web/WEB-INF/tools.jsp
+++ b/website/web/WEB-INF/tools.jsp
@@ -31,9 +31,102 @@ of data, rather than just dogma or perspective."
         <br>
         <!-- Navigation end -->
 
-<h3>Tools</h3>
+<h1>Tools</h1>
 <br>
 
+<p>We list some tools that you can use to collect data about Tor. We don't use
+all of the tools listed here. We use CollecTor to collect (relay data, bridge
+data, etc), OONI to collect (data, data, data), and Onionoo to collect (data,
+data, data).</p>
+
+<p>With these other tools, you can measure different things about Tor that we
+currently do not! We encourage you to do so if you are curious, want check up on
+your relays, or conduct some research.</p>
+
+<h2>Our sources</h2>
+
+<ul>
+<li><a href="https://collector.torproject.org/">CollecTor</a> collects data from
+various nodes and services in the public Tor network.</li>
+<li><a href="https://ooni.torproject.org/">OONI</a>, detects censorship,
+surveillance and traffic manipulation on the internet.</li>
+<li><a href="https://onionoo.torproject.org/">Onionoo</a> provides current and
+past data on relays and bridges to other services.</li>
+</ul>
+
+<h2>Others</h2>
+
+<ul>
+<li><a href="https://gitweb.torproject.org/user/phw/exitmap.git">Exitmap</a> is
+a fast and extensible scanner for Tor exit relays.</li>
+<li><a href="https://github.com/robgjansen/onionperf">OnionPerf</a> measures the
+performance of onion services.</li>
+<li><a href="https://gitweb.torproject.org/torperf.git">Torperf</a> measures Tor
+performance with a set of utilities and Python scripts.</li>
+<li><a href="https://www.torproject.org/projects/tordnsel.html.en">TorDNSEL</a>
+publishes lists of IP addresses of multi-homed Tor exits.</li>
+<li><a
+href="https://gitweb.torproject.org/user/phw/sybilhunter.git/">Sybilhunter</a>
+attempts to detect Sybil attacks on the Tor network.</li>
+<li><a href="https://exonerator.torproject.org/">ExoneraTor</a> tells you if an
+IP was used by a Tor relay on a given date.</li>
+<li><a href="https://torps.github.io/">TorPS</a> simulates changes to Tor's path
+selection algorithm using archived data.</li>
+<li><a
+href="https://play.google.com/store/apps/details?id=com.networksaremadeofstring.anonionooid">AnOnionooid</a>
+is an Android app that helps find and explore Tor relays and bridges.</li>
+<li><a href="https://atlas.torproject.org/">Atlas</a> displays data about single
+relays and bridges in the Tor network.</li>
+<li><a href="https://compass.torproject.org/">Compass</a> groups current relays in
+different ways to measure Tor's network diversity.</li>
+<li><a href="https://oniontip.com/">OnionTip</a> distributes bitcoin donations
+to relays that can receive them.</li>
+<li><a href="https://onionview.codeplex.com/">OnionView</a> plots the location
+of active Tor nodes on an interactive map of the world.</li>
+<li><a href="https://consensus-health.torproject.org/">Consensus Health</a>
+displays information about the current directory consensus and votes.</li>
+<li><a
+href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-consensus-health">Consensus
+Issues</a> emails directory authority operators about consensus problems.</li>
+<li><a href="https://onionview.codeplex.com/">Check</a> uses<a
+href="https://www.torproject.org/projects/tordnsel.html.en">TorDNSEL</a> data to
+tell users whether they are using Tor or not.</li>
+<li><a href="https://shadow.github.io/">Shadow</a> uses archived Tor directory
+data to generate realistic network topologies.</li>
+<li><a href="http://lists.infolabe.net/lists/listinfo/infolabe-anomalies">OII's
+anomaly detection system</a> ranks countries by how anomalous their Tor usage
+is.</li>
+<li>Tor's <a
+href="https://gitweb.torproject.org/tor.git/tree/scripts/maint/updateFallbackDirs.py">fallback
+directories script</a> generates a list of stable directories.</li>
+<li><a href="https://github.com/duk3luk3/onion-py">OnionPy</a> provides memcached support to cache queried data.</li>
+</ul>
+
+<h2>Things we took out for now</h2>
+
+<ul>
+<li><a href="http://tor2web.org/">Tor2web</a> is a web proxy for Tor Hidden
+Services.</li>
+<li><a href="https://tor-explorer-10kapart2016.azurewebsites.net/">Tor
+Explorer</a> displays data on each individual Tor node.</li>
+<li><a href="https://nos-oignons.net/Services/index.en.html">Nos oignons</a>
+visualizes bandwidth histories of their relays.</li>
+<li><a href="https://github.com/kloesing/challenger">challenger</a> aggregates
+data from relays participating in EFF's 2014 Tor Challenge.</li>
+<li>A <a href="https://duckduckgo.com/">DuckDuckGo</a> search with "tor node"
+keywords displays Tor node details.</li>
+<li><a
+href="https://metrics.torproject.org/uncharted-data-flow.html">metrics-lib</a>
+is a Java library to fetch and parse Tor descriptors.</li>
+<li><a href="https://stem.torproject.org/">Stem</a> is a Python library that
+parses Tor descriptors.</li>
+<li><a href="https://github.com/meejah/txtorcon">Txtorcon</a> is an asynchronous
+Tor controller library written in Twisted Python.</li>
+<li><a href="https://github.com/NullHypothesis/zoossh">Zoossh</a> is a parser written in Go for Tor-specific data formats.</li>
+<li><a href="https://savannah.nongnu.org/projects/koninoo/">koninoo</a> is a
+simple Java command line interface for querying Onionoo data.</li>
+</ul>
+
     </div>
   </div>
   <div class="bottom" id="bottom">





More information about the tor-commits mailing list