Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
check.torproject.org
Python
Tree: 2c7d4b22e7

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
torcheck
.gitignore
README
TorCheck.py
setup.cfg
setup.py
torcheck.conf.example

README

Project History:

  The following files were removed from the torbel repository
  (https://git.torproject.org/torbel.git):
  
    torcheck/checkweb.py
    torcheck/bulklist.fcgi
  
  checkweb.py provides the page https://check.torproject.org, whose function is 
  to inform a visitor whether or not he is arriving from the Tor network.
  Additionally, https://check.torproject.org is the homepage of the Tor Browser
  Bundle (TBB), and informs visitors of available updates for TBB.
  
  #XXX: update location
  bulklist.fcgi provides the page ???, whose function is to provide a list of
  Tor relays with exit policies that allow connections to a user-supplied ip and
  port.


Installation:

  1. Install dependencies:

    Using pip:
    $ pip install Babel ipaddr mako twisted argparse

    Using a debian based distribution:
    # apt-get install python-twisted python-mako python-babel python-ipaddr \
      python-argparse

  2. Install TorCheck:

    $ python setup.py install


Translation:

   1. Create or update the translation template (.pot)

     Run the following command to extract the strings and create (or
     update) the translation template ./torcheck/i18n/torcheck.pot:
  
       $ python setup.py extract_messages
  
     Before pusing the .po file to Check.git, please make sure
     that it has the correct header; copyright set to The Tor
     Project, Inc, content-type charset set to UTF-8, and
     content-transfer-encoding to 8bit.
  
     Transifex will automatically pull new and updated strings from
     the .pot file (after you have pushed it to the Check.git
     repository) and update the translations.

   2. Add additional catalogs for any new languages:

     $ python setup.py init_catalog -l $LANG 
     (where '$LANG' is the 2 or 4 letter country-code, eg. 'es')
  
   3. Use translations

     We have a cron pulling translations for TorCheck from Transifex
     every hour or so. The translations.git repository will have one
     branch called "torcheck" and another called "torcheck_completed".
  
     Before using the translated .po files, please ensure that no one
     has tried to include anything malicious (such as XSS or fake
     links). See "2. Validating the input" in
     tpo/svn/translation/trunk/documentation/howto.txt for info.
  
     The next step is to convert the translations to binary format (.mo):
  
       $ python setup.py compile_catalog

     Don't forget to reinstall to update the templates!:

       $ python setup.py install


Configuration and deployment:
  
  1. Edit config file

    Copy the included torcheck.conf.example to torcheck.conf, and place it in
    somewhere readable by the that the user running TorCheck.
    The commented values are the default options.

    TorCheck needs torbel_export.csv and torbel_export.status, which are
    provided by TorBEL.
  
    TorCheck config options export_filename and status_filename must be
    configured to point to these files.

  2. Configure httpd 

    TorCheck does not serve static files, and your httpd must be configured to
    serve image and css files. These files can be found in:

      Check.git/torcheck/templates/css/ 
      Check.git/torcheck/templates/images/

    #XXX - I have noticed that TorCheck can look strange before the css files
    are loaded over Tor. TorCheck also includes templates with inline css that
    should perform better. Perhaps we should make these the default?

    #XXX include sample apache, nginx configs


Running:

  $ export PYTHONPATH=/path/to/directory/containing/torbel
  $ python -m TorCheck -c /path/to/torcheck.conf
Something went wrong with that request. Please try again.