Sunil Mohan Adapa c99f35ad0e
wireguard: Fix auto-adding client when no domains are configured
- When no domains are configured, and .local domain is filtered out, an
exception is thrown by the auto-add client page.

- Don't filter out .local domain. It is still a valid endpoint for peers to
connect to.

- Instead of showing just one domain, show all the domains as endpoints to
connect to.

- Don't store private key in the session. It is retained for longer than
necessary and also sessions are stored on the disk.

Tests:

- Remove all configured domains from the system and click 'Add Client
Automatically' button. It throws an exception. With the patch, it works.

- The Add Client Automatically page shows all the domains as endpoints.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2026-08-28 07:40:02 -04:00
..