Merge branch 'v2board:dev' into dev

This commit is contained in:
DesperadoJ 2022-01-04 19:14:38 +08:00 committed by GitHub
commit 85c52f6499
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 34 additions and 19 deletions

View File

@ -97,7 +97,7 @@ class Clash
$array['server'] = $server['host']; $array['server'] = $server['host'];
$array['port'] = $server['port']; $array['port'] = $server['port'];
$array['uuid'] = $uuid; $array['uuid'] = $uuid;
$array['alterId'] = $server['alter_id']; $array['alterId'] = 0;
$array['cipher'] = 'auto'; $array['cipher'] = 'auto';
$array['udp'] = true; $array['udp'] = true;

View File

@ -54,7 +54,7 @@ class Passwall
"add" => $server['host'], "add" => $server['host'],
"port" => (string)$server['port'], "port" => (string)$server['port'],
"id" => $uuid, "id" => $uuid,
"aid" => (string)$server['alter_id'], "aid" => '0',
"net" => $server['network'], "net" => $server['network'],
"type" => "none", "type" => "none",
"host" => "", "host" => "",

View File

@ -54,7 +54,7 @@ class SSRPlus
"add" => $server['host'], "add" => $server['host'],
"port" => (string)$server['port'], "port" => (string)$server['port'],
"id" => $uuid, "id" => $uuid,
"aid" => (string)$server['alter_id'], "aid" => '0',
"net" => $server['network'], "net" => $server['network'],
"type" => "none", "type" => "none",
"host" => "", "host" => "",

View File

