feat: add support for awg2, mtproxy, and aivpn protocols, and implement user role-based access control.

This commit is contained in:
infosave2007
2026-04-04 09:56:49 +03:00
parent 19078b03dd
commit 26a6ca526d
9 changed files with 726 additions and 9 deletions
+6 -1
View File
@@ -295,6 +295,8 @@ class InstallProtocolManager
'server_public_key' => $result['server_public_key'] ?? null,
'preshared_key' => $result['preshared_key'] ?? null,
'awg_params' => $result['awg_params'] ?? null,
'secret' => $result['secret'] ?? null,
'server_host' => $result['server_host'] ?? null,
];
if (($protocol['slug'] ?? '') === 'xray-vless') {
foreach (['client_id', 'container_name', 'server_port', 'xray_port', 'reality_public_key', 'reality_private_key', 'reality_short_id', 'reality_server_name'] as $k) {
@@ -653,6 +655,9 @@ class InstallProtocolManager
'privatekey' => 'reality_private_key',
'shortid' => 'reality_short_id',
'servername' => 'reality_server_name',
'secret' => 'secret',
'serverhost' => 'server_host',
'server_host' => 'server_host',
];
$finalKey = $keyMap[$normalizedKey] ?? $normalizedKey;
@@ -899,7 +904,7 @@ class InstallProtocolManager
*/
private static function isAwgProtocol(string $slug, array $protocol): bool
{
if (in_array($slug, ['amnezia-wg', 'amnezia-wg-advanced'], true)) {
if (in_array($slug, ['amnezia-wg', 'amnezia-wg-advanced', 'awg2'], true)) {
return true;
}
$installScript = (string) ($protocol['install_script'] ?? '');