VLessOutboundConfig.fromJson constructor

VLessOutboundConfig.fromJson(
  1. Object? json
)

Implementation

factory VLessOutboundConfig.fromJson(Object? json) {
  final map = asJsonMap(json, 'vless outbound');
  return VLessOutboundConfig(
    address: map['address'] == null
        ? null
        : XrayAddress.fromJson(map['address']),
    port: map['port'] as int?,
    level: map['level'] as int?,
    email: map['email'] as String?,
    id: map['id'] as String?,
    flow: map['flow'] as String?,
    seed: map['seed'] as String?,
    encryption: map['encryption'] as String?,
    reverse: map['reverse'] == null
        ? null
        : VLessReverseConfig.fromJson(map['reverse']),
    testpre: map['testpre'] as int?,
    testseed: (map['testseed'] as List?)?.cast<int>(),
    vnext: map['vnext'] == null
        ? null
        : asJsonList(map['vnext'], VLessOutboundVnext.fromJson),
  );
}