This repository has been archived by the owner on Jan 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
track adoption of onion services among news organizations via the Onion-Location header #262
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ready for an initial look over |
redshiftzero
changed the title
[wip] track adoption of onion services among news organizations via the Onion-Location header
track adoption of onion services among news organizations via the Onion-Location header
Aug 24, 2020
@thisisparker and I were chatting just now and:
|
redshiftzero
added a commit
to redshiftzero/stn-tweets
that referenced
this pull request
Aug 26, 2020
Using dict.get(key, default) here to avoid a KeyError in case: 1. this change is deployed prior to the corresponding STN change [0] or, 2. the bot compares with a prior scan that lacks the onion_available key [0] freedomofpress/securethenews#262
chigby
approved these changes
Aug 31, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything in here looks very good to me. I played around with some scans locally and the Onion Location header detection and reporting worked as expected. So on that basis I think this is worth deploying as-is.
For future enhancements, I do think it would be nice to get some form of verification that the onion location URL is actually up and working. Yet that can come later.
This is very cool! Looks like a rebase will fix the npm_audit check. |
Onion-Location is a header for advertising you have an onion service [0]. Onion services protect reader privacy, and enable folks in censored regions to reach censored news organizations. Tor Browser uses the Onion-Location header in order to display a "onion available" icon for users to click on. The Onion-Location (like other HTTP headers) is not case sensitive, hence the .lower() before checking for the presence of the onion-location key in the headers dict. Also note that "onion available" is only shown in Tor Browser [1] and the redirect to onion only occurs [2] if the site is over HTTPS. [0] https://gitweb.torproject.org/tor-browser-spec.git/tree/proposals/100-onion-location-header.txt [1] acatarineu/tor-browser@0721f13#diff-84dbdcf5e7c0177889f69f8e36ec8ea1R47 [2] acatarineu/tor-browser@3a9929a#diff-70a990c1d10c050c5fcc69b226c33c5eR2647-R2648
redshiftzero
force-pushed
the
onion-available
branch
from
September 2, 2020 19:10
4b4d697
to
0e417c7
Compare
thanks @chigby and @maeve-fpf - rebased and CI is indeed passing now 😇 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Towards #128, please let me know what you think of adding onion service tracking.
screenshots
per site page
leaderboards
Grades are adjusted such that you cannot get an A+ without having an onion service (down to discuss this in more detail)
TODO