petterreinholdtsen/freedombox-setup — pull request #19 by jvalleroy (2014-03-23 18:50:57+00:00)
Title: Tor config changes

Here are several changes to the Tor configuration, based on feedback I received from the tor-relays mailing list and elsewhere:
1. ORPort is assigned automatically, rather than using a pre-defined port number.
2. ControlPort is enabled so we can check the assigned ORPort. It only listens on localhost and it requires a cookie (stored in /var/run/tor) for authentication, which only the root and debian-tor users should have access to.
3. SocksPort listens on all interfaces for now. Eventually we should have Plinth first-boot configuration ask the user about their network setup, and use that information to decide what interfaces to enable.
4. Include obfsproxy with obfs3 enabled. I check the tor logs to find out which port it is using.
5. Add tests for all of the above.
Scramblesuit is not enabled since it requires tor >= 0.2.5.1 (only in experimental at the moment). But I included a test as a reminder that we should enable it when it becomes available.