I connected to the internet and then connect to VPN now, I disconnected the internet and checked the network connectivity status in my application, and I am getting connected to netinfo. Can anyone help to know how can we know if the internet is connected or not when VPN is connected?
Asked
Active
Viewed 258 times
1 Answers
0
You can use this package https://github.com/kzlsnn/react-native-vpn-detect
import Security from "react-native-vpn-detect";
async function checkSecurity() {
let detectVPN = await Security.detectVPN().then(response => { return response });
let detectProxy = await Security.detectProxy().then(response => { return response });
}
checkSecurity();

Kirill Novikov
- 2,576
- 4
- 20
- 33