update: reconsitution

This commit is contained in:
v2board 2023-06-14 11:38:21 +08:00
parent 98bee6fa87
commit 61f1d8a623
17 changed files with 20 additions and 20 deletions

View File

@ -39,11 +39,11 @@ class AppController extends Controller
'chacha20-ietf-poly1305' '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']); array_push($proxies, $item['name']);
} }
if ($item['type'] === 'vmess') { 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']); array_push($proxies, $item['name']);
} }
if ($item['type'] === 'trojan') { if ($item['type'] === 'trojan') {

View File

@ -3,7 +3,7 @@
namespace App\Http\Controllers\V1\Client; namespace App\Http\Controllers\V1\Client;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Http\Controllers\V1\Client\Protocols\General; use App\Protocols\General;
use App\Services\ServerService; use App\Services\ServerService;
use App\Services\UserService; use App\Services\UserService;
use App\Utils\Helper; use App\Utils\Helper;
@ -24,8 +24,8 @@ class ClientController extends Controller
$servers = $serverService->getAvailableServers($user); $servers = $serverService->getAvailableServers($user);
$this->setSubscribeInfoToServers($servers, $user); $this->setSubscribeInfoToServers($servers, $user);
if ($flag) { if ($flag) {
foreach (array_reverse(glob(app_path('Http//Controllers//Client//Protocols') . '/*.php')) as $file) { foreach (array_reverse(glob(app_path('Protocols') . '/*.php')) as $file) {
$file = 'App\\Http\\Controllers\\Client\\Protocols\\' . basename($file, '.php'); $file = 'App\\Protocols\\' . basename($file, '.php');
$class = new $file($user, $servers); $class = new $file($user, $servers);
if (strpos($flag, $class->flag) !== false) { if (strpos($flag, $class->flag) !== false) {
die($class->handle()); die($class->handle());

View File

@ -1,6 +1,6 @@
<?php <?php
namespace App\Http\Controllers\V1\Client\Protocols; namespace App\Protocols;
use phpDocumentor\Reflection\Types\Self_; use phpDocumentor\Reflection\Types\Self_;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace App\Http\Controllers\V1\Client\Protocols; namespace App\Protocols;
use App\Utils\Helper; use App\Utils\Helper;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace App\Http\Controllers\V1\Client\Protocols; namespace App\Protocols;
use App\Utils\Helper; use App\Utils\Helper;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace App\Http\Controllers\V1\Client\Protocols; namespace App\Protocols;
class Loon class Loon
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace App\Http\Controllers\V1\Client\Protocols; namespace App\Protocols;
class Passwall class Passwall

View File

@ -1,6 +1,6 @@
<?php <?php
namespace App\Http\Controllers\V1\Client\Protocols; namespace App\Protocols;
class QuantumultX class QuantumultX

View File

@ -1,6 +1,6 @@
<?php <?php
namespace App\Http\Controllers\V1\Client\Protocols; namespace App\Protocols;
class SSRPlus class SSRPlus

View File

@ -1,6 +1,6 @@
<?php <?php
namespace App\Http\Controllers\V1\Client\Protocols; namespace App\Protocols;
class SagerNet class SagerNet
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace App\Http\Controllers\V1\Client\Protocols; namespace App\Protocols;
use App\Utils\Helper; use App\Utils\Helper;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace App\Http\Controllers\V1\Client\Protocols; namespace App\Protocols;
class Shadowsocks class Shadowsocks
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace App\Http\Controllers\V1\Client\Protocols; namespace App\Protocols;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace App\Http\Controllers\V1\Client\Protocols; namespace App\Protocols;
use App\Utils\Helper; use App\Utils\Helper;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace App\Http\Controllers\V1\Client\Protocols; namespace App\Protocols;
use App\Utils\Helper; use App\Utils\Helper;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace App\Http\Controllers\V1\Client\Protocols; namespace App\Protocols;
use App\Utils\Helper; use App\Utils\Helper;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace App\Http\Controllers\V1\Client\Protocols; namespace App\Protocols;
class V2rayNG class V2rayNG