From 61f1d8a6239a7df46797dd0d5db1a3e8950b88d9 Mon Sep 17 00:00:00 2001 From: v2board Date: Wed, 14 Jun 2023 11:38:21 +0800 Subject: [PATCH] update: reconsitution --- app/Http/Controllers/V1/Client/AppController.php | 4 ++-- app/Http/Controllers/V1/Client/ClientController.php | 6 +++--- app/{Http/Controllers/V1/Client => }/Protocols/Clash.php | 2 +- .../Controllers/V1/Client => }/Protocols/ClashMeta.php | 2 +- app/{Http/Controllers/V1/Client => }/Protocols/General.php | 2 +- app/{Http/Controllers/V1/Client => }/Protocols/Loon.php | 2 +- app/{Http/Controllers/V1/Client => }/Protocols/Passwall.php | 2 +- .../Controllers/V1/Client => }/Protocols/QuantumultX.php | 2 +- app/{Http/Controllers/V1/Client => }/Protocols/SSRPlus.php | 2 +- app/{Http/Controllers/V1/Client => }/Protocols/SagerNet.php | 2 +- .../Controllers/V1/Client => }/Protocols/Shadowrocket.php | 2 +- .../Controllers/V1/Client => }/Protocols/Shadowsocks.php | 2 +- app/{Http/Controllers/V1/Client => }/Protocols/Stash.php | 2 +- .../Controllers/V1/Client => }/Protocols/Surfboard.php | 2 +- app/{Http/Controllers/V1/Client => }/Protocols/Surge.php | 2 +- app/{Http/Controllers/V1/Client => }/Protocols/V2rayN.php | 2 +- app/{Http/Controllers/V1/Client => }/Protocols/V2rayNG.php | 2 +- 17 files changed, 20 insertions(+), 20 deletions(-) rename app/{Http/Controllers/V1/Client => }/Protocols/Clash.php (99%) rename app/{Http/Controllers/V1/Client => }/Protocols/ClashMeta.php (99%) rename app/{Http/Controllers/V1/Client => }/Protocols/General.php (98%) rename app/{Http/Controllers/V1/Client => }/Protocols/Loon.php (98%) rename app/{Http/Controllers/V1/Client => }/Protocols/Passwall.php (98%) rename app/{Http/Controllers/V1/Client => }/Protocols/QuantumultX.php (98%) rename app/{Http/Controllers/V1/Client => }/Protocols/SSRPlus.php (98%) rename app/{Http/Controllers/V1/Client => }/Protocols/SagerNet.php (98%) rename app/{Http/Controllers/V1/Client => }/Protocols/Shadowrocket.php (99%) rename app/{Http/Controllers/V1/Client => }/Protocols/Shadowsocks.php (96%) rename app/{Http/Controllers/V1/Client => }/Protocols/Stash.php (99%) rename app/{Http/Controllers/V1/Client => }/Protocols/Surfboard.php (99%) rename app/{Http/Controllers/V1/Client => }/Protocols/Surge.php (99%) rename app/{Http/Controllers/V1/Client => }/Protocols/V2rayN.php (98%) rename app/{Http/Controllers/V1/Client => }/Protocols/V2rayNG.php (98%) diff --git a/app/Http/Controllers/V1/Client/AppController.php b/app/Http/Controllers/V1/Client/AppController.php index b72e04cc..27f74cd2 100644 --- a/app/Http/Controllers/V1/Client/AppController.php +++ b/app/Http/Controllers/V1/Client/AppController.php @@ -39,11 +39,11 @@ class AppController extends Controller 'chacha20-ietf-poly1305' ]) ) { - array_push($proxy, \App\Http\Controllers\V1\Client\Protocols\Clash::buildShadowsocks($user['uuid'], $item)); + array_push($proxy, \App\Protocols\Clash::buildShadowsocks($user['uuid'], $item)); array_push($proxies, $item['name']); } if ($item['type'] === 'vmess') { - array_push($proxy, \App\Http\Controllers\V1\Client\Protocols\Clash::buildVmess($user['uuid'], $item)); + array_push($proxy, \App\Protocols\Clash::buildVmess($user['uuid'], $item)); array_push($proxies, $item['name']); } if ($item['type'] === 'trojan') { diff --git a/app/Http/Controllers/V1/Client/ClientController.php b/app/Http/Controllers/V1/Client/ClientController.php index 1d468d57..419f94a3 100644 --- a/app/Http/Controllers/V1/Client/ClientController.php +++ b/app/Http/Controllers/V1/Client/ClientController.php @@ -3,7 +3,7 @@ namespace App\Http\Controllers\V1\Client; use App\Http\Controllers\Controller; -use App\Http\Controllers\V1\Client\Protocols\General; +use App\Protocols\General; use App\Services\ServerService; use App\Services\UserService; use App\Utils\Helper; @@ -24,8 +24,8 @@ class ClientController extends Controller $servers = $serverService->getAvailableServers($user); $this->setSubscribeInfoToServers($servers, $user); if ($flag) { - foreach (array_reverse(glob(app_path('Http//Controllers//Client//Protocols') . '/*.php')) as $file) { - $file = 'App\\Http\\Controllers\\Client\\Protocols\\' . basename($file, '.php'); + foreach (array_reverse(glob(app_path('Protocols') . '/*.php')) as $file) { + $file = 'App\\Protocols\\' . basename($file, '.php'); $class = new $file($user, $servers); if (strpos($flag, $class->flag) !== false) { die($class->handle()); diff --git a/app/Http/Controllers/V1/Client/Protocols/Clash.php b/app/Protocols/Clash.php similarity index 99% rename from app/Http/Controllers/V1/Client/Protocols/Clash.php rename to app/Protocols/Clash.php index 7d1802de..4d6c4631 100644 --- a/app/Http/Controllers/V1/Client/Protocols/Clash.php +++ b/app/Protocols/Clash.php @@ -1,6 +1,6 @@