ss-abramchuk / OpenVPNAdapter

Objective-C wrapper for OpenVPN library. Compatible with iOS and macOS.
GNU Affero General Public License v3.0
475 stars 215 forks source link

Can't save config when connecting though "Intent Extension". #223

Open houmie opened 3 years ago

houmie commented 3 years ago

Hi @ss-abramchuk,

I hope you are feeling better, mate.

When trying to connect the following steps have to be taken:

self.tunnelProviderManager?.loadFromPreferences and then 
self.tunnelProviderManager?.saveToPreferences

if no errors then load the config again: self.tunnelProviderManager?.loadFromPreferences and only then connect: self.tunnelProviderManager!.connection.startVPNTunnel()

This works fine from the app. But when using Siri shortcuts and trying to connect though Intent extension, it fails at saving the config:

Failed to save configuration: Error Domain=NEVPNErrorDomain Code=1 "configuration type is wrong" UserInfo={NSLocalizedDescription=configuration type is wrong}

Is there anyway to know why it thinks the config is wrong?

Many Thanks, Houman

alessionossa commented 2 years ago

Hello, FYI I was trying to implement Siri Shortcuts/Intents integration for a VPN iOS app and got the same error. It looks like it’s an Apple bug https://developer.apple.com/forums/thread/96020 😕. That’s super annoying because it means we just can’t update configurations at the moment.