mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update: code
This commit is contained in:
parent
0284e47155
commit
e01e951f7f
@ -32,7 +32,7 @@ class Clash
|
||||
|
||||
if ($server['tls']) {
|
||||
$array['tls'] = true;
|
||||
if (isset($server['tlsSettings'])) {
|
||||
if ($server['tlsSettings']) {
|
||||
$tlsSettings = json_decode($server['tlsSettings'], true);
|
||||
if (isset($tlsSettings['allowInsecure']) && !empty($tlsSettings['allowInsecure']))
|
||||
$array['skip-cert-verify'] = ($tlsSettings['allowInsecure'] ? true : false);
|
||||
@ -42,7 +42,7 @@ class Clash
|
||||
}
|
||||
if ($server['network'] === 'ws') {
|
||||
$array['network'] = 'ws';
|
||||
if (isset($server['networkSettings'])) {
|
||||
if ($server['networkSettings']) {
|
||||
$wsSettings = json_decode($server['networkSettings'], true);
|
||||
if (isset($wsSettings['path']) && !empty($wsSettings['path']))
|
||||
$array['ws-path'] = $wsSettings['path'];
|
||||
@ -52,7 +52,7 @@ class Clash
|
||||
}
|
||||
if ($server['network'] === 'grpc') {
|
||||
$array['network'] = 'grpc';
|
||||
if (isset($server['networkSettings'])) {
|
||||
if ($server['networkSettings']) {
|
||||
$grpcObject = json_decode($server['networkSettings'], true);
|
||||
$array['grpc-opts'] = [];
|
||||
$array['grpc-opts']['grpc-service-name'] = $grpcObject['serviceName'];
|
||||
|
@ -46,7 +46,7 @@ class Shadowrocket
|
||||
}
|
||||
if ($server['network'] === 'grpc') {
|
||||
$config['obfs'] = "grpc";
|
||||
if (isset($server['networkSettings'])) {
|
||||
if ($server['networkSettings']) {
|
||||
$grpcSettings = json_decode($server['networkSettings'], true);
|
||||
if (isset($grpcSettings['serviceName']) && !empty($grpcSettings['serviceName']))
|
||||
$config['path'] = $grpcSettings['serviceName'];
|
||||
|
Loading…
Reference in New Issue
Block a user