64 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
7f4c5f7410
Make app names as module identifiers
- The last part of the module import path is the module name.  This also
  becomes the Django app name.  Apps names have to be unique.  Hence,
  there is no scope for two different modules with same name but
  different load path to exist in the project.

- Most uses of list of loaded modules are dealing with app names instead
  of full module load path.  This is due to the fact that Django deals
  with app names and not module paths.

- It is also somewhat clumsy to access a loaded module as we are
  re-importing every time to get access module.

- Simplify all of the above by using app names are module identifiers
  and maintaing an ordered dictionary of app names to loadded modules.

- Remove unused imports.

- Minor styling fixes.
2016-02-13 13:49:23 +05:30
Sunil Mohan Adapa
65a1985cc0
tor: Minor fixes and styling
- Add note about resetarting firewalld.

- Refactor checking for running configuration process.

- Fix error message being show as info message.

- Minor indentation fixes.
2016-01-30 19:41:13 +05:30
James Valleroy
e401a5a028
tor: Get fresh status after config completes 2016-01-30 18:08:56 +05:30
James Valleroy
07130b6007
tor: Run configuration update as background task
- Closes: #294.
2016-01-30 18:08:40 +05:30
James Valleroy
0844151244
tor: Combine all configuration actions 2016-01-30 18:07:42 +05:30
James Valleroy
a3845e2b28
tor: Add service for bridge relay ports 2016-01-30 18:07:34 +05:30
James Valleroy
315c7f1e93
tor: Notify firewall about socks service status 2016-01-30 18:07:04 +05:30
James Valleroy
376b5c6feb
tor: Refactor into separate files for forms/views 2016-01-30 18:06:33 +05:30
Caly
15312fe595
Update messages for simplicity/consistency/grammer
- Closes #375 and #380.

- More use of configurable brand name.
2016-01-24 12:14:25 +05:30
Sunil Mohan Adapa
572e68dc36
Make remaining uses of brand name customizable 2016-01-24 00:50:14 +05:30
Sunil Mohan Adapa
4602c5bfce
Use translated brand name in templates
Using brand name directly from configuration means that it can't be
easily translated.  Instead use the translated brand name sent in my the
context processor.
2016-01-24 00:37:01 +05:30
Sunil Mohan Adapa
3e8a6f553a Minor styling fix 2015-12-06 15:52:14 +05:30
James Valleroy
0695ee5abb tor: Switch to obfs4proxy.
Replaces scramblesuit, and also supports obfs3.
Also add tor-geoipdb which is useful for bridges.
2015-12-06 12:21:22 +05:30
Sunil Mohan Adapa
a69f419c3c Make Django urlpatterns list of url()s
- Support for legacy pattern() mechanism will be removed in Django
  1.10.  Currently we see a warning for each Plinth module.
2015-12-05 09:33:23 -05:00
Sunil Mohan Adapa
7100429342 tor: Minor fixes
- Be a little bit more strict about Tor tests by requiring the module to
  be importable even when not running as root.
2015-12-04 10:14:47 +05:30
James Valleroy
90a1c334fe Skip tor tests unless root. 2015-12-04 09:16:06 +05:30
James Valleroy
66625c35a3 Handle error where /etc/tor/torrc does not exist when checking hidden service config.
Handle error where tor state file does not exist when getting list of ports.

Add test for checking if apt-transport-tor is enabled.
2015-12-04 09:16:06 +05:30
James Valleroy
e0bfd1401f Name Services module 2015-11-25 15:22:27 +01:00
Sunil Mohan Adapa
01d50c7ae8 Fix i18n of template expressions 2015-11-14 11:42:32 +05:30
Sunil Mohan Adapa
3df1a88824 Switch to Django i18n for code strings
Django i18n layer is on top of gettext and provide may crucial features
such as per-request locales, lazy translations etc.
2015-11-13 22:08:43 +05:30
Sunil Mohan Adapa
02cd89b60d Internationalize strings in template files 2015-11-13 22:02:17 +05:30
Sunil Mohan Adapa
bff8dd5a5c tor: Fixes for APT transport setup
- When Deb822 formatted source files are present, error out and don't
  show as enabled.

