Commit Graph
27 Commits
Author SHA1 Message Date
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 1e67fcb61a tor: After enabling hidden service, wait for info 2016-01-30 18:08:47 +05:30
James Valleroy 07130b6007 tor: Run configuration update as background task
- Closes: #294.
2016-01-30 18:08:40 +05:30
James Valleroy a22595af77 tor: Avoid unneeded service restarts
- Fix an import error.
2016-01-30 18:08:33 +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 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
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
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 09f64f6a4b tor: Disable APT transport when Tor is disabled
- To make sure that APT is not unusable.
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
Sunil Mohan Adapa 13655f05bc tor: Configure for IPv6 also 2015-08-21 19:24:07 +05:30
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 3d5f68381d tor: Reimplement getting ports in Python 2015-07-28 16:40:51 +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
Sunil Mohan Adapa 3b6af2f29c Use only action utilities for service management
- When disabling a service, ignore if unable to stop the service.
2015-07-19 19:54:13 -04:00
Sunil Mohan Adapa 517c364559 pagekite: Move to using python3-augeas
- Merge actions/pagekite_util.py into plinth/modules/pagekite/util.py.

- Rename plinth/modules/pagekite/util.py to utils.py.

- Add python-augeus as dependency.

- Move actions/util.py to plinth/action_utils.py and update services
  that use it.

- Rename _run() method to run() as it is being used publicly.

- Import the utils in a more conventional manner.

- Move all python2 bits to python3.
2015-07-19 15:37:43 -04:00
fonfon b3da314560 use util.service_is_running for tor also 2015-05-03 09:44:46 +02:00
Sunil Mohan Adapa c7f27e493e Use package framework for installing tor 2015-01-05 00:13:20 +05:30
James Valleroy 28cc7f14c7 Handle errors with Tor HS configuration. 2014-11-10 21:42:40 -05:00
James Valleroy e5de76401d Check if tor is installed before running some commands. 2014-11-10 21:22:21 -05:00
Sunil Mohan Adapa 84640560b5 Update actions/tor to Python3 and minor other updates
- Update to use Python3

- Use os.path.join to combine parts of path

- Fix documentation strings

- Use single quotes for regular strings merely for consistency

- Minor refactorings
2014-10-20 00:22:09 +05:30
James Valleroy 500cfd11e3 Add comment to mark end of Plinth Hidden Service configuration block. 2014-10-20 00:20:51 +05:30
James Valleroy 4e493c1ac5 Add Tor form to enable/disable hidden service. 2014-10-20 00:20:32 +05:30
James Valleroy 50797f9a92 Enable/disable Tor hidden service.
Currently only supports a single hidden service for HTTP/HTTPS.
2014-10-20 00:20:18 +05:30
James Valleroy cf52bf5029 Display Tor hidden service configuration on Tor page.
Currently assumes that there is no more than 1 hidden service.
2014-10-20 00:19:42 +05:30
fonfon 7794893947 added tor actions: is-running, start, stop; display tor status at tor app page (enabling/disabling will be integrated later) 2014-10-20 00:14:35 +05:30