connectIkev2EAP method

  1. @override
Future<void> connectIkev2EAP({
  1. required String server,
  2. required String username,
  3. required String password,
  4. String? name,
  5. int? mtu,
  6. int? port,
})
override

Connect to VPN. (IKEv2-EAP)

This will create a background VPN service. MTU is only available on android.

Implementation

@override
Future<void> connectIkev2EAP({
  required String server,
  required String username,
  required String password,
  String? name,
  int? mtu,
  int? port,
}) async =>
    await methodChannel.invokeMethod('connect', {
      'Type': 'IKEv2',
      'Server': server,
      'Username': username,
      'Password': password,
      'Secret': '',
      'Name': name ?? server,
      if (mtu != null) 'mtu': mtu,
      if (port != null) 'port': port,
    });