mirror of
https://github.com/v2board/v2board.git
synced 2025-03-13 06:04:42 +08:00
修改shortId为short_id以适配V2bX
This commit is contained in:
parent
c23c6039d2
commit
70bb8238c6
@ -40,8 +40,11 @@ class VlessController extends Controller
|
||||
if (!isset($params['tls_settings']['private_key'])) {
|
||||
$params['tls_settings']['private_key'] = Helper::base64EncodeUrlSafe(SodiumCompat::crypto_box_secretkey($keyPair));
|
||||
}
|
||||
if (!isset($params['tls_settings']['shortId'])) {
|
||||
$params['tls_settings']['shortId'] = substr(sha1($params['tls_settings']['private_key']), 0, 8);
|
||||
if (!isset($params['tls_settings']['short_id'])) {
|
||||
$params['tls_settings']['short_id'] = substr(sha1($params['tls_settings']['private_key']), 0, 8);
|
||||
}
|
||||
if (!isset($params['tls_settings']['server_port'])) {
|
||||
$params['tls_settings']['server_port'] = "443";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ class Clash
|
||||
if ($server['tls'] == 2) {
|
||||
$array['reality-opts'] = [];
|
||||
$array['reality-opts']['public-key'] = $tlsSettings['public_key'];
|
||||
$array['reality-opts']['short-id'] = $tlsSettings['shortId'];
|
||||
$array['reality-opts']['short-id'] = $tlsSettings['short_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ class ClashMeta
|
||||
if ($server['tls'] == 2) {
|
||||
$array['reality-opts'] = [];
|
||||
$array['reality-opts']['public-key'] = $tlsSettings['public_key'];
|
||||
$array['reality-opts']['short-id'] = $tlsSettings['shortId'];
|
||||
$array['reality-opts']['short-id'] = $tlsSettings['short_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ class ClashVerge
|
||||
if ($server['tls'] == 2) {
|
||||
$array['reality-opts'] = [];
|
||||
$array['reality-opts']['public-key'] = $tlsSettings['public_key'];
|
||||
$array['reality-opts']['short-id'] = $tlsSettings['shortId'];
|
||||
$array['reality-opts']['short-id'] = $tlsSettings['short_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ class General
|
||||
$output .= "&sni={$config['sni']}";
|
||||
if ($server['tls'] == 2) {
|
||||
$config['pbk'] = $tlsSettings['public_key'];
|
||||
$config['sid'] = $tlsSettings['shortId'];
|
||||
$config['sid'] = $tlsSettings['short_id'];
|
||||
$output .= "&pbk={$config['pbk']}" . "&sid={$config['sid']}";
|
||||
}
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ class Passwall
|
||||
$output .= "&sni={$config['sni']}";
|
||||
if ($server['tls'] == 2) {
|
||||
$config['pbk'] = $tlsSettings['public_key'];
|
||||
$config['sid'] = $tlsSettings['shortId'];
|
||||
$config['sid'] = $tlsSettings['short_id'];
|
||||
$output .= "&pbk={$config['pbk']}" . "&sid={$config['sid']}";
|
||||
}
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ class SSRPlus
|
||||
$output .= "&sni={$config['sni']}";
|
||||
if ($server['tls'] == 2) {
|
||||
$config['pbk'] = $tlsSettings['public_key'];
|
||||
$config['sid'] = $tlsSettings['shortId'];
|
||||
$config['sid'] = $tlsSettings['short_id'];
|
||||
$output .= "&pbk={$config['pbk']}" . "&sid={$config['sid']}";
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ class SagerNet
|
||||
$output .= "&sni={$config['sni']}";
|
||||
if ($server['tls'] == 2) {
|
||||
$config['pbk'] = $tlsSettings['public_key'];
|
||||
$config['sid'] = $tlsSettings['shortId'];
|
||||
$config['sid'] = $tlsSettings['short_id'];
|
||||
$output .= "&pbk={$config['pbk']}" . "&sid={$config['sid']}";
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ class Shadowrocket
|
||||
$output .= "&sni={$config['sni']}";
|
||||
if ($server['tls'] == 2) {
|
||||
$config['pbk'] = $tlsSettings['public_key'];
|
||||
$config['sid'] = $tlsSettings['shortId'];
|
||||
$config['sid'] = $tlsSettings['short_id'];
|
||||
$output .= "&pbk={$config['pbk']}" . "&sid={$config['sid']}";
|
||||
}
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ class Stash
|
||||
if ($server['tls'] == 2) {
|
||||
$array['reality-opts'] = [];
|
||||
$array['reality-opts']['public-key'] = $tlsSettings['public_key'];
|
||||
$array['reality-opts']['short-id'] = $tlsSettings['shortId'];
|
||||
$array['reality-opts']['short-id'] = $tlsSettings['short_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ class V2rayN
|
||||
$output .= "&sni={$config['sni']}";
|
||||
if ($server['tls'] == 2) {
|
||||
$config['pbk'] = $tlsSettings['public_key'];
|
||||
$config['sid'] = $tlsSettings['shortId'];
|
||||
$config['sid'] = $tlsSettings['short_id'];
|
||||
$output .= "&pbk={$config['pbk']}" . "&sid={$config['sid']}";
|
||||
}
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ class V2rayNG
|
||||
$output .= "&sni={$config['sni']}";
|
||||
if ($server['tls'] == 2) {
|
||||
$config['pbk'] = $tlsSettings['public_key'];
|
||||
$config['sid'] = $tlsSettings['shortId'];
|
||||
$config['sid'] = $tlsSettings['short_id'];
|
||||
$output .= "&pbk={$config['pbk']}" . "&sid={$config['sid']}";
|
||||
}
|
||||
}
|
||||
|
11
public/assets/admin/umi.js
vendored
11
public/assets/admin/umi.js
vendored
@ -102231,7 +102231,8 @@
|
||||
, n = e.allow_insecure
|
||||
, pv = e.private_key
|
||||
, pb = e.public_key
|
||||
, sd = e.shortId;
|
||||
, sd = e.short_id
|
||||
, pt = e.server_port;
|
||||
return y.a.createElement(y.a.Fragment, null, y.a.createElement("div", null, y.a.createElement("div", {
|
||||
className: "form-group"
|
||||
}, y.a.createElement("label", null, "Server Name"), y.a.createElement(s["a"], {
|
||||
@ -102240,6 +102241,12 @@
|
||||
placeholder: "REALITY\u5fc5\u586b\uff0c\u4e0e\u540e\u7aef\u4fdd\u6301\u4e00\u81f4"
|
||||
})), y.a.createElement("div", {
|
||||
className: "form-group"
|
||||
}, y.a.createElement("label", null, "Server Port"), y.a.createElement(s["a"], {
|
||||
value: pt,
|
||||
onChange: e=>this.change("server_port", e.target.value),
|
||||
placeholder: "REALITY\u76ee\u6807\u7aef\u53e3,\u9ed8\u8ba4443"
|
||||
})), y.a.createElement("div", {
|
||||
className: "form-group"
|
||||
}, y.a.createElement("label", null, "Private Key"), y.a.createElement(s["a"], {
|
||||
value: pv,
|
||||
onChange: e=>this.change("private_key", e.target.value),
|
||||
@ -102254,7 +102261,7 @@
|
||||
className: "form-group"
|
||||
}, y.a.createElement("label", null, "ShortId"), y.a.createElement(s["a"], {
|
||||
value: sd,
|
||||
onChange: e=>this.change("shortId", e.target.value),
|
||||
onChange: e=>this.change("short_id", e.target.value),
|
||||
placeholder: "\u7559\u7a7a\u81ea\u52a8\u751f\u6210"
|
||||
})), y.a.createElement("div", {
|
||||
className: "form-group"
|
||||
|
Loading…
x
Reference in New Issue
Block a user