5060 Commits

Author SHA1 Message Date
James Valleroy
0bef87579f
wireguard: Replace nmcli use with libnm
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:53:15 -05:00
James Valleroy
eaa71f056a
wireguard: Add icon
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Fix size of SVG, add PNG image too]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:53:12 -05:00
James Valleroy
b0855dad91
wireguard: Use network API to handle connections
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Use the new method for creating network manager client instance]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:53:10 -05:00
James Valleroy
28bc880dc5
wireguard: Write pre-shared key to tempfile
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:53:07 -05:00
James Valleroy
a0ea33d9b6
wireguard: Make setup idempotent
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:53:05 -05:00
James Valleroy
aa66a9135c
wireguard: Add views for editing and deleting clients and servers
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:53:03 -05:00
James Valleroy
9eb546df26
wireguard: Refactor actions file
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:53:00 -05:00
James Valleroy
6b39aa8075
wireguard: Encode public keys for use in URLs
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:58 -05:00
James Valleroy
64165c5fbd
wireguard: Create network manager connection
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:56 -05:00
James Valleroy
aed82eca1b
wireguard: Show this box's public key
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:54 -05:00
James Valleroy
87a58f1491
wireguard: Generate key pair
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:52 -05:00
James Valleroy
966b179756
wireguard: Add server information view
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:50 -05:00
James Valleroy
36fdedb9a7
wireguard: List peers in client section
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:48 -05:00
James Valleroy
901f89f393
wireguard: Form to add server
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:46 -05:00
James Valleroy
5d287ce579
wireguard: Add client info view
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:44 -05:00
James Valleroy
415e1eb4ba
wireguard: Allow deleting a client
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:42 -05:00
James Valleroy
e00c28f36e
wireguard: Show list of added clients
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:40 -05:00
James Valleroy
aa02f4d710
wireguard: Implement adding client
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:38 -05:00
James Valleroy
6aa83e7118
wireguard: Add skeleton for new app
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Use the form from base template to show enable/disable properly]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:35 -05:00
Sunil Mohan Adapa
f444fba6ea
network: Add method to re-activate connections after an update
- When a connection is updated with newer settings, the changes don't reflect
  unless the connection is deactivated and reactivated. Add a convenience method
  to achieve this.

- Don't perform any operation if the connection is not active.

- Wait until connection is deactivated before reactivating

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:52:32 -05:00
Sunil Mohan Adapa
42569d75ec
network: Allow setting the auto-connect property on a connection
Also don't require updating all the common properties of a connection when
updating only some properties such as 'autoconnect'.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:52:30 -05:00
Sunil Mohan Adapa
68e5684d10
network: Fix activating connections that don't have real devices
When a WireGuard connection is activated, it create the wireguard interface.
Looking for matching devices before activating a connection will then fail. Use
get_all_devices() API to get the list of all devices that are real and those
that will be created due to connection activation.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:52:26 -05:00
James Valleroy
25317700c2
Translated using Weblate (French)
Currently translated at 100.0% (1163 of 1163 strings)
2020-01-18 15:42:53 +01:00
Nektarios Katakis
e0518bb370
Translated using Weblate (Greek)
Currently translated at 95.0% (1105 of 1163 strings)
2020-01-17 22:21:33 +01:00
ikmaak
5ad0be5d18
Translated using Weblate (Dutch)
Currently translated at 85.0% (989 of 1163 strings)
2020-01-17 22:21:24 +01:00
Thomas Vincent
5b0235751d
Translated using Weblate (French)
Currently translated at 100.0% (1163 of 1163 strings)
2020-01-17 22:21:22 +01:00
Sunil Mohan Adapa
f7109cceef
style: Fix responsiveness for app header
- 767 is the maximum for that size used by bootstrap. 768 and up are treated as
  different size.

- magin-bottom is redundant

- Don't do text-align: center for description text. It does not match with form
  elements and heading that follow. It also makes reading longer text harder.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-01-17 03:47:37 +05:30
Sunil Mohan Adapa
bf9d822943
style: Fix incorrect margins for containers in mobile view
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-01-17 03:47:18 +05:30
Veiko Aasa
3a202af843
samba: Add unit and functional tests
- Add functional tests
- Add unit tests for samba views
- New dependency for running functional tests: smbclient
- Make port configurable for the smbclient

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-01-17 02:47:06 +05:30
Allan Nordhøy
aa69585cb6
samba: Fix spelling
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-01-16 18:23:05 +02:00
ikmaak
9b9d87bc63 Translated using Weblate (Dutch)
Currently translated at 84.6% (980 of 1159 strings)
2020-01-14 01:56:47 +01:00
James Valleroy
4386ad4f13
Release v20.0 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v20.0
2020-01-13 19:12:07 -05:00
James Valleroy
25aa784651
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-13 19:11:07 -05:00
James Valleroy
7e1f02be7e
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-13 18:09:46 -05:00
Sunil Mohan Adapa
4ad3a9ee8f
networks: Fix crashing when accessing network manager D-Bus API
Network Manager client fetches the basic information from Network Manager,
caches it and updates the cache whenever it receives the signal. So, create only
a single instance of it and reuse it. Reusing from different threads is
apparently fine because the underlying DBusConnection is a singleton[1] that is
meant to be used from multiple threads.

