mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-13 16:59:04 +08:00
fix: 修复 Loon Shadow TLS
This commit is contained in:
parent
128353a7f3
commit
797ba6f601
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.16.6",
|
"version": "2.16.7",
|
||||||
"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": {
|
||||||
|
@ -66,6 +66,8 @@ function shadowsocks(proxy, includeUnsupportedProxy) {
|
|||||||
`${proxy.name}=shadowsocks,${proxy.server},${proxy.port},${proxy.cipher},"${proxy.password}"`,
|
`${proxy.name}=shadowsocks,${proxy.server},${proxy.port},${proxy.cipher},"${proxy.password}"`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let isShadowTLS;
|
||||||
|
|
||||||
// obfs
|
// obfs
|
||||||
if (isPresent(proxy, 'plugin')) {
|
if (isPresent(proxy, 'plugin')) {
|
||||||
if (proxy.plugin === 'obfs') {
|
if (proxy.plugin === 'obfs') {
|
||||||
@ -97,6 +99,7 @@ function shadowsocks(proxy, includeUnsupportedProxy) {
|
|||||||
);
|
);
|
||||||
// udp-port
|
// udp-port
|
||||||
result.appendIfPresent(`,udp-port=${proxy['udp-port']}`, 'udp-port');
|
result.appendIfPresent(`,udp-port=${proxy['udp-port']}`, 'udp-port');
|
||||||
|
isShadowTLS = true;
|
||||||
} else if (['shadow-tls'].includes(proxy.plugin) && proxy['plugin-opts']) {
|
} else if (['shadow-tls'].includes(proxy.plugin) && proxy['plugin-opts']) {
|
||||||
const password = proxy['plugin-opts'].password;
|
const password = proxy['plugin-opts'].password;
|
||||||
const host = proxy['plugin-opts'].host;
|
const host = proxy['plugin-opts'].host;
|
||||||
@ -119,6 +122,7 @@ function shadowsocks(proxy, includeUnsupportedProxy) {
|
|||||||
`,udp-port=${proxy['udp-port']}`,
|
`,udp-port=${proxy['udp-port']}`,
|
||||||
'udp-port',
|
'udp-port',
|
||||||
);
|
);
|
||||||
|
isShadowTLS = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,7 +134,7 @@ function shadowsocks(proxy, includeUnsupportedProxy) {
|
|||||||
result.append(`,udp=true`);
|
result.append(`,udp=true`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!includeUnsupportedProxy && result.includes(',shadow-tls-password=')) {
|
if (!includeUnsupportedProxy && isShadowTLS) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`shadow-tls is not supported(请使用 includeUnsupportedProxy 参数)`,
|
`shadow-tls is not supported(请使用 includeUnsupportedProxy 参数)`,
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user