Coder Social home page Coder Social logo

allium's Introduction

allium: generate static tor relay metrics and statistics

usage: allium.py [-h] [--out] [--onionoo-url]

optional arguments:
  -h, --help     show this help message and exit
  --out          directory to store rendered files (default "./www")
  --onionoo-url  onionoo HTTP URL (default
                 "https://onionoo.torproject.org/details")

ABOUT

  allium generates a set of HTML documents which represent the total set of tor
  relays at the time of execution

  allium is heavily inspired by the official tor metrics project[0] and serves
  as a javascript-free, statically-generated clean room implementation. the
  primary goals of the project are to be fast (static), use few API queries
  (one), and to present information in a condensed, readable format

REQUIRES

  python3
  Jinja2>=2.11.2

INSTALL

  pip install -r requirements.txt
  cd allium
  ./allium.py

LICENSE

  this project includes country flags from GoSquared[1] and relay flags from the
  Tor Project[2], the licenses of which are included in this project's root
  directory; all code is published under UNLICENSE (public domain)

  [0] https://metrics.torproject.org/
  [1] https://github.com/gosquared/flags
  [2] https://www.torproject.org/

allium's People

Contributors

tempname1024 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

allium's Issues

Error, bug? - UndefinedError: 'dict object' has no attribute 'exit_count,1'

python3 generate.py

Traceback (most recent call last):
  File "generate.py", line 44, in <module>
    RELAY_SET.write_misc(
  File "/home/allium/relays.py", line 217, in write_misc
    template_render = template.render(
  File "/usr/lib/python3/dist-packages/jinja2/asyncsupport.py", line 76, in render
    return original_render(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File "/home/allium/templates/misc-families.html", line 2, in <module>
    {% set sorted_by_label = sorted_by.split(',')[0].split('.')[1] -%}
  File "/home/allium/templates/skeleton.html", line 45, in <module>
    {% block body %}
  File "/home/allium/templates/misc-families.html", line 41, in <module>
    {% for k, v in relays.json['sorted']['family'].items()|sort(attribute=sorted_by,
  File "/usr/lib/python3/dist-packages/jinja2/filters.py", line 283, in do_sort
    return sorted(value, key=key_func, reverse=reverse)
  File "/usr/lib/python3/dist-packages/jinja2/filters.py", line 82, in attrgetter
    item = environment.getitem(item, part)
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 411, in getitem
    return obj[argument]
jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'exit_count,1'

Implement parser and proof verifier for nusenu's ContactInfo-Information-Sharing-Specification

The ContactInfo-Information-Sharing-Specification formalizes the ContactInfo string, providing a standard to declare additional information relevant to a particular relay and its operator. These attributes could be rendered alongside existing onionoo metadata on per-relay pages.

The standard supports methods to verify the authenticity of certain attributes relating to its operator by way of a /.well-known/tor-relay/rsa-fingerprint.txt file hosted on the entity's webserver, or a TXT DNS record for each relay fingerprint (relay-fingerprint.example.com) with the value we-run-this-tor-relay. Relays can be marked "verified" provided these proofs are present and accurate.

Relays and families of verified operators/domains should include an outbound link to their corresponding graph at OrNetStats.

add a Contact column

It would be nice to see the (truncated) ContactInfo string on some pages.

a few ideas to get ContactInfo visible on the table:

  • truncate it to 50 chars
  • remove the Platform column in favor of ContactInfo
  • condense the ASN into the AS Name column by using "name (number)" example: "OVH SAS (AS16276)"
  • make the Running column as condensed as on atlas.torproject.org

find a name

If avoid getting email from the torproject about the name "tor-metrics" eventually
I'd recommend coming up with a new name you like.

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.