mirror of
https://github.com/v2board/v2board.git
synced 2025-01-25 23:49:09 +08:00
set log level in global
This commit is contained in:
parent
afc9b462e5
commit
53e1e41902
@ -98,7 +98,8 @@ class ConfigController extends Controller
|
||||
],
|
||||
'server' => [
|
||||
'server_token' => config('v2board.server_token'),
|
||||
'server_license' => config('v2board.server_license')
|
||||
'server_license' => config('v2board.server_license'),
|
||||
'server_log_level' => config('v2board.server_log_level', 'none')
|
||||
],
|
||||
'tutorial' => [
|
||||
'apple_id' => config('v2board.apple_id')
|
||||
|
@ -35,6 +35,7 @@ class ConfigSave extends FormRequest
|
||||
// server
|
||||
'server_token' => 'nullable|min:16',
|
||||
'server_license' => 'nullable',
|
||||
'server_log_level' => 'nullable|in:debug,info,warning,error,none',
|
||||
// alipay
|
||||
'alipay_enable' => 'in:0,1',
|
||||
'alipay_appid' => 'nullable|integer|min:16',
|
||||
|
@ -41,6 +41,7 @@ class ServerService
|
||||
abort(500, '节点不存在');
|
||||
}
|
||||
$json = json_decode(self::SERVER_CONFIG);
|
||||
$json->log->loglevel = config('v2board.server_log_level', 'none');
|
||||
$json->inboundDetour[0]->port = (int)$localPort;
|
||||
$json->inbound->port = (int)$server->server_port;
|
||||
$json->inbound->streamSettings->network = $server->network;
|
||||
|
Loading…
Reference in New Issue
Block a user