fullConfiguration property
Implementation
Map<String, dynamic> get fullConfiguration {
final proxyOutbound = outbound1;
final document = XrayConfigDocument(
log: const XrayLog(),
// This SOCKS inbound is the contract used by the iOS packet tunnel:
// HEV/tun2socks forwards device packets here, then Xray sends them to the
// selected outbound.
inbounds: [XrayInbound.localSocksTunnel(userLevel: level)],
outbounds: [
XrayOutbound(
tag: proxyOutbound['tag'] as String? ?? 'proxy',
protocol: proxyOutbound['protocol'] as String? ?? '',
settings: (proxyOutbound['settings'] as Map).cast<String, dynamic>(),
streamSettings: _streamSettingsFromOutbound(proxyOutbound),
proxySettings:
(proxyOutbound['proxySettings'] as Map?)?.cast<String, dynamic>(),
sendThrough: proxyOutbound['sendThrough'] as String?,
mux: (proxyOutbound['mux'] as Map?)?.cast<String, dynamic>(),
),
XrayOutbound.direct(),
XrayOutbound.blackhole(),
],
// Keep generated configs deterministic for packet tunnels. Native tunnel
// code installs concrete route exclusions, so Xray must not introduce a
// second DNS strategy that can resolve the proxy differently.
routing: const XrayRouting(),
);
return document.toJson();
}