5078 Commits

Author SHA1 Message Date
James Valleroy
21ba450484
repro: Remove app
The repro app has been disabled for a long time. Its package has been
removed from Debian, and there is no sign of it returning soon.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 20:00:43 -05:00
James Valleroy
c8a5f3727f
restore: Remove app
The restore app has always been disabled, because node-restore package
is not available in Debian (RFP #804507). There hasn't been progress
towards packaging it since 2016.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 19:59:02 -05:00
Sunil Mohan Adapa
419559a86f
wireguard: Show public key even when connection is not active
When wireguard interface is not active 'wg show' does not provide any
information. In such case, get the public key by computing it from private key
by calling 'wg pubkey'.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:55 -05:00
Sunil Mohan Adapa
f43d9a5469
wireguard: When a connection is edited, reactivate to apply changes
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:53 -05:00
Sunil Mohan Adapa
318df8723a
wireguard: Enable/disable connections along with the app
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:51 -05:00
Sunil Mohan Adapa
0bc097f37d
wireguard: Implement enabling/disabling app using a stored flag
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:49 -05:00
Sunil Mohan Adapa
642d44aced
wireguard: Ensure tests work without latest network manager
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:46 -05:00
Sunil Mohan Adapa
43ad12c563
wireguard: Add validations in forms
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:44 -05:00
Sunil Mohan Adapa
69e418ada3
wireguard: Generate private key if needed when editing server
- Refactor code that edits the connection to server.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:41 -05:00
Sunil Mohan Adapa
2b9d278a95
wireguard: Update descriptions for client vs. server clarity
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:38 -05:00
Sunil Mohan Adapa
6e1b0a3642
wireguard: Handle client connections through network manager
- Any changes done directly using 'wg' command need to be redone after a reboot
  and disable/enable sequence. Let that duty be handled by network manager.

- Handle (none) values for keys and 0 values for latest handshake from 'wg'
  dump command output.

- Don't store public/private keys for wireguard in /var/lib. Let Network Manager
  deal with the storage of secrets.

- Create client connections in the 'external' zone.

- Show allowed IPs for each client in the main page.

- Show server connection public key only for clients. We use different key pairs
  when connecting to each of the servers.

- Separate out configuration information and status information in the show
  page.

- Allocate IP addresses to each of the clients.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:35 -05:00
Sunil Mohan Adapa
71c7ab4a9d
wireguard: Only use network manager for connections to servers
- Don't create network link. This don't persist across reboots and it is the job
  of Network Manager.

- Move NM settings code to regular plinth process instead of superuser.
  Permission for managing NM connections from the service daemon is granted by
  PolKit.

- Use interface name to identify the connection as it seems to be simply to do
  so than the public key. Public key is not easy to retrieve from NM connection.

- Merge code for adding and editing the connection to avoid repetition.

- Add icon to the edit button.

- Throw 404 error when incorrect client is specified.

- Fix issue with storing preshared key.

- Show formatting date in case of last connected time.

- Show formatted sizes for data transmitted.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:31 -05:00
Sunil Mohan Adapa
b96c5e5433
wireguard: Update descriptions in form labels
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:29 -05:00
Sunil Mohan Adapa
39fade1095
wireguard: Accept all IPs on server in a client setup
- Without this, all IPs on the server will be rejected and communication will
  not be possible.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:26 -05:00
Sunil Mohan Adapa
9242a9404f
wireguard: Add ability to set private key in client addition
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:24 -05:00
Sunil Mohan Adapa
ad53848983
wireguard: Don't error out when wg0 server is not setup
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:21 -05:00
Sunil Mohan Adapa
fe182a0faa
wireguard: Cosmetic fixes by yapf and isort
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:19 -05:00
Sunil Mohan Adapa
6a2942a9c4
wireguard: Show large buttons in show client/server pages
- To be consistent with other such pages.

- Larger buttons are more accessible, since they are the only operations on the
  page.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:17 -05:00
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