Posts

Post not yet marked as solved
3 Replies
229 Views
Our VPN was implemented using the NEPacketTunnelProvider, in the case of back end permanent errors (e.g. permission denied), we would stop the VPN tunnel by calling the cancelTunnelVPNWithError method. This did stop the VPN, however the VPN would auto reconnect and enter an infinite loop of connecting and disconnecting due to the back end permanent error. The VPN was turned on from the VPN settings. To completely disable the VPN, we need to either delete the VPN configuration, or manually tap on the toggle to disable. Sample code: - (void)PPNService:(PPNService *)PPNService didStopWithError:(nullable NSError *)error { SUBSPPNStatusData *ppnStatusData = [[SUBSPPNStatusData alloc] init]; SUBSPPNToggleStatus *toggleStatus = [[SUBSPPNToggleStatus alloc] init]; toggleStatus.ppnToggleStatus = SUBSPPNToggleStatus_PPNToggleStatus_Off; if (error) { [_ppnSessionManager logSessionEnd]; [self cancelTunnelWithError:error]; ppnStatusData.ppnStatus = SUBSPPNStatusData_PPNStatus_StoppedWithError; PPNStatusDetails *details = error.userInfo[PPNStatusDetailsKey]; } Question: Why does the VPN auto reconnect after calling the cancel method? Any solutions to completely stop the VPN on permanent errors.
Posted
by jingyil.
Last updated
.
Post not yet marked as solved
6 Replies
1.8k Views
Hi, We have a macOS app that starts the system network extension to provide the VPN service. I'm integrating the Crashpad to report crashes from the system network extension. To handle and report the crashes, in the network extension, we start the crash handler in a separate process and it listens to the Mach port for EXC_CRASH exceptions. The crash handler needs to access the file system to create crash reports database. But I'm getting the "Applications Support" directory from the network extension, but the path is not found. Here's the error: execvp /var/root/Library/Containers/<bundle ID>/Data/Library/Application Support/Crash/handler_mac: No such file or directory
Posted
by jingyil.
Last updated
.