mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-12 02:29:00 +08:00
fix: Loon 传输层
This commit is contained in:
parent
614438ae3d
commit
bbaac2de6f
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.175",
|
"version": "2.14.176",
|
||||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -93,7 +93,9 @@ function trojan(proxy) {
|
|||||||
result.append(
|
result.append(
|
||||||
`${proxy.name}=trojan,${proxy.server},${proxy.port},"${proxy.password}"`,
|
`${proxy.name}=trojan,${proxy.server},${proxy.port},"${proxy.password}"`,
|
||||||
);
|
);
|
||||||
|
if (proxy.network === 'tcp') {
|
||||||
|
delete proxy.network;
|
||||||
|
}
|
||||||
// transport
|
// transport
|
||||||
if (isPresent(proxy, 'network')) {
|
if (isPresent(proxy, 'network')) {
|
||||||
if (proxy.network === 'ws') {
|
if (proxy.network === 'ws') {
|
||||||
@ -118,7 +120,7 @@ function trojan(proxy) {
|
|||||||
`,host=${Array.isArray(httpHost) ? httpHost[0] : httpHost}`,
|
`,host=${Array.isArray(httpHost) ? httpHost[0] : httpHost}`,
|
||||||
'http-opts.headers.Host',
|
'http-opts.headers.Host',
|
||||||
);
|
);
|
||||||
} else if (!['tcp'].includes(proxy.network)) {
|
} else {
|
||||||
throw new Error(`network ${proxy.network} is unsupported`);
|
throw new Error(`network ${proxy.network} is unsupported`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -146,7 +148,9 @@ function vmess(proxy) {
|
|||||||
result.append(
|
result.append(
|
||||||
`${proxy.name}=vmess,${proxy.server},${proxy.port},${proxy.cipher},"${proxy.uuid}"`,
|
`${proxy.name}=vmess,${proxy.server},${proxy.port},${proxy.cipher},"${proxy.uuid}"`,
|
||||||
);
|
);
|
||||||
|
if (proxy.network === 'tcp') {
|
||||||
|
delete proxy.network;
|
||||||
|
}
|
||||||
// transport
|
// transport
|
||||||
if (isPresent(proxy, 'network')) {
|
if (isPresent(proxy, 'network')) {
|
||||||
if (proxy.network === 'ws') {
|
if (proxy.network === 'ws') {
|
||||||
@ -171,7 +175,7 @@ function vmess(proxy) {
|
|||||||
`,host=${Array.isArray(httpHost) ? httpHost[0] : httpHost}`,
|
`,host=${Array.isArray(httpHost) ? httpHost[0] : httpHost}`,
|
||||||
'http-opts.headers.Host',
|
'http-opts.headers.Host',
|
||||||
);
|
);
|
||||||
} else if (!['tcp'].includes(proxy.network)) {
|
} else {
|
||||||
throw new Error(`network ${proxy.network} is unsupported`);
|
throw new Error(`network ${proxy.network} is unsupported`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -213,7 +217,9 @@ function vless(proxy) {
|
|||||||
result.append(
|
result.append(
|
||||||
`${proxy.name}=vless,${proxy.server},${proxy.port},"${proxy.uuid}"`,
|
`${proxy.name}=vless,${proxy.server},${proxy.port},"${proxy.uuid}"`,
|
||||||
);
|
);
|
||||||
|
if (proxy.network === 'tcp') {
|
||||||
|
delete proxy.network;
|
||||||
|
}
|
||||||
// transport
|
// transport
|
||||||
if (isPresent(proxy, 'network')) {
|
if (isPresent(proxy, 'network')) {
|
||||||
if (proxy.network === 'ws') {
|
if (proxy.network === 'ws') {
|
||||||
@ -238,7 +244,7 @@ function vless(proxy) {
|
|||||||
`,host=${Array.isArray(httpHost) ? httpHost[0] : httpHost}`,
|
`,host=${Array.isArray(httpHost) ? httpHost[0] : httpHost}`,
|
||||||
'http-opts.headers.Host',
|
'http-opts.headers.Host',
|
||||||
);
|
);
|
||||||
} else if (!['tcp'].includes(proxy.network)) {
|
} else {
|
||||||
throw new Error(`network ${proxy.network} is unsupported`);
|
throw new Error(`network ${proxy.network} is unsupported`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user