update: fix client protocol

This commit is contained in:
tokumeikoi
2022-05-12 03:38:28 +08:00
parent bd0834bd3f
commit fae48e2c81
4 changed files with 21 additions and 14 deletions

View File

@ -133,7 +133,7 @@ class Clash
if ($server['networkSettings']) {
$grpcSettings = $server['networkSettings'];
$array['grpc-opts'] = [];
$array['grpc-opts']['grpc-service-name'] = $grpcSettings['serviceName'];
if (isset($grpcSettings['serviceName'])) $array['grpc-opts']['grpc-service-name'] = $grpcSettings['serviceName'];
}
}

View File

@ -134,7 +134,7 @@ class Stash
if ($server['networkSettings']) {
$grpcSettings = $server['networkSettings'];
$array['grpc-opts'] = [];
$array['grpc-opts']['grpc-service-name'] = $grpcSettings['serviceName'];
if (isset($grpcSettings['serviceName'])) $array['grpc-opts']['grpc-service-name'] = $grpcSettings['serviceName'];
}
}