fix(qr): Generate full X-Ray Client config JSON to match Native Amnezia format

This commit is contained in:
infosave2007
2026-01-24 14:56:13 +03:00
parent fdbb18c9df
commit de10268ab4
2 changed files with 53 additions and 24 deletions
+3 -2
View File
@@ -970,6 +970,7 @@ class VpnClient
$fragment = $parsed['fragment'] ?? '';
parse_str($parsed['query'] ?? '', $query);
$flow = $query['flow'] ?? '';
$reality = null;
if (($query['security'] ?? '') === 'reality') {
@@ -981,8 +982,8 @@ class VpnClient
];
}
// Use QrUtil to encode correct X-Ray payload
$payloadXray = QrUtil::encodeXrayPayload($host, $port, $clientId, $fragment, $reality, $config);
// Use QrUtil to encode correct X-Ray payload (Native Amnezia Client Config)
$payloadXray = QrUtil::encodeXrayPayload($host, $port, $clientId, $fragment, $reality, $config, $flow);
return QrUtil::pngBase64($payloadXray);
}
}