Draft: [Feature] Trusted Networks
Abstract
Feature goal: To implement a "trusted network" feature/configurator similar to the KDE Connect Android client, which (when trusted network is activated) works by enabling UDP broadcasting (aka automatic device discovery) only if the SSID of the current network is allowed.
Implementation idea:
- First, location services with user permission is needed
- The network reachability status can be determined using the Swift Network framework (e.g), its value can be read from the NWPath Status enum.
- Therefore, every time that we're notified that the app's Network status has changed to
.satisfied
(aka a new connection is online), we check for the SSID of the connection and determine whether it matches one of the stored, allowed SSIDs. - The list of allowed SSIDs can be stored in UserDefaults just like direct IPs and other persistent user settings.
Edited by Lucas Wang