mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
update
This commit is contained in:
parent
9345c9c807
commit
3dae3e9e0f
@ -96,6 +96,23 @@ class DeepbworkController extends Controller
|
||||
$jsonData = json_decode(self::SERVER_CONFIG);
|
||||
$jsonData->inboundDetour[0]->port = (int)$localPort;
|
||||
$jsonData->inbound->port = (int)$server->server_port;
|
||||
$jsonData->inbound->streamSettings->network = $server->network;
|
||||
if ($server->settings) {
|
||||
switch ($server->network) {
|
||||
case 'tcp': $jsonData->inbound->streamSettings->tcpSettings = json_decode($server->settings);
|
||||
break;
|
||||
case 'kcp': $jsonData->inbound->streamSettings->kcpSettings = json_decode($server->settings);
|
||||
break;
|
||||
case 'ws': $jsonData->inbound->streamSettings->wsSettings = json_decode($server->settings);
|
||||
break;
|
||||
case 'http': $jsonData->inbound->streamSettings->httpSettings = json_decode($server->settings);
|
||||
break;
|
||||
case 'kcp': $jsonData->inbound->streamSettings->dsSettings = json_decode($server->settings);
|
||||
break;
|
||||
case 'kcp': $jsonData->inbound->streamSettings->quicSettings = json_decode($server->settings);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((int)$server->tls) {
|
||||
$jsonData->inbound->streamSettings->security = "tls";
|
||||
$tls = (object) array("certificateFile" => "/home/v2ray.crt", "keyFile" => "/home/v2ray.key");
|
||||
|
@ -22,7 +22,7 @@ class ServerSave extends FormRequest
|
||||
'tls' => 'required',
|
||||
'tags' => 'array',
|
||||
'rate' => 'required|numeric',
|
||||
'network' => 'required|in:tcp,mkcp,websocket,http2,domainsocket,quic'
|
||||
'network' => 'required|in:tcp,kcp,ws,http,domainsocket,quic'
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user