passepartoutvpn / tunnelkit

VPN client library for Apple platforms.
GNU General Public License v3.0
9 stars 8 forks source link

Is there a way to prevent "infinity" reconnection when the OpenVPN server is shut down? #419

Open jarakys opened 6 months ago

jarakys commented 6 months ago

Hello everyone,

Is there a way to prevent "infinity" reconnection when the OpenVPN server is shut down? I have the following rules:

let onDemandRule = NEOnDemandRuleConnect() onDemandRule.interfaceTypeMatch = .wiFi let onDemandRule1 = NEOnDemandRuleConnect() onDemandRule1.interfaceTypeMatch = .cellular var extra = NetworkExtensionExtra() extra.disconnectsOnSleep = false extra.passwordReference = passwordReference extra.onDemandRules = [onDemandRule, onDemandRule1]

When the server is shut down, the app keeps trying to reconnect endlessly. Is there a way to avoid this? I cannot "ping" the server because when the OpenVPN server is shut down, I don't have an internet connection as the app keeps trying to reconnect.