When does MacOS delete VPN connections?
Hi community, apparently MacOS stores data about VPN connections in /Library/Preferences/SystemConfiguration/preferences.plist. I use a VPN App called "WireGuard" and when I create a connection in it, an entry to the plist file is added and the secret keys are stored in the key chain (kind: wg-quick(8) config).
WireGuard stores a base64 coded "PasswordReference" in the mentioned plist file that when it starts (TunnelsManager.swift) will be attempted to be matched against the keychain entry's "Account" value.
If WireGuard can't match either side, the now "orphan" entry will be removed with log message:
"Removing orphaned tunnel with non-verifying keychain entry [Account]".
Now, the issue is that this apparently happens to not just me (read lots of reports elsewhere without any solution).
It would be nice to know in which cases MacOS removes entries from preferences.plist or rewrites them in an incompatible way so that the WireGuard app removes the remaining configuration from the key chain.
Thanks in advance for your support.
MacBook Pro 16″, macOS 14.7