mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 04:59:02 +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") {
|
||||
const path = proxy["ws-path"] || "/";
|
||||
const host = proxy["ws-headers"].Host;
|
||||
config += `,ws=true${path ? ",ws-path=" + path : ""}${host ? ",ws-headers=HOST:" + host : ""
|
||||
}`;
|
||||
const wsHeaders = Object.entries(proxy["ws-headers"]).map(
|
||||
([key, value]) => (`${key}:"${value}"`))
|
||||
.join('|');
|
||||
config += `,ws=true${path ? ",ws-path=" + path : ""}${wsHeaders ? ",ws-headers=" + wsHeaders : ""}`;
|
||||
}
|
||||
if (proxy.tls) {
|
||||
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