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

This commit is contained in:
xream 2024-01-30 02:17:58 +08:00
parent 060415584e
commit d0f255d9c6
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.14.192",
"version": "2.14.193",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {

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) {