tempname1024 / allium Goto Github PK
View Code? Open in Web Editor NEWRepository moved to https://git.jordan.im/allium/
Home Page: https://relays.0x7c0.com
License: The Unlicense
Repository moved to https://git.jordan.im/allium/
Home Page: https://relays.0x7c0.com
License: The Unlicense
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/
make IPs clickable -> bgp.he.net so we can see the AS info when onionoo doesn't have any, example:
https://yui.cat/contact/c3b22345378ff4dbeceebfa61a5bb943/
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'
It would be nice to replicate Relay Search's behavior when it comes to displaying host names.
Example:
https://yui.cat/relay/364B9207753AC054BDC646AF6AAC7168C967C5A0.html (no information displayed)
vs.
https://metrics.torproject.org/rs.html#details/364B9207753AC054BDC646AF6AAC7168C967C5A0 (the unverified host name is displayed in orange)
https://metrics.torproject.org/onionoo.html#details_relay_unverified_host_names
So we can see all relays added on that day that are still included in onionoo data.
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.
It would be nice to see the (truncated) ContactInfo string on some pages.
a few ideas to get ContactInfo visible on the table:
make the dir address/port on the relay-level page clickable to view the DirFrontPage
example:
https://yui.cat/relay/EAA823552F959DFD038E9AC8FA89345A738B6C00.html
If avoid getting email from the torproject about the name "tor-metrics" eventually
I'd recommend coming up with a new name you like.
Example:
https://yui.cat/relay/364B9207753AC054BDC646AF6AAC7168C967C5A0.html
says
IPv4 Exit Policy Summary
accept: 53
but the raw data is something else:
https://onionoo.torproject.org/details?lookup=0110851758EA4986268DE30DE1CA2516797C827F
"exit_policy_summary":{"accept":["53","80","443"]}
https://metrics.torproject.org/rs.html#details/364B9207753AC054BDC646AF6AAC7168C967C5A0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.