revert: 去除 Loon Trojan HTTP 传输层

This commit is contained in:
xream 2024-01-17 22:13:54 +08:00
parent 845a173738
commit 88e52f9787
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 1 additions and 13 deletions

View File

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

View File

@ -108,18 +108,6 @@ function trojan(proxy) {
`,host=${proxy['ws-opts']?.headers?.Host}`,
'ws-opts.headers.Host',
);
} else if (proxy.network === 'http') {
result.append(`,transport=http`);
let httpPath = proxy['http-opts']?.path;
let httpHost = proxy['http-opts']?.headers?.Host;
result.appendIfPresent(
`,path=${Array.isArray(httpPath) ? httpPath[0] : httpPath}`,
'http-opts.path',
);
result.appendIfPresent(
`,host=${Array.isArray(httpHost) ? httpHost[0] : httpHost}`,
'http-opts.headers.Host',
);
} else {
throw new Error(`network ${proxy.network} is unsupported`);
}