Capacitor plugin to detect VPN connections on Android and iOS.
npm install capacitor-vpn-detector
npx cap sync
isVpnActive() => Promise<{ value: boolean; }>
Check if VPN is currently active on the device
Returns: Promise<{ value: boolean; }>
import { VpnDetector } from 'capacitor-vpn-detector';
const checkVpn = async () => {
const result = await VpnDetector.isVpnActive();
console.log('VPN is active:', result.value);
};