- When /etc/apt/sources.list.d/*.sources files are present, error out
  and don't show as enabled.

- Handle files /etc/apt/sources.list.d/*.list.

- Workaround Augeas lens not understanding '[options]' in sources.list.
2015-09-04 15:38:16 +05:30
Sunil Mohan Adapa
266a7cd15e tor: Show action errors properly in UI 2015-09-04 15:38:16 +05:30
Sunil Mohan Adapa
aa88b09d69 tor: Update APT transport help text 2015-09-04 15:38:16 +05:30
James Valleroy
787fc22d04 tor: Enable apt-transport-tor upon install. 2015-09-04 15:38:16 +05:30
James Valleroy
f25ce0216f tor: Add control to enable/disable apt-transport-tor (Closes: #78). 2015-09-04 15:38:15 +05:30
James Valleroy
d8828ee877 tor: remove unused import 2015-08-29 07:50:47 -04:00
James Valleroy
9a25e6b21d tor: Add torsocks as required package, needed for diagnostics.
Display error for diagnostic if command is missing.
2015-08-29 07:48:06 -04:00
James Valleroy
dee7474b5e tor: minor comment updates 2015-08-29 07:04:22 -04:00
Sunil Mohan Adapa
8fd4f69bfd tor: Implement diagnostics
- Mostly moved from freedombox-setup.
2015-08-29 06:22:01 -04:00
Sunil Mohan Adapa
ee521e098f tor: Move Tor setup from freedombox-setup
We are still overwriting the entire configuration file instead of
modifying it.
2015-08-18 21:25:01 +05:30
Sunil Mohan Adapa
09e8a75930 tor: Implement enabling/disabling
- Reorganize hidden service information
2015-07-28 18:10:03 +05:30
Sunil Mohan Adapa
f002336050 tor: Update styling for service/port table 2015-07-28 16:41:17 +05:30
Sunil Mohan Adapa
3d5f68381d tor: Reimplement getting ports in Python 2015-07-28 16:40:51 +05:30
Sunil Mohan Adapa
85fa868da0 tor: Move introduction from sidebard to main
- For consistency with other apps and in preparation for frontpage.
2015-07-28 12:22:07 +05:30
Sunil Mohan Adapa
5ffe3dab70 Reorder all app menu items alphabetically
- Alphabetical order is best for users to find the necessary items
  quickly and precitably.

- Currently there is no particular order.
2015-07-28 12:15:35 +05:30
Sunil Mohan Adapa
b331ba979d tor: Update menu item with generic name 2015-07-28 11:55:19 +05:30
Sunil Mohan Adapa
07e2c0ce14 Don't use actions to check if service is running
- To check whether a service is running does not require root
  privileges.  This can directly be done from a module without any
  action.

- Since actions are allowed to be run using sudo, introducing
  unnecessary sub-commands increases attack surface.

- Simple functions calls are unnecessarily being converted to command
  line invocations and involve parsing response.

- There is a lot of repeated code because of this that can be
  eliminated.

- To generalize this, we need to make all non-root system operations
  directly from module instead of delegating to action commands.
2015-07-19 19:54:13 -04:00
fonfon
824a9091c1 use django-stronghold for authentication handling (instead of @login_required) 2015-07-01 00:01:02 +05:30
Bob Girard
d64ce6cc01 Bundle tests with applications
- For each application, add ./tests directory and __init__.py file
  within it.

- Modify test controllers (coverage.py, runtests.py) to find the new
  test directories for testing and coverage analysis.

- Move existing application-specific test modules (test_pagekite.py) to
  the newly created directories.
2015-06-26 12:05:48 +05:30
Sunil Mohan Adapa
53b0f5aca8 Don't use wells for placing all the content 2015-05-01 21:14:04 -04:00
Sunil Mohan Adapa
be838a30c1 package: Add ability to receive notification on install
- Fix issue with Mumble firewall enabling after a fresh install.
2015-03-28 16:02:39 -04:00
Sunil Mohan Adapa
c7f27e493e Use package framework for installing tor 2015-01-05 00:13:20 +05:30
Sunil Mohan Adapa
100533bee1 Add missing titles to tor and diagnostics pages 2014-12-06 17:08:38 +05:30
Sunil Mohan Adapa
522ece851c Minor indentation fixes in templates 2014-12-06 17:08:38 +05:30
Sunil Mohan Adapa
057d1063f3 Use <code> tag for commands 2014-12-06 17:08:38 +05:30
Sunil Mohan Adapa
e6b5bed1f3 Use margins or <p> instead of <br /> 2014-12-06 17:08:37 +05:30
fonfon
96a14e3d0d moved 'in-app menu' from the sidebar to the top of the content; some template block renaming 2014-12-06 17:08:37 +05:30
Sunil Mohan Adapa
205d3bb8c0 Use bootstap styles for non-full-width tables 2014-11-23 14:19:02 +05:30
Sunil Mohan Adapa
e15966a772 Add missing paragraph closing tag in tor template 2014-11-23 14:16:10 +05:30