WireGuardPeerConfig.fromJson constructor
WireGuardPeerConfig.fromJson(
- Object? json
Implementation
factory WireGuardPeerConfig.fromJson(Object? json) {
final map = asJsonMap(json, 'wireguard peer');
return WireGuardPeerConfig(
publicKey: map['publicKey'] as String?,
preSharedKey: map['preSharedKey'] as String?,
endpoint: map['endpoint'] as String?,
keepAlive: map['keepAlive'] as int?,
allowedIPs: (map['allowedIPs'] as List?)?.cast<String>(),
);
}