react-native-simple-openvpn icon indicating copy to clipboard operation
react-native-simple-openvpn copied to clipboard

VPN Doesn't Disconnect After Force Quitting the App (iOS)

Open DaviDecoder opened this issue 1 year ago • 8 comments

Hey there! I’ve found a problem with the app on iOS:

What happens:

  1. The user is connected to the VPN and then force quits the app.
  2. When the user opens the app again and clicks "Disconnect," it should stop the VPN. But the VPN doesn’t disconnect. The VPN is still running, even though it should be turned off.

So, after force quitting the app and reopening it, clicking "Disconnect" doesn’t turn off the VPN profile. It stays active when it should be turned off.

Can you check this out? Thanks!

DaviDecoder avatar Nov 21 '24 12:11 DaviDecoder

https://github.com/ccnnde/react-native-simple-openvpn?tab=readme-ov-file#disable-vpn-connection-when-app-is-terminated-in-ios

ccnnde avatar Nov 22 '24 00:11 ccnnde

Having the same issue. Don't want to disconnect VPN on app termination. Just want to it to disconnect when it is relaunched.

OsamaWork1 avatar Dec 07 '24 20:12 OsamaWork1

@ccnnde @OsamaWork1 if you don't want to disconnect VPN on app termination just comment the below code and it will working fine.

+ (void)dispose { if (_cachedManager) { [_cachedManager.connection stopVPNTunnel]; } }

commencementtech avatar Dec 09 '24 06:12 commencementtech

@commencementtech I think I did not explain the issue well enough.

1- After connecting the VPN, I force quit the app. The VPN doesn't disconnect which is FINE

2- I launch the app again. VPN is connected. I call RNSimpleOpenvpn.disconnect() but the VPN doesn't disconnect and stays connected. That is the bug

PS. If I call RNSimpleOpenvpn.connect() on app launch after force quit, and then call RNSimpleOpenvpn.disconnect() the VPN gets disconnected successfully

OsamaWork1 avatar Dec 09 '24 06:12 OsamaWork1

@OsamaWork1 please connect with me on what's app for the solution of your issue: https://wa.me/918401819631

commencementtech avatar Dec 12 '24 12:12 commencementtech

@commencementtech Stop asking for money to provide a solution on whatsapp. This is an open source library, if you have a solution that you want to share, post it here. Stop selling it.

cc @ccnnde

OsamaWork1 avatar Dec 23 '24 07:12 OsamaWork1

@OsamaWork1 see I have solution and I spent 1 week to fix issues which has in the library. Also I will not giving solution free of cost because I did it for customer and he gives me list of bugs in this library and now the customer found another good library so he switched to new library so I can't give it in free of cost as my 1 week spent time not paid by customer. Fine you will find solution once library maker will fix it till that time wait for solution.

commencementtech avatar Dec 23 '24 14:12 commencementtech

@OsamaWork1 see I have solution and I spent 1 week to fix issues which has in the library. Also I will not giving solution free of cost because I did it for customer and he gives me list of bugs in this library and now the customer found another good library so he switched to new library so I can't give it in free of cost as my 1 week spent time not paid by customer. Fine you will find solution once library maker will fix it till that time wait for solution.

I will pay you, I sent a message to whatsapp

DaviDecoder avatar Dec 23 '24 18:12 DaviDecoder