openvpn_flutter icon indicating copy to clipboard operation
openvpn_flutter copied to clipboard

When I exit and enter the application, the activity does not appear

Open bugrevealingbme opened this issue 3 years ago • 5 comments

When I exit and re-enter the application while it is connected, it seems to be disconnected. Android & iOS same.

bugrevealingbme avatar Mar 11 '22 15:03 bugrevealingbme

Hi, make sure you've listen onVpnStageChanged from initialization, it will get latest stage of connection.

For example https://github.com/nizwar/openvpn_flutter/blob/master/example/lib/main.dart

you can also check this apk as it working like expected on me https://github.com/nizwar/openvpn_flutter/releases/tag/v1.0.4

nizwar avatar Mar 14 '22 09:03 nizwar

I'm already using the same. On iOS, when I re-enter it, it shows no connection

bugrevealingbme avatar Mar 14 '22 20:03 bugrevealingbme

@bugrevealingbme Hi, I overcome this issue with this plugin. (https://pub.dev/packages/check_vpn_connection)

When app re-launch i check with this plugin, is there any vpn connection is active on device? if yeas then i show vpn disconnect button. and use same function to discount the vpn connection.

Hope will help u.

KamalPixi avatar Mar 16 '22 01:03 KamalPixi

The user may be connected with another VPN. a very unpleasant situation

bugrevealingbme avatar Mar 16 '22 08:03 bugrevealingbme

The user may be connected with another VPN. a very unpleasant situation

Just OpenVPN#isConnected method.

0ttik avatar Jul 04 '22 22:07 0ttik