mirror of
https://github.com/v2board/v2board.git
synced 2025-01-11 00:29:09 +08:00
fix server rules maybe not defined
This commit is contained in:
parent
557f6bc0c2
commit
0446e7d99f
@ -146,20 +146,21 @@ class DeepbworkController extends Controller
|
|||||||
if ($server->rules) {
|
if ($server->rules) {
|
||||||
$rules = json_decode($server->rules);
|
$rules = json_decode($server->rules);
|
||||||
// domain
|
// domain
|
||||||
$domainObj = new \StdClass();
|
if (isset($rules->domain)) {
|
||||||
$domainObj->type = 'field';
|
$domainObj = new \StdClass();
|
||||||
$domainObj->domain = $rules->domain;
|
$domainObj->type = 'field';
|
||||||
$domainObj->outboundTag = 'block';
|
$domainObj->domain = $rules->domain;
|
||||||
|
$domainObj->outboundTag = 'block';
|
||||||
|
array_push($json->routing->settings->rules, $domainObj);
|
||||||
|
}
|
||||||
// protocol
|
// protocol
|
||||||
$protocolObj = new \StdClass();
|
if (isset($rules->protocol)) {
|
||||||
$protocolObj->type = 'field';
|
$protocolObj = new \StdClass();
|
||||||
$protocolObj->protocol = $rules->protocol;
|
$protocolObj->type = 'field';
|
||||||
$protocolObj->outboundTag = 'block';
|
$protocolObj->protocol = $rules->protocol;
|
||||||
array_push(
|
$protocolObj->outboundTag = 'block';
|
||||||
$json->routing->settings->rules,
|
array_push($json->routing->settings->rules, $protocolObj);
|
||||||
$domainObj,
|
}
|
||||||
$protocolObj
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((int)$server->tls) {
|
if ((int)$server->tls) {
|
||||||
|
2
public/assets/admin/umi.js
vendored
2
public/assets/admin/umi.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user