mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-11 06:09:00 +08:00
preserve ws-headers for vmess in Surge (#49)
This commit is contained in:
parent
47b7ac6267
commit
204e5b73a2
@ -2598,9 +2598,10 @@ var ProxyUtils = (function () {
|
|||||||
}`;
|
}`;
|
||||||
if (proxy.network === "ws") {
|
if (proxy.network === "ws") {
|
||||||
const path = proxy["ws-path"] || "/";
|
const path = proxy["ws-path"] || "/";
|
||||||
const host = proxy["ws-headers"].Host;
|
const wsHeaders = Object.entries(proxy["ws-headers"]).map(
|
||||||
config += `,ws=true${path ? ",ws-path=" + path : ""}${host ? ",ws-headers=HOST:" + host : ""
|
([key, value]) => (`${key}:"${value}"`))
|
||||||
}`;
|
.join('|');
|
||||||
|
config += `,ws=true${path ? ",ws-path=" + path : ""}${wsHeaders ? ",ws-headers=" + wsHeaders : ""}`;
|
||||||
}
|
}
|
||||||
if (proxy.tls) {
|
if (proxy.tls) {
|
||||||
config += `${typeof proxy["skip-cert-verify"] !== "undefined"
|
config += `${typeof proxy["skip-cert-verify"] !== "undefined"
|
||||||
|
4
backend/sub-store.min.js
vendored
4
backend/sub-store.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user