update: remove v2ray alterid

This commit is contained in:
tokumeikoi
2022-01-04 13:40:35 +08:00
parent 54ea079d4d
commit ab5fce51a1
17 changed files with 27 additions and 17 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -13,6 +13,7 @@ use App\Models\ServerLog;
use App\Models\User;
use App\Utils\Helper;
use Illuminate\Support\Facades\DB;
class ServerController extends Controller
{
@ -35,7 +36,15 @@ class ServerController extends Controller
$type = $request->input('type') ? $request->input('type') : 0;
$current = $request->input('current') ? $request->input('current') : 1;
$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');
switch ($type) {
case 0:

View File

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