mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update: vless
This commit is contained in:
parent
4c865d0262
commit
c1097ad48f
@ -21,7 +21,7 @@ class VlessController extends Controller
|
|||||||
'server_port' => 'required',
|
'server_port' => 'required',
|
||||||
'tls' => 'required|in:0,1',
|
'tls' => 'required|in:0,1',
|
||||||
'tls_settings' => 'nullable|array',
|
'tls_settings' => 'nullable|array',
|
||||||
'flow' => 'nullable',
|
'flow' => 'nullable|in:xtls-rprx-vision',
|
||||||
'network' => 'required',
|
'network' => 'required',
|
||||||
'network_settings' => 'nullable|array',
|
'network_settings' => 'nullable|array',
|
||||||
'tags' => 'nullable|array',
|
'tags' => 'nullable|array',
|
||||||
@ -30,7 +30,7 @@ class VlessController extends Controller
|
|||||||
'sort' => 'nullable'
|
'sort' => 'nullable'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ((int)$params['tls_settings']['reality']) {
|
if (isset($params['tls_settings']) && (int)$params['tls_settings']['reality']) {
|
||||||
$keyPair = SodiumCompat::crypto_box_keypair();
|
$keyPair = SodiumCompat::crypto_box_keypair();
|
||||||
if (!isset($params['tls_settings']['public_key'])) {
|
if (!isset($params['tls_settings']['public_key'])) {
|
||||||
$params['tls_settings']['public_key'] = base64_encode(SodiumCompat::crypto_box_publickey($keyPair));
|
$params['tls_settings']['public_key'] = base64_encode(SodiumCompat::crypto_box_publickey($keyPair));
|
||||||
|
@ -306,7 +306,7 @@ CREATE TABLE `v2_server_vless` (
|
|||||||
`server_port` int(11) NOT NULL,
|
`server_port` int(11) NOT NULL,
|
||||||
`tls` tinyint(1) NOT NULL,
|
`tls` tinyint(1) NOT NULL,
|
||||||
`tls_settings` text,
|
`tls_settings` text,
|
||||||
`flow` varchar(11) DEFAULT NULL,
|
`flow` varchar(64) DEFAULT NULL,
|
||||||
`network` varchar(11) NOT NULL,
|
`network` varchar(11) NOT NULL,
|
||||||
`network_settings` text,
|
`network_settings` text,
|
||||||
`tags` text,
|
`tags` text,
|
||||||
|
@ -710,3 +710,6 @@ CREATE TABLE `v2_server_vless` (
|
|||||||
`updated_at` int(11) NOT NULL,
|
`updated_at` int(11) NOT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
ALTER TABLE `v2_server_vless`
|
||||||
|
CHANGE `flow` `flow` varchar(64) COLLATE 'utf8mb4_general_ci' NULL AFTER `tls_settings`;
|
||||||
|
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