OutboundDetourConfig.fromJson constructor
OutboundDetourConfig.fromJson(
- Object? json
Implementation
factory OutboundDetourConfig.fromJson(Object? json) {
final map = asJsonMap(json, 'outbound');
final protocol = map['protocol'] as String;
final settingsJson = map['settings'];
return OutboundDetourConfig(
protocol: protocol,
sendThrough: map['sendThrough'] as String?,
tag: map['tag'] as String?,
settings: settingsJson == null
? null
: _parseOutboundSettings(protocol, settingsJson),
streamSettings: map['streamSettings'] == null
? null
: StreamConfig.fromJson(map['streamSettings']),
proxySettings: map['proxySettings'] == null
? null
: ProxyConfig.fromJson(map['proxySettings']),
mux: map['mux'] == null ? null : MuxConfig.fromJson(map['mux']),
targetStrategy: map['targetStrategy'] == null
? null
: XrayTargetStrategyJson.fromJson(map['targetStrategy']),
);
}