feat: h2 传输层修正 host 为数组, path 不为数组

This commit is contained in:
xream
2024-01-30 02:17:58 +08:00
parent 060415584e
commit d0f255d9c6
2 changed files with 5 additions and 1 deletions

View File

@@ -266,9 +266,13 @@ function lastParse(proxy) {
}
if (proxy.network === 'h2') {
const host = proxy['h2-opts']?.headers?.host;
const path = proxy['h2-opts']?.path;
if (host && !Array.isArray(host)) {
proxy['h2-opts'].headers.host = [host];
}
if (Array.isArray(path)) {
proxy['h2-opts'].path = path[0];
}
}
if (proxy.tls && !proxy.sni) {
if (proxy.network) {