mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-04 08:13:38 +00:00
- When hidden service is enabled create and enable an apache site with the proper configurations. This will let visitors using the Tor browser that a hidden version of the website is available. - Disable apache site when hidden service is disabled - Create a backup of the apache site - Hidden service won't be advertised when the user visits mediawiki, wordpress or tt-rss. These sites don't work (well) with a hidden service when a normal domain is already set up. Tests: - Functional tests pass. - With fresh install of Tor app, onion location header apache configuration is enabled and header is served in HTTP requests. - When Onion services are enabled/disabled, header is enabled/disabled due to webserver configuration changes. - When Tor app is enabled/disabled, header is enabled/disabled due to webserver configuration being enabled/disabled. - When Tor app is upgraded from earlier version while app is enabled, onion service is enabled, Tor app remains enabled. Onion location is enabled. - FAILED: When Tor app is upgraded from earlier version while app is enabled, onion service is disabled, Tor app remains enabled. Onion location is disabled. - FAILED: When Tor app is upgraded from earlier version while app is disabled, onion service is enabled, Tor app remains disabled. Onion location is disabled. - FAILED: When Tor app is upgraded from earlier version while app is disabled, onion service is disabled, Tor app remains disabled. Onion location is disabled. Signed-off-by: nbenedek <contact@nbenedek.me> [sunil: Ensure that enabling/disabling app enables/disables onion location] [sunil: Ensure that upgrading from old version does not enable the app] [sunil: Ensure that upgrading from old version enables/disables onion location] [sunil: Apache file should be a 'config' and not 'site'] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>