connectIPSec method

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

Connect to VPN. (IPSec)

This will create a background VPN service. Android implementation is not available.

Implementation

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