mirror of
https://github.com/v2board/v2board.git
synced 2025-01-27 00:19:10 +08:00
opt 1.2.3
This commit is contained in:
parent
a13809ac02
commit
b07511f01b
@ -87,12 +87,19 @@ class ServerService
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((int)$server->tls) {
|
if ((int)$server->tls) {
|
||||||
|
$tlsSettings = json_decode($server->tlsSettings);
|
||||||
$json->inbound->streamSettings->security = 'tls';
|
$json->inbound->streamSettings->security = 'tls';
|
||||||
$tls = (object)[
|
$tls = (object)[
|
||||||
'certificateFile' => '/home/v2ray.crt',
|
'certificateFile' => '/home/v2ray.crt',
|
||||||
'keyFile' => '/home/v2ray.key'
|
'keyFile' => '/home/v2ray.key'
|
||||||
];
|
];
|
||||||
$json->inbound->streamSettings->tlsSettings = new \StdClass();
|
$json->inbound->streamSettings->tlsSettings = new \StdClass();
|
||||||
|
if (isset($tlsSettings->serverName)) {
|
||||||
|
$json->inbound->streamSettings->tlsSettings->serverName = (string)$tlsSettings->serverName;
|
||||||
|
}
|
||||||
|
if (isset($tlsSettings->allowInsecure)) {
|
||||||
|
$json->inbound->streamSettings->tlsSettings->allowInsecure = (int)$tlsSettings->allowInsecure ? true : false;
|
||||||
|
}
|
||||||
$json->inbound->streamSettings->tlsSettings->certificates[0] = $tls;
|
$json->inbound->streamSettings->tlsSettings->certificates[0] = $tls;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user