Merge branch 'hy2'

This commit is contained in:
root 2023-09-27 21:53:46 +09:00
commit c872ceebd9
5 changed files with 110188 additions and 11 deletions

View File

@ -13,6 +13,7 @@ class HysteriaController extends Controller
$params = $request->validate([
'show' => '',
'name' => 'required',
'version' => 'required|in:1,2',
'group_id' => 'required|array',
'route_id' => 'nullable|array',
'parent_id' => 'nullable|integer',

View File

@ -94,6 +94,16 @@ class UniProxyController extends Controller
'tls' => $this->nodeInfo->tls
];
break;
case 'vless':
$response = [
'server_port' => $this->nodeInfo->server_port,
'network' => $this->nodeInfo->network,
'networkSettings' => $this->nodeInfo->network_settings,
'tls' => $this->nodeInfo->tls,
'flow' => $this->nodeInfo->flow,
'tls_settings' => $this->nodeInfo->tls_settings
];
break;
case 'trojan':
$response = [
'host' => $this->nodeInfo->host,
@ -103,6 +113,7 @@ class UniProxyController extends Controller
break;
case 'hysteria':
$response = [
'version' => $this->nodeInfo->version,
'host' => $this->nodeInfo->host,
'server_port' => $this->nodeInfo->server_port,
'server_name' => $this->nodeInfo->server_name,
@ -111,16 +122,6 @@ class UniProxyController extends Controller
'obfs' => Helper::getServerKey($this->nodeInfo->created_at, 16)
];
break;
case "vless":
$response = [
'server_port' => $this->nodeInfo->server_port,
'network' => $this->nodeInfo->network,
'networkSettings' => $this->nodeInfo->network_settings,
'tls' => $this->nodeInfo->tls,
'flow' => $this->nodeInfo->flow,
'tls_settings' => $this->nodeInfo->tls_settings
];
break;
}
$response['base_config'] = [
'push_interval' => (int)config('v2board.server_push_interval', 60),

View File

@ -215,6 +215,7 @@ CREATE TABLE `v2_server_group` (
DROP TABLE IF EXISTS `v2_server_hysteria`;
CREATE TABLE `v2_server_hysteria` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`version` int(11) NOT NULL,
`group_id` varchar(255) NOT NULL,
`route_id` varchar(255) DEFAULT NULL,
`name` varchar(255) NOT NULL,

View File

@ -712,3 +712,6 @@ CREATE TABLE `v2_server_vless` (
ALTER TABLE `v2_server_vless`
CHANGE `flow` `flow` varchar(64) COLLATE 'utf8mb4_general_ci' NULL AFTER `tls_settings`;
ALTER TABLE `v2_server_hysteria`
ADD `version` int(11) NOT NULL AFTER `id`;

110173
public/assets/admin/umi.js vendored

File diff suppressed because one or more lines are too long