isVpnActive method
Implementation
@override
Future<bool> isVpnActive() async {
final interfaces = await NetworkInterface.list(
includeLoopback: false,
type: InternetAddressType.any,
);
if (interfaces.isEmpty) {
return false;
}
return interfaces.any(
(interface) =>
_vpnNames.any((name) => interface.name.toLowerCase().contains(name)),
);
}