I missed the part where after loadAllFromPreferences you can check which one is connected, and re-connect to that..
This fixes my bug
In pkg preinstall and postinstall we also now quit app and stray running tunnel if any + remove duplicate profiles
Topic:
App & System Services
SubTopic:
Networking
Tags: