mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 09:19:00 +08:00
feat: 兼容传输层 headers 中小写的 host 字段
This commit is contained in:
parent
955c74a77d
commit
69fab11344
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sub-store",
|
||||
"version": "2.14.83",
|
||||
"version": "2.14.84",
|
||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
@ -212,6 +212,14 @@ function lastParse(proxy) {
|
||||
if (['trojan', 'tuic', 'hysteria', 'hysteria2'].includes(proxy.type)) {
|
||||
proxy.tls = true;
|
||||
}
|
||||
if (proxy.network) {
|
||||
let transportHost = proxy[`${proxy.network}-opts`]?.headers?.Host;
|
||||
let transporthost = proxy[`${proxy.network}-opts`]?.headers?.host;
|
||||
if (transporthost && !transportHost) {
|
||||
proxy[`${proxy.network}-opts`].headers.Host = transporthost;
|
||||
delete proxy[`${proxy.network}-opts`].headers.host;
|
||||
}
|
||||
}
|
||||
if (proxy.tls && !proxy.sni) {
|
||||
if (proxy.network) {
|
||||
let transportHost = proxy[`${proxy.network}-opts`]?.headers?.Host;
|
||||
|
Loading…
x
Reference in New Issue
Block a user