296 Commits

Author SHA1 Message Date
Saúl Ibarra Corretgé
b0b67db35e
letsencrypt: Force text mode
This avoids letsencrypt trying to launch a dialog interface in case of
certain errors.
2016-02-19 19:54:09 +05:30
Sunil Mohan Adapa
ccc7310bd5
monkeysphere: Fix error with no host keys 2016-02-16 08:45:50 +05:30
Sunil Mohan Adapa
83ec57414c
dynamicdns: Fix starting daemon for no NAT
Incase the machine is not behind NAT, fix the logic that decides to
start the daemon.
2016-02-01 11:03:54 +05:30
Sunil Mohan Adapa
51dd1bb000
dynamicdns: Fix an invalid syntax
'local' keyword can't be used outside a method.
2016-02-01 11:02:43 +05:30
Sunil Mohan Adapa
ea1e9b6e2a
dynamicdns: Fix writing configuration for no NAT
- When writing the configuration file for no NAT case, append then last
  part of the file instead of overwriting.

- Also 'echo' statements are missing leading to attempt to execute the
  config options instead of writing them to a file.
2016-02-01 11:00:46 +05:30
Sunil Mohan Adapa
aa5efd4984
dynamicdns: Fix computing update times
Currenly uptime is being taken as measure to decide whether update must
run.  Uptime is the number of seconds since machine has booted.  If a
machine has run for 30 hours, and rebooted, then update will not be done
until the machine has run for 30 hours + desinated time.  Using seconds
since epoch fixes this.
2016-02-01 10:57:33 +05:30
Sunil Mohan Adapa
2a030f91fe
dynamicdns: Fix reading configuration file
- The current code to parse the configuration file does not work proper
  if there is an '=' in the password.  Fix it.

- Also if predesignated keyword like 'server' occurs in the password,
  configuration can't be read properly.  Fix it.
2016-02-01 10:53:26 +05:30
Daniel Steglich
a90039889d
dynamicdns: Fix passing password via stdin
* Add an option to pass the password via cmdline (optional, not used by
  plinth) if called manually.

* Fix: If -p option was not the last given option, everything after -p
  was lost.  Closes #310.
2016-02-01 10:46:48 +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
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
Sunil Mohan Adapa
506bff5c7b
users: Multiple SSH keys and better home creation
- Allow setting multiple SSH keys one per line (which is already
  allowed, but advertise it better).

- Use mkhomedir_helper to create the user's home directory.  Avoid
  security and accuracy complexities of creating a home directory.

- Allow homes that don't exist in /home.
2016-01-30 15:30:52 +05:30
James Valleroy
ad7d6db968
users: Add field to set user's SSH key. 2016-01-30 15:30:32 +05:30
James Valleroy
b7e44eb429
Add repro SIP proxy module. 2016-01-27 17:49:20 +05:30
Sunil Mohan Adapa
afb00f98ab
upgrades: Make manual upgrade a background process
- Closes #366 and closes #304 (all sub-tasks).

- Start new process group with setsid() by sending
  start_new_session=True

- Detach from parent process fds by closing all FDs and attaching stdin,
  stdou and stderr to /dev/null.

- Don't wait for the process to complete.

- This allows for upgrading Plinth while upgrades are trigged from
  Plinth itself.

- Show log of upgrade exection instead of output and error log of the
  process which can no longer be collected.  This has the advantage of
  showing automatic executions also.

- Rewrite the mechanism to detect whether upgrades can be run.  It is
  now based on whether the package manager is busy.  This has the
  advantage of working properly if other apt processes are running,
  automatic upgrades are running, etc.

- Busy status works even if Plinth is restarted while upgrades are in
  progress.

- More descriptive messages showing that upgrades don't have to be
  triggered manually.

- Warn that other packages can't be installed while upgrades are
  running, which may take a long time.

- Warn the users of potential temporary unavailability of
  Plinth/Apache2.
2016-01-20 21:13:18 -05:00
caitlin
429d26d961
letsencrypt: Don't fail if live dir does not exist 2016-01-14 14:18:53 +05:30
Sunil Mohan Adapa
1a17819380
letsencrypt: New basic module for SSL certficates
This is the first implementation for obtaining certificates from Let's
Encrypt.  Following the features and limitations.

- Requires manual operation.

- Registrations are done anonymously.

- Supports revoking and re-obtaining certificates.  Does not have a way
  to show if a certficate is already renewed.

- Automatic renewal is not available.

- Details messages in case of errors.

- Has ability to switch to testing mode by using LE's staging servers.

- Sets up Apache configuration for the domain and enables/disables it.
  When certificates are not available for a domain, default website
  configuration is used.  When certificates are available, separate
  SSL website configuration for each domain is used.

- Many domain will work with a single IP address with the help of Server
  Name Indication (SNI) which is supported by all modern browsers.

- Supports diagnostics on websites.
2016-01-14 14:18:43 +05:30
Sunil Mohan Adapa
6afe350fe5
monkeysphere: Proper domain handling
Action:

- Don't use const for HOST_TOOL, it is unlikely to be ever changed.

- Don't pass multiple key ids as single string to monkeysphere-host.

- Use JSON for data transfer with action instead of custom format and
  parsing.

- Minor styling fixes.

Template:

- More consistent indentation.

- Improve the description.

- Add headers to the table.

- List domains instead of domain types.

URLs:

- Take domain as argument for key generation.

- Narrow down fingerprint matching regex.

Views:

- Take domain as argument for key generation.  Verify that domain is
  valid.

- Minor grammer fix to cancel message.

- Use JSON format for getting key status.

