mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
On Apple platforms, `UserDefaults` provides a convenient way to store and fetch simple plist-compatible data for your app. Unbeknownst to the author at the time of original implementation was the fact this these keys are already designed for managed configurations to "mask" any user-configured equivalents. This means we no longer need to juggle two dicts in UserDefaults, and we can instead check which keys are forced via a simple method call. Additionally, the implementation was simplified in the following ways: - The host app is the "source of truth" for app configuration now. The tunnel service receives `setConfiguration` which applies the current configuration, and saves it in order to start up again without the GUI connected. The obvious caveat here is that if the GUI isn't running, configuration such as `internetResourceEnabled` applied by the administrator won't take effect. This is considered an edge case for the time being since no customers have asked for this. Additionally, admins can be advised to ensure the Firezone GUI is running on the system at all times to prevent this. - Settings and ConfigurationManager are now able to be removed - these became redundant after consolidating configuration to the containing app.