The glib main loop context that is related to the client must run even after the
network manager client object goes away[2]. So, create the network manager
client instance from a thread that continues to run the glib main thread.

This fixes an infrequent crash when accessing network manager page. The problem
was reproducible from very early version of Network Manager and FreedomBox.
However, in more recent versions of NetworkManager 1.20 with recent DBus changes
in FreedomBox, the problem is more prominent. The problem reduces to a simple
warning in NetworkManager 1.22.

Closes: #1724
Closes: #382

Tests:

- Reproduce the problem by accessing the networks app index page repeatedly.

- Create a simple test case file to reproduce the problem and ensure that the
  fix works there.

- On Network Manager 1.20 repeatedly access the networks app index page and
  create/delete/activate/deactivate/show connections.

- On Network Manager 1.22 repeatedly access the networks app index page and
  create/delete/activate/deactivate/show connections.

Links:

1) https://developer.gnome.org/gio/unstable/GDBusConnection.html#g-bus-get-sync

2) https://developer.gnome.org/libnm/stable/NMClient.html#nm-client-get-main-context

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-13 17:22:39 -05:00
Sunil Mohan Adapa
7695047606
networks: Remove unused method
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-13 17:22:36 -05:00
Sunil Mohan Adapa
b5ae03239c
networks: Refactor creating a network manager client
This allows better control on how to create and maintain the network manager
client.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-13 17:22:32 -05:00
James Valleroy
693b109806
security: Add explanation of sandboxing
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-13 12:11:05 -08:00
James Valleroy
f6c7f77c0f
matrixsynapse: Allow upgrade to 1.8.*
- Use new configuration from package.
- Re-run the post-install to set our custom config.
- Re-apply setting for public registration if enabled.

Tested by manually downgrading matrix-synapse to 1.6.1-1 and then
running apt update.

Fixes #1754.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-13 11:55:04 -08:00
Nektarios Katakis
5b399ef2f7
Translated using Weblate (Greek)
Currently translated at 82.9% (961 of 1159 strings)
2020-01-13 15:50:40 +01:00
Ralf Barkow
5db2bdb261
Translated using Weblate (German)
Currently translated at 100.0% (1159 of 1159 strings)
2020-01-13 15:50:35 +01:00
Veiko Aasa
721e09fee9
deluge: Fix set default daemon
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-12 15:55:52 -05:00
Veiko Aasa
ff27f1d21b
deluge: Manage starting/stoping deluged
- run deluged daemon with default configuration location
- deluge-web: autoconnect to the deluged daemon
- functional tests: assert deluge-web is connected to the deluged daemon

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-12 15:55:49 -05:00
Joseph Nuthalapati
7d2c57bbf5
mediawiki: Fix functional tests depending on skin
- Login to MediaWiki should not depend on the skin used.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-01-10 18:02:41 +05:30
Veiko Aasa
66b57d48cf
samba: Improve actions script startup time
Speedup actions script startup time from 3.6s to 0.45s on
A20-OLinuXino-LIME2 hardware, improve top three slowest imports:
- don't import constant from manifest (saves 2.7s)
- defer importing actions_utils and augeas (saves 0.3s + 0.15s)

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-01-10 10:42:56 +05:30
Thomas Vincent
92d8d4fb3a
Translated using Weblate (French)
Currently translated at 97.7% (1132 of 1159 strings)
2020-01-07 07:21:19 +01:00
Michael Breidenbach
3b6c9816bd
Translated using Weblate (German)
Currently translated at 100.0% (1159 of 1159 strings)
2020-01-07 07:21:18 +01:00
Nektarios Katakis
5001f10c68
Translated using Weblate (Greek)
Currently translated at 75.4% (874 of 1159 strings)
2020-01-06 00:21:21 +01:00
James Valleroy
0460ecf89f
openvpn: Add diagnostic for ipv6 port
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-04 15:18:06 -05:00
Sunil Mohan Adapa
394588538e
openvpn: Enable IPv6 for server and client outside the tunnel
This enables clients to connect to servers on IPv6 networks. After the
connection, the tunnel works just like before.

- Make sure that after upgrading the server configuration, if the server is
  running (which means it was enabled), restart the server to reflect the new
  configuration.

- Don't increment the app version number as it has already been incremented in
  this release cycle.

Tests:

- Check that the listen address before the change is 0.0.0.0:1194 and after
  upgrade (temporarily increment app version number again) the listen address
  automatically changes to *:1194.

- Download the new client profile and use it connect to the server on IPv4
  network and observe that there is error during connection.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-04 14:02:44 -05:00