- List domains instead of domain types.
2016-01-14 14:00:23 +05:30
James Valleroy
70d85cbd6f
monkeysphere: New module for verifying SSH servers
monkeysphere: Run publish as background task, allow user to cancel.

Small fixes to names module:

- Remove unused ugettext import.

- Change SERVICES to tuple.

- If a domain is not available for a service type, return None instead
  of (translated) "Not Available".

- Rename get_services -> get_enabled_services.
2016-01-14 14:00:08 +05:30
Sunil Mohan Adapa
3c895f58f5 quassel: Minor styling and UI message chanages
- Add information about Quassel clients and usage.

- Expand introduction.

- Update titles for consistency.

- Minor styling
2015-12-12 15:38:03 +05:30
James Valleroy
e74c4791ec Add quassel module. 2015-12-11 19:09:54 -05:00
Daniel Steglich
994e674885 Github issue 320: fixed display error
* switched "ignore SSL cert errors" and "use basic auth"
2015-12-06 22:25:53 +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
a0da928dae power: Minor updates
- Change term 'reboot' to 'restart' as it is less techinical and more
  consistent with popular interaces on desktop/mobiles.

- Updated description for power module.

- Simplify the module title to just 'Power'.

- Update the use of elipses and angular quotes as angular quotes and
  elipses are both used to indicate that further user interface will be
  available after pressing the button.

- Remove suprious '\' in power_reboot.html.

- Notify to the user that web interface will not be available after
  reboot/shutdown.

- Redirect the user to application page after restart/shutdown.  If the
  page serve succeeds, they will have simply refresh/access it after
  restart/shutdown after waiting or powering on.
2015-11-27 11:40:09 +05:30
Joel Valleroy
eca36e6f96 add power module with reboot and shut down 2015-11-26 16:29:38 -05:00
Sunil Mohan Adapa
921f7c8767 upgrades: Make sure error output shows up 2015-11-26 11:05:26 +05:30
James Valleroy
903a11824e Merge pull request #265 from fonfon/restore
Added reStore module/application
2015-11-04 08:00:55 -05:00
Sunil Mohan Adapa
646763ff3c openvpn: New module VPN into FreedomBox
- Authentication using client certificates.  Extra password based
  authentication for later.

- Auto setup of CA, server and client certificates.

- Provides a .ovpn profile for each user for easy setup.

- Use 4096 bit Diffie-Hellman parameters for better security.  If this
  takes to much time, reduce it to 2048 or 1024, at least during
  debugging.
2015-11-03 20:24:40 -05:00
fonfon
be325f8879 added reStore module 2015-10-21 11:54:34 +00:00
Sunil Mohan Adapa
5ccbd6f35c pagekite: Make Augeas loading narrower and faster 2015-10-12 22:26:14 +05:30
Sunil Mohan Adapa
670be77b9a pagekite: Fix issue with setting port
- When the current configuration does not contain a port and we try to
  set the port for the frontend server, it fails.  This patch fixes
  that.

- Minor styling and spelling fixes.

- Make sure that if port is not set for frontend, it will be set on
  saving the form.
2015-10-11 17:54:26 +05:30
fonfon
aad69deb6e Display correctly if service is PageKite is enabled 2015-10-11 17:19:35 +05:30
fonfon
96a272b3b0 Added explicit port setting to pagekite configuration 2015-10-11 17:19:35 +05:30
Sunil Mohan Adapa
94cdd19070 avahi: Minor fixes
- PEP8 fixes.

- Don't need to disable .socket and .service.  Disabling .service will
  take care of disabling both.

- Update the introduction message.

- Add prefix to form so that it can potentially be mixed with other
  forms.
2015-10-07 01:11:19 +05:30
Sean Alexandre
e6f7e6020f Adds Service Discovery module
Resolves issue https://github.com/freedombox/Plinth/issues/231
"Option to disable avahi-daemon"
2015-10-07 01:10:53 +05:30
James Valleroy
dda0f311b2 xmpp: Disable TLS on http-bind port (Closes: #239). 2015-10-04 18:57:40 -04:00
Sunil Mohan Adapa
91eaf3301d datetime: Move time zone to date time module
- It is more appropriate to have the time zone setting in date time
  module.
2015-09-04 19:53:46 +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
35d3244636 xmpp: Minor identation fixes 2015-09-01 22:41:53 +05:30
James Valleroy
162b28aafe xmpp: Replace host list instead of adding during domainname change (Closes #167). 2015-08-30 19:16:14 -04:00
Sunil Mohan Adapa
28f84ad0b1 datetime: New module for date & time operations
- Enable/disable ntpd from this module.  Since ntpd has implications on
  anonymity.

- Implement NTP diagonstics from freedombox-setup.

- Eventually provide ability to set date & time of the system.

- Eventually move timezone configuration to this module.
2015-08-29 10:32:14 -04:00
Sunil Mohan Adapa
c417c12436 xmpp: Implement diagnostics
- Mostly moved from freedombox-setup.
2015-08-29 06:22:01 -04:00
Sunil Mohan Adapa
4210332bf6 users: Improve diagnostics
- Move diagnostics into main module instead of action script.

- Ability run diagnostics as non-root user (because it runs in Plinth
  instead of action).

- Diagnose whether LDAP server is listening.

- Diagnose directory entities created during setup.
2015-08-29 06:22:01 -04:00
Sunil Mohan Adapa
eca538169e diagnostics: Revamp main diagnostics page
- Run diagnostics on each module separately.

- Run diagnostics in a separate thread.

- Show progressive update while running diagnostics.

- Store and show old diagnostics.

- Prevent CSRF on the expensive operation of running diagnostics.
2015-08-29 06:22:01 -04:00