mirror of
https://github.com/v2board/v2board.git
synced 2025-03-12 21:54:42 +08:00
尝试下发clash系的h2配置
This commit is contained in:
parent
f7f533b3f7
commit
9d3fdb6ee5
@ -217,6 +217,15 @@ class ClashMeta
|
||||
if (isset($grpcSettings['serviceName'])) $array['grpc-opts']['grpc-service-name'] = $grpcSettings['serviceName'];
|
||||
}
|
||||
}
|
||||
if ($server['network'] === 'h2') {
|
||||
$array['network'] = 'h2';
|
||||
if ($server['network_settings']) {
|
||||
$h2Settings = $server['network_settings'];
|
||||
$array['h2-opts'] = [];
|
||||
if (isset($h2Settings['host'])) $array['h2-opts']['host'] = array($h2Settings['host']);
|
||||
if (isset($h2Settings['path'])) $array['h2-opts']['path'] = $h2Settings['path'];
|
||||
}
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
@ -217,7 +217,15 @@ class ClashVerge
|
||||
if (isset($grpcSettings['serviceName'])) $array['grpc-opts']['grpc-service-name'] = $grpcSettings['serviceName'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($server['network'] === 'h2') {
|
||||
$array['network'] = 'h2';
|
||||
if ($server['network_settings']) {
|
||||
$h2Settings = $server['network_settings'];
|
||||
$array['h2-opts'] = [];
|
||||
if (isset($h2Settings['host'])) $array['h2-opts']['host'] = array($h2Settings['host']);
|
||||
if (isset($h2Settings['path'])) $array['h2-opts']['path'] = $h2Settings['path'];
|
||||
}
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user