globaleaks/GlobaLeaks — Issue #99: Detect connections from Tor
Author: hellais
Created: 2011-10-26 13:38:52+00:00
State: open
Labels: Feature, Security, Submission

We need to detect connections that are coming from Tor to display the anonymity level in the privacy box (#98).

The idea is to have tor2web send custom headers telling the GlobaLeaks node that the user is coming from tor2web. If the tor2web node detects that the user is visiting the site from Tor he should redirect to the .onion.

This is how these headers should look like:
X-tor2web: encrypted|plain-trusted|untrusted-tor|notor

encrypted: means that the user is connecting through https
plain: means http

(un)trusted: means the certificate is (not) self signed

notor: this means the user is connecting without tor
tor: ideally this should never be sent since the user will be redirected automatically to the HS.

On tor2web we should use torbel to get a list of all exit nodes and make a lookup to check if the ip is in that list.