{ "info": { "author": "The Tor Project, Inc", "author_email": "ooni-dev@torproject.org", "bugtrack_url": null, "classifiers": [], "description": "oonibackend: backend infrastructure for ooniprobe\n=================================================\n\n.. image:: https://travis-ci.org/TheTorProject/ooni-backend.png?branch=master\n :target: https://travis-ci.org/TheTorProject/ooni-backend\n\n.. image:: https://coveralls.io/repos/TheTorProject/ooni-backend/badge.png?branch=master\n :target: https://coveralls.io/r/TheTorProject/ooni-backend\n\noonibackend is used by ooniprobe to discover the addresses of test helpers (via\nthe bouncer) to submit reports to (via the collector) and to perform some\nmeasurements that require a backend system to talk to (via test helpers).\n\nIf you are interested in supporting the OONI project by running this backend\ninfrastructure follow this guide and then inform OONI developers of the address\nof your collector and test helper by sending an email to\nooni-talk@lists.torproject.org.\n\nDependencies and Installation\n=============================\n\nDistro dependencies (Debian)\n----------------------------\n\nThere are a few dependencies which we recommend you get from your\ndistribution's archives::\n\n sudo apt-get install build-essential python-dev python-setuptools openssl libsqlite3-dev libffi-dev\n\nTor\n...\n\nYou will need a Tor binary on your system. For complete instructions, see\nalso::\n\n https://www.torproject.org/docs/tor-doc-unix.html.en\n https://www.torproject.org/docs/rpms.html.en\n\nIf you've already got Tor, or plan to compile it yourself from source, great!\nYou can skip this step. Otherwise, if you're installing Tor (or reinstalling),\nyou'll want to make sure to get our keyring package in Debian::\n\n echo \"deb http://deb.torproject.org/torproject.org wheezy main\" | \\\n sudo tee -a /etc/apt/sources.list\n gpg --keyserver keys.gnupg.net --recv EE8CBC9E886DDD89\n gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -\n sudo apt-get update\n sudo apt-get install deb.torproject.org-keyring tor tor-geoipdb\n\nPip (>=1.3.0)\n.............\n\nWe recommend using the Pip>=1.3.0 because it included several important\nsecurity and privacy related patches:\n\n * It forces the use of HTTPS for [PyPI](pypi.python.org).\n * and checks package hash sums before installation, with support for hashes\n more collision-resistant than MD5.\n\nThe least painful way (that we know of) to install a newer Pip is to use Pip's\nget-pip script::\n\n # Grab the get-pip installer to make sure we have pip>=1.3.0\n curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py\n sudo python ./get-pip.py ## pip (>=1.3.0) is recommended for security reasons\n # And make sure we're actually using the newer one:\n sudo update-alternatives --install /usr/bin/pip pip /usr/local/bin/pip 0\n\nVirtualenv\n..........\n\nWe recommend that you use a python virtualenv. The recommended commands for\nsetting up this up and installing are::\n\n sudo pip install --upgrade virtualenv virtualenvwrapper\n # Setup the virtualenv directory:\n export WORKON_HOME=~/.virtualenvs && mkdir -p $WORKON_HOME\n source /usr/local/bin/virtualenvwrapper.sh\n # Clone ooni-backend:\n git clone https://github.com/TheTorProject/ooni-backend.git && cd ooni-backend\n # Create the virtualenv for ooni-backend...\n mkvirtualenv -a $PWD --unzip-setuptools --setuptools --no-site-packages oonib\n # ...and install ooni-backend (sudo is not necessary since we're in a virtualenv):\n pip install -r requirements.txt --use-mirrors\n # Note: it is important that you install the requirements before you run\n # the setup.py script. If you fail to do so they will be downloaded over\n # plaintext.\n python setup.py install\n\nRunning an OONI collector\n=========================\n\nConfigure oonib\n---------------\n\nCopy the example config file to ``oonib.conf``::\n\n cp oonib.conf.example oonib.conf\n\nThen edit your configuration to fit your needs. The fields you should probably\nend up changing are ``report_dir`` (the public web server directory where you\nwould like ooni-probe clients to be able to submit reports to, for example, if\nthe clients should submit POSTs to https://abcdef0123456789.onion/report then\nthis would simply be ``'report'``) and ``tor_datadir`` (where you would\nlike the spawned Tor process to keep its data). If you compiled Tor yourself,\nyou'll likely want to specify it for the ``tor_binary`` option.\n\nGenerate self signed certs for OONIB\n....................................\nIf you want to use the HTTPS test helper, you will need to create a\ncertificate::\n\n openssl genrsa -des3 -out private.key 4096\n openssl req -new -key private.key -out server.csr\n cp private.key private.key.org\n # Remove passphrase from key\n openssl rsa -in private.key.org -out private.key\n openssl x509 -req -days 365 -in server.csr -signkey private.key -out certificate.crt\n rm private.key.org\n rm server.csr\n\nIf you decide to put your certificate and key somewhere else, don't forget to\nupdate oonib.conf options ```helpers.ssl.private_key``` and ```helpers.ssl.certificate``` !\n\nRedirect low ports with iptables\n................................\n\nThe following iptables commands will map connections on low ports to those\nbound by oonib::\n\n # Map port 80 to config.helpers['http-return-json-headers'].port (default: 57001)\n iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 57001\n # Map port 443 to config.helpers.ssl.port (default: 57006)\n iptables -t nat -A PREROUTING -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 57006\n # Map port 53 udp to config.helpers.dns.udp_port (default: 57004)\n iptables -t nat -A PREROUTING -p tcp -m udp --dport 53 -j REDIRECT --tor-ports\n # Map port 53 tcp to config.helpers.dns.tcp_port (default: 57005)\n iptables -t nat -A PREROUTING -p tcp -m tcp --dport 53 -j REDIRECT --tor-ports\n\n(For Experts Only) Tor2webmode\n..............................\n\n**WARNING**: provides no anonymity! Use only if you know what you are doing!\nTor2webmode will improve the performance of the collector Hidden Service by\ndiscarding server-side anonymity.\n\nYou will need to build Tor from source. At the time of writing, the latest\nstable Tor is tor-0.2.3.25. You should use the most recent stable Tor.\n\nExample::\n\n git clone https://git.torproject.org/tor.git\n git checkout tor-0.2.3.25\n git verify-tag -v tor-0.2.3.25\n\nYou should see::\n\n object 17c24b3118224d6536c41fa4e1493a831fb29f0a\n type commit\n tag tor-0.2.3.25\n tagger Roger Dingledine 1353399116 -0500\n\n tag 0.2.3.25\n gpg: Signature made Tue 20 Nov 2012 08:11:59 UTC\n gpg: using RSA key C218525819F78451\n gpg: Good signature from \"Roger Dingledine \"\n gpg: aka \"Roger Dingledine \"\n gpg: aka \"Roger Dingledine \"\n\nIt is always good idea to verify::\n\n $ gpg --recv-keys C218525819F78451\n [...]\n $ gpg --fingerprint C218525819F78451\n pub 4096R/C218525819F78451 2010-05-07\n Key fingerprint = F65C E37F 04BA 5B36 0AE6 EE17 C218 5258 19F7 8451\n uid [ full ] Roger Dingledine \n uid [ full ] Roger Dingledine \n uid [ full ] Roger Dingledine \n sub 4096R/690234AC0DCC0FE1 2013-05-09 [expires: 2014-05-09]\n\nBuild Tor with enable-tor2web-mode::\n\n ./autogen.sh ; ./configure --enable-tor2web-mode ; make\n\nCopy the tor binary from src/or/tor somewhere and set the corresponding\noptions in oonib.conf.\n\nTo launch oonib on system boot\n------------------------------\nTo launch oonib on startup, you may want to use supervisord (www.supervisord.org)\nThe following supervisord config will use the virtual environment in\n/home/ooni/venv_oonib and start oonib on boot::\n\n [program:oonib]\n command=/home/ooni/venv_oonib/bin/python /home/ooni/ooni-probe/bin/oonib\n autostart=true\n user=oonib\n directory=/home/oonib/\n\nTesting with vagrant\n--------------------\n\nTo test the deployment of oonib you may use [vagrant](http://www.vagrantup.com).\n\nOnce installed you will be able to install oonib in the virtual machine via::\n\n vagrant up\n\n\nChangeLog\n=========\n1.1.4 (Wed, 1 Oct 2014)\n-----------------------\n\n* Fix bug that lead test helpers to not being started\n\n1.1.3 (Mon, 29 Sep 2014)\n-----------------------\n\n* Add support for specifying the report archive path from config file\n\n* Write tor notice level logs to file\n\n1.1.2 (Wed, 3 Sep 2014)\n-----------------------\n\n* Fix bug that lead oonib not running when a test helper was disabled.\n\n1.1.1 (Wed, 3 Sep 2014)\n-----------------------\n\n* Fix daemonize API breakage when upgrading from Twisted <= 13.1 to >= 13.2\n https://trac.torproject.org/projects/tor/ticket/12644\n\n* Make it possible to use a reports directory on a different volume than the\n archive directory.\n\n1.1.0 (Tue, 2 Sep 2014)\n-----------------------\n\n* Make changes to the bouncer API to make it aware of the policy of collectors.\n\n* Improve the bouncer API to make it more RESTful.\n\n* Add test helper that can be used to discover the DNS resolver being used by\n the probe.\n\n* Code coverage and unittesting improvements.\n\n* Fix compatibility with latest txtorcon versions.\n\n1.0.2 (Wed, 21 May 2014)\n------------------------\n\nVarious code improvements and fixes following the Least Authority release\nengineering work.\n\n1.0.0 (Wed, 26 Mar 2014)\n------------------------\n\nFirst public release of oonibackend\n\n* Implements collector for receiver reports.\n\n* Implements HTTPReturnJSONHeaders HTTP helper\n\n* Implement DNS resolver helper\n\n* Implements TCP echo helper\n\n* Implements bouncer for directing directing probes to an adequate collector\n and test helper.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://ooni.torproject.org", "keywords": null, "license": "BSD 2 clause", "maintainer": null, "maintainer_email": null, "name": "oonibackend", "package_url": "https://pypi.org/project/oonibackend/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/oonibackend/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://ooni.torproject.org" }, "release_url": "https://pypi.org/project/oonibackend/1.1.4/", "requires_dist": null, "requires_python": null, "summary": "Open Observatory of Network Interference Backend", "version": "1.1.4" }, "last_serial": 2755593, "releases": { "1.1.0": [ { "comment_text": "", "digests": { "md5": "78821fc45c1af6f950f1304affc63016", "sha256": "66841249e7792110933e4c7298bc8cab15e8863c30b86babe7743961f3a78ba5" }, "downloads": -1, "filename": "oonibackend-1.1.0.tar.gz", "has_sig": true, "md5_digest": "78821fc45c1af6f950f1304affc63016", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41004, "upload_time": "2014-09-02T11:01:48", "url": "https://files.pythonhosted.org/packages/d8/47/0de182c71b0dbd000c810cb77855e36d8c74d89ff6bdef8dcf45997d3b80/oonibackend-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "bc5e1e5d946b4559b140d2eddc3acc1e", "sha256": "061aa577586af605d3bd6f2c86dd03b466f243613f1d4e64fcfe528d1648b80a" }, "downloads": -1, "filename": "oonibackend-1.1.1.tar.gz", "has_sig": true, "md5_digest": "bc5e1e5d946b4559b140d2eddc3acc1e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41203, "upload_time": "2014-09-03T14:00:52", "url": "https://files.pythonhosted.org/packages/8f/5c/cfca3aae79472bc13a0a2554499dc4624edc6c61a0f775448259d76850be/oonibackend-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "52daf4979fc841ef69459dded7844995", "sha256": "1a671a70799b31468532332b180e45d2af1312e5b56d2baa080a3bc9e0b4f1af" }, "downloads": -1, "filename": "oonibackend-1.1.2.tar.gz", "has_sig": true, "md5_digest": "52daf4979fc841ef69459dded7844995", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41270, "upload_time": "2014-09-03T14:11:04", "url": "https://files.pythonhosted.org/packages/eb/cf/447be413b1d1ec6f77cca98a1446048465b01e5393e28736446fd2ebeda8/oonibackend-1.1.2.tar.gz" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "4e0e8ac68a3ad4a1eb05c9b47eace919", "sha256": "7a44061cbd7e797c91b4c71f26298cdc8088cd74310b1f194058629403000657" }, "downloads": -1, "filename": "oonibackend-1.1.3.tar.gz", "has_sig": true, "md5_digest": "4e0e8ac68a3ad4a1eb05c9b47eace919", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41580, "upload_time": "2014-09-29T18:14:03", "url": "https://files.pythonhosted.org/packages/55/6c/ffec9d59df6e10de7d84cb5208519e824cba216a3e39ae646bcf6dc99a94/oonibackend-1.1.3.tar.gz" } ], "1.1.4": [ { "comment_text": "", "digests": { "md5": "2c159feb369e8c21d36e22f2c378a185", "sha256": "19db5f513fec1cb45c7b1af345a96350e528536a5b482f424db36ef1fb1d3bab" }, "downloads": -1, "filename": "oonibackend-1.1.4.tar.gz", "has_sig": true, "md5_digest": "2c159feb369e8c21d36e22f2c378a185", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42117, "upload_time": "2014-10-01T10:25:39", "url": "https://files.pythonhosted.org/packages/f2/9d/e9b4a95d375495c40acc7b54bb67d96d63f4874fbb1284d4e940556ea6c9/oonibackend-1.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2c159feb369e8c21d36e22f2c378a185", "sha256": "19db5f513fec1cb45c7b1af345a96350e528536a5b482f424db36ef1fb1d3bab" }, "downloads": -1, "filename": "oonibackend-1.1.4.tar.gz", "has_sig": true, "md5_digest": "2c159feb369e8c21d36e22f2c378a185", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42117, "upload_time": "2014-10-01T10:25:39", "url": "https://files.pythonhosted.org/packages/f2/9d/e9b4a95d375495c40acc7b54bb67d96d63f4874fbb1284d4e940556ea6c9/oonibackend-1.1.4.tar.gz" } ] }