toJson method

  1. @override
JsonMap toJson()
override

Implementation

@override
JsonMap toJson() {
  if (protocol.isEmpty) {
    throw StateError('Xray outbound protocol must not be empty');
  }

  return {
    'tag': tag,
    'protocol': protocol,
    'settings': settings,
    'streamSettings': streamSettings?.toJson(),
    'proxySettings': proxySettings,
    'sendThrough': sendThrough,
    'mux': mux,
  };
}