@ -58,7 +58,7 @@ class Shadowrocket
$config = [ $config = [
'tfo' => 1, 'tfo' => 1,
'remark' => $server['name'], 'remark' => $server['name'],
'alterId' => $server['alter_id'] 'alterId' => 0
]; ];
if ($server['tls']) { if ($server['tls']) {
$config['tls'] = 1; $config['tls'] = 1;

View File

@ -98,7 +98,7 @@ class Stash
$array['server'] = $server['host']; $array['server'] = $server['host'];
$array['port'] = $server['port']; $array['port'] = $server['port'];
$array['uuid'] = $uuid; $array['uuid'] = $uuid;
$array['alterId'] = $server['alter_id']; $array['alterId'] = 0;
$array['cipher'] = 'auto'; $array['cipher'] = 'auto';
$array['udp'] = true; $array['udp'] = true;

View File

@ -54,7 +54,7 @@ class V2rayN
"add" => $server['host'], "add" => $server['host'],
"port" => (string)$server['port'], "port" => (string)$server['port'],
"id" => $uuid, "id" => $uuid,
"aid" => (string)$server['alter_id'], "aid" => '0',
"net" => $server['network'], "net" => $server['network'],
"type" => "none", "type" => "none",
"host" => "", "host" => "",

View File

@ -54,7 +54,7 @@ class V2rayNG
"add" => $server['host'], "add" => $server['host'],
"port" => (string)$server['port'], "port" => (string)$server['port'],
"id" => $uuid, "id" => $uuid,
"aid" => (string)$server['alter_id'], "aid" => '0',
"net" => $server['network'], "net" => $server['network'],
"type" => "none", "type" => "none",
"host" => "", "host" => "",

View File

@ -47,7 +47,7 @@ class DeepbworkController extends Controller
$user->v2ray_user = [ $user->v2ray_user = [
"uuid" => $user->uuid, "uuid" => $user->uuid,
"email" => sprintf("%s@v2board.user", $user->uuid), "email" => sprintf("%s@v2board.user", $user->uuid),
"alter_id" => $server->alter_id, "alter_id" => 0,
"level" => 0, "level" => 0,
]; ];
unset($user['uuid']); unset($user['uuid']);

View File

@ -13,6 +13,7 @@ use App\Models\ServerLog;
use App\Models\User; use App\Models\User;
use App\Utils\Helper; use App\Utils\Helper;
use Illuminate\Support\Facades\DB;
class ServerController extends Controller class ServerController extends Controller
{ {
@ -35,7 +36,15 @@ class ServerController extends Controller
$type = $request->input('type') ? $request->input('type') : 0; $type = $request->input('type') ? $request->input('type') : 0;
$current = $request->input('current') ? $request->input('current') : 1; $current = $request->input('current') ? $request->input('current') : 1;
$pageSize = $request->input('pageSize') >= 10 ? $request->input('pageSize') : 10; $pageSize = $request->input('pageSize') >= 10 ? $request->input('pageSize') : 10;
$serverLogModel = ServerLog::where('user_id', $request->session()->get('id')) $serverLogModel = ServerLog::select([
DB::raw('sum(u) as u'),
DB::raw('sum(d) as d'),
'log_at',
'user_id',
'updated_at'
])
->where('user_id', $request->session()->get('id'))
->groupBy('log_at', 'user_id')
->orderBy('log_at', 'DESC'); ->orderBy('log_at', 'DESC');
switch ($type) { switch ($type) {
case 0: case 0:

View File

@ -24,7 +24,6 @@ class ServerV2raySave extends FormRequest
'tls' => 'required', 'tls' => 'required',
'tags' => 'nullable|array', 'tags' => 'nullable|array',
'rate' => 'required|numeric', 'rate' => 'required|numeric',
'alter_id' => 'required|integer',
'network' => 'required|in:tcp,kcp,ws,http,domainsocket,quic,grpc', 'network' => 'required|in:tcp,kcp,ws,http,domainsocket,quic,grpc',
'networkSettings' => 'nullable|array', 'networkSettings' => 'nullable|array',
'ruleSettings' => 'nullable|array', 'ruleSettings' => 'nullable|array',

View File

@ -237,5 +237,5 @@ return [
| The only modification by laravel config | The only modification by laravel config
| |
*/ */
'version' => '1.5.4.1640966110216' 'version' => '1.5.5.1641274817595'
]; ];

View File

@ -257,7 +257,6 @@ CREATE TABLE `v2_server_v2ray` (
`tags` varchar(255) DEFAULT NULL, `tags` varchar(255) DEFAULT NULL,
`rate` varchar(11) NOT NULL, `rate` varchar(11) NOT NULL,
`network` text NOT NULL, `network` text NOT NULL,
`alter_id` int(11) NOT NULL DEFAULT '1',
`settings` text, `settings` text,
`rules` text, `rules` text,
`networkSettings` text, `networkSettings` text,
@ -370,4 +369,4 @@ CREATE TABLE `v2_user` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 2021-12-27 17:37:09 -- 2022-01-04 05:39:52

View File

@ -471,3 +471,6 @@ ALTER TABLE `v2_coupon`
ALTER TABLE `v2_order` ALTER TABLE `v2_order`
CHANGE `cycle` `period` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `type`; CHANGE `cycle` `period` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `type`;
ALTER TABLE `v2_server_v2ray`
DROP `alter_id`;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,9 @@
<head> <head>
<link rel="stylesheet" href="/theme/{{$theme}}/assets/components.chunk.css?v={{$verison}}"> <link rel="stylesheet" href="/theme/{{$theme}}/assets/components.chunk.css?v={{$verison}}">
<link rel="stylesheet" href="/theme/{{$theme}}/assets/umi.css?v={{$verison}}"> <link rel="stylesheet" href="/theme/{{$theme}}/assets/umi.css?v={{$verison}}">
@if (file_exists(public_path("/theme/{$theme}/assets/custom.css")))
<link rel="stylesheet" href="/theme/{{$theme}}/assets/custom.css?v={{$verison}}"> <link rel="stylesheet" href="/theme/{{$theme}}/assets/custom.css?v={{$verison}}">
@endif
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
@php ($colors = [ @php ($colors = [
@ -57,6 +59,9 @@
gtag('config', 'G-P1E9Z5LRRK'); gtag('config', 'G-P1E9Z5LRRK');
</script> </script>
@if (file_exists(public_path("/theme/{$theme}/assets/custom.js")))
<script src="/theme/{{$theme}}/assets/custom.js?v={{$verison}}"></script>
@endif
</body> </body>
</html> </html>