mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
fix
This commit is contained in:
parent
49e155797a
commit
334f70f19e
@ -53,17 +53,6 @@ class ClientController extends Controller
|
|||||||
$uri = '';
|
$uri = '';
|
||||||
foreach ($server as $item) {
|
foreach ($server as $item) {
|
||||||
$uri .= "vmess=" . $item->host . ":" . $item->port . ", method=none, password=" . $user->v2ray_uuid . ", fast-open=false, udp-relay=false, tag=" . $item->name;
|
$uri .= "vmess=" . $item->host . ":" . $item->port . ", method=none, password=" . $user->v2ray_uuid . ", fast-open=false, udp-relay=false, tag=" . $item->name;
|
||||||
if ($item->tls) {
|
|
||||||
$tlsSettings = json_decode($item->tlsSettings);
|
|
||||||
$uri .= ', obfs=over-tls';
|
|
||||||
if (isset($tlsSettings->allowInsecure)) {
|
|
||||||
// Default: tls-verification=true
|
|
||||||
$uri .= ', tls-verification=' . ($tlsSettings->allowInsecure ? "false" : "true");
|
|
||||||
}
|
|
||||||
if (isset($tlsSettings->serverName)) {
|
|
||||||
$uri .= ', obfs-host=' . $tlsSettings->serverName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($item->network == 'ws') {
|
if ($item->network == 'ws') {
|
||||||
$uri .= ', obfs=' . ($item->tls ? 'wss' : 'ws');
|
$uri .= ', obfs=' . ($item->tls ? 'wss' : 'ws');
|
||||||
if ($item->networkSettings) {
|
if ($item->networkSettings) {
|
||||||
@ -71,6 +60,18 @@ class ClientController extends Controller
|
|||||||
if (isset($wsSettings->path)) $uri .= ', obfs-uri=' . $wsSettings->path;
|
if (isset($wsSettings->path)) $uri .= ', obfs-uri=' . $wsSettings->path;
|
||||||
if (isset($wsSettings->headers->Host)) $uri .= ', obfs-host=' . $wsSettings->headers->Host;
|
if (isset($wsSettings->headers->Host)) $uri .= ', obfs-host=' . $wsSettings->headers->Host;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if ($item->tls) {
|
||||||
|
$tlsSettings = json_decode($item->tlsSettings);
|
||||||
|
$uri .= ', obfs=over-tls';
|
||||||
|
if (isset($tlsSettings->allowInsecure)) {
|
||||||
|
// Default: tls-verification=true
|
||||||
|
$uri .= ', tls-verification=' . ($tlsSettings->allowInsecure ? "false" : "true");
|
||||||
|
}
|
||||||
|
if (isset($tlsSettings->serverName)) {
|
||||||
|
$uri .= ', obfs-host=' . $tlsSettings->serverName;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$uri .= "\r\n";
|
$uri .= "\r\